linux – Redash Docker installation problem: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError)

linux – Redash Docker installation problem: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError)

Try docker-compose run --rm server create_db after you run docker-compose up -d.

redash % docker-compose up -d
Docker Compose is now in the Docker CLI, try `docker compose up`

Creating network redash_default with the default driver
Creating redash_postgres_1 ... done
Creating redash_redis_1    ... done
Creating redash_server_1   ... done
Creating redash_worker_1    ... done
Creating redash_scheduler_1 ... done
redash % docker-compose run --rm server create_db
Creating redash_server_run ... done
[2021-11-03 14:49:12,282][PID:1][INFO][alembic.runtime.migration] Context impl PostgresqlImpl.
[2021-11-03 14:49:12,282][PID:1][INFO][alembic.runtime.migration] Will assume transactional DDL.
[2021-11-03 14:49:12,353][PID:1][INFO][alembic.runtime.migration] Running stamp_revision  -> 89bc7873a3e0
redash % 

The following curl result is showing the set-up web page:

% curl --verbose http://localhost:5000/setup
*   Trying ::1...
* Connected to localhost (::1) port 5000 (#0)
> GET /setup HTTP/1.1
> Host: localhost:5000
> User-Agent: curl/7.64.1
> Accept: */*
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: text/html; charset=utf-8
< Content-Length: 2808
< X-Frame-Options: deny
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< Content-Security-Policy: default-src self; style-src self unsafe-inline; script-src self unsafe-eval; font-src self data:; img-src self http: https: data: blob:; object-src none; frame-ancestors none; frame-src;  
< X-Content-Security-Policy: default-src self; style-src self unsafe-inline; script-src self unsafe-eval; font-src self data:; img-src self http: https: data: blob:; object-src none; frame-ancestors none; frame-src;  
< Referrer-Policy: strict-origin-when-cross-origin
< Set-Cookie: csrf_token=IjMxMWFlZWNjYTMwNDQ1YjA4MmM2MGVmZmU4OGYzZjhhNWUyNDNjYTQi.YYK1Cg.gcRo-T2uBFdn2SicRGZbjlA5nEw; Path=/
< Vary: Cookie
< Set-Cookie: session=eyJfcGVybWFuZW50Ijp0cnVlLCJjc3JmX3Rva2VuIjoiMzExYWVlY2NhMzA0NDViMDgyYzYwZWZmZTg4ZjNmOGE1ZTI0M2NhNCJ9.YYK1Cg.7EuH8tslclwcW5nvW8_0k0xi4Aw; Expires=Wed, 03-Nov-2021 22:12:58 GMT; HttpOnly; Path=/
< Server: Werkzeug/0.16.1 Python/3.7.12
< Date: Wed, 03 Nov 2021 16:12:58 GMT
<!DOCTYPE html>
<html class=no-js>
  <title>Redash Initial Setup</title>
  <meta name=viewport content=width=device-width, initial-scale=1.0>
  <meta http-equiv=X-UA-Compatible content=IE=edge>

  <link rel=stylesheet href=/static/server.css>

  <link rel=icon type=image/png sizes=32x32 href=/static/images/favicon-32x32.png>
  <link rel=icon type=image/png sizes=96x96 href=/static/images/favicon-96x96.png>
  <link rel=icon type=image/png sizes=16x16 href=/static/images/favicon-16x16.png>
<body class=d-flex flex-column justify-content-center align-items-center signed-out>

    <div class=header>
      <div class=text-center m-b-15>
        <a href=/><img src=/static/images/redash_icon_small.png></a>
        <h3 class=text-center m-t-0 m-b-25>Redash Initial Setup</h3>
<div class=fixed-width-page>
  <div class=bg-white tiled>
    <h4 class=m-t-0>Welcome to Redash!</h4>
    <div>Before you can use your instance, you need to do a quick setup.</div>

    <form role=form method=post name=create_account>
      <input type=hidden name=csrf_token value=IjMxMWFlZWNjYTMwNDQ1YjA4MmM2MGVmZmU4OGYzZjhhNWUyNDNjYTQi.YYK1Cg.gcRo-T2uBFdn2SicRGZbjlA5nEw/>
      <h4 class=m-t-25>Admin User</h4>
      <div class=form-group >
    <label for=name>Name</label>
    <input class=form-control id=name name=name required type=text value=>
      <div class=form-group >
    <label for=email>Email Address</label>
    <input class=form-control id=email name=email type=email value=>
      <div class=form-group >
    <label for=password>Password</label>
    <input class=form-control id=password name=password type=password value=>

      <div class=checkbox>
          <input checked id=security_notifications name=security_notifications type=checkbox value=y>
          Subscribe to Security Notifications

      <div class=checkbox>
          <input checked id=newsletter name=newsletter type=checkbox value=y>
          Subscribe to newsletter (version updates, no more than once a month)

      <h4 class=m-t-25>General</h4>

      <div class=form-group >
    <label for=org_name>Organization Name</label>
    <input class=form-control id=org_name name=org_name required type=text value=>
        <p class=help-block>Used in email notifications and the UI.</p>

      <button type=submit class=btn btn-primary btn-block m-t-25>Setup</button>


* Closing connection 0

linux – Redash Docker installation problem: sqlalchemy.exc.OperationalError: (psycopg2.OperationalError)

Leave a Reply

Your email address will not be published. Required fields are marked *