question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Errno 99] Cannot assign requested address in superset_init for docker-compose

See original GitHub issue

I can log in the superset but see nothing but a button “close”(refer to attached screenshot).

I’ve used docker-compose with latest code to build superset, the only thing i’ve changed is in docker-compose.yml I used different port since the host already had an existing postgresql instance. ports: - "127.0.0.1:5433:5432"

after run the docker-compose up, the only errors i can see was in superset_init step 4: superset_init | urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>

Expected results

I want the home page functional.

Actual results

only a “close” button after logged in.

Screenshots

superset220201019132916

How to reproduce the bug

  1. git clone
  2. run “docker compose up”
  3. access http://localhost:8088, login with default user admin with password admin
  4. See error

Environment

Superset version

git log
commit 31e4a90440885c5e0100408e65fedc33786240db (HEAD -> master, origin/master, origin/HEAD)
Author: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
Date:   Fri Oct 16 23:23:21 2020 +0200

    Fix overflowing tab's styling in TabbedSqlEditors (#11303)

commit 94e23bfc82613bbca9c6d4c55766836597907b3e
Author: Beto Dealmeida <roberto@dealmeida.net>
Date:   Fri Oct 16 11:10:39 2020 -0700

    feat: export databases as a ZIP bundle (#11229)
    * Export databases as Zip file
    * Fix tests
    * Address comments
    * Implement mulexport for database
    * Fix lint
    * Fix lint

commit 8863c939ad01fe1e065ce60edc93a683e6828d80
Author: Grace Guo <grace.guo@airbnb.com>
Date:   Fri Oct 16 10:54:35 2020 -0700

    fix: should update last_modified_time in client-side after save dash

Log from docker-compose:

sudo docker-compose up
Creating network "incubator-superset_default" with the default driver
Creating superset_cache ... done
Creating superset_db    ... done
Creating superset_init         ... done
Creating superset_app          ... done
Creating superset_worker       ... done
Creating superset_node         ... done
Creating superset_tests_worker ... done
Attaching to superset_cache, superset_db, superset_tests_worker, superset_init, superset_app, superset_worker, superset_node
superset_cache           | 1:C 19 Oct 05:32:59.656 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
superset_cache           |                 _._
superset_cache           |            _.-``__ ''-._
superset_cache           |       _.-``    `.  `_.  ''-._           Redis 3.2.12 (00000000/0) 64 bit
superset_cache           |   .-`` .-```.  ```\/    _.,_ ''-._
superset_cache           |  (    '      ,       .-`  | `,    )     Running in standalone mode
superset_cache           |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
superset_cache           |  |    `-._   `._    /     _.-'    |     PID: 1
superset_cache           |   `-._    `-._  `-./  _.-'    _.-'
superset_cache           |  |`-._`-._    `-.__.-'    _.-'_.-'|
superset_cache           |  |    `-._`-._        _.-'_.-'    |           http://redis.io
superset_cache           |   `-._    `-._`-.__.-'_.-'    _.-'
superset_cache           |  |`-._`-._    `-.__.-'    _.-'_.-'|
superset_cache           |  |    `-._`-._        _.-'_.-'    |
superset_cache           |   `-._    `-._`-.__.-'_.-'    _.-'
superset_cache           |       `-._    `-.__.-'    _.-'
superset_cache           |           `-._        _.-'
superset_cache           |               `-.__.-'
superset_cache           |
superset_cache           | 1:M 19 Oct 05:32:59.659 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
superset_cache           | 1:M 19 Oct 05:32:59.659 # Server started, Redis version 3.2.12
superset_cache           | 1:M 19 Oct 05:32:59.659 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
superset_cache           | 1:M 19 Oct 05:32:59.659 * DB loaded from disk: 0.000 seconds
superset_cache           | 1:M 19 Oct 05:32:59.659 * The server is now ready to accept connections on port 6379
superset_db              |
superset_db              | PostgreSQL Database directory appears to contain a database; Skipping initialization
superset_db              |
superset_db              | 2020-10-19 05:33:02.644 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
superset_db              | 2020-10-19 05:33:02.644 UTC [1] LOG:  listening on IPv6 address "::", port 5432
superset_db              | 2020-10-19 05:33:02.926 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
superset_db              | 2020-10-19 05:33:03.347 UTC [25] LOG:  database system was shut down at 2020-10-19 04:13:54 UTC
superset_db              | 2020-10-19 05:33:03.670 UTC [1] LOG:  database system is ready to accept connections
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 1/4 [Starting] -- Applying DB migrations
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_node            | npm WARN using --force I sure hope you know what you are doing.
superset_app             |  * Serving Flask app "superset.app:create_app()" (lazy loading)
superset_app             |  * Environment: development
superset_app             |  * Debug mode: on
superset_app             |  * Running on http://0.0.0.0:8088/ (Press CTRL+C to quit)
superset_app             |  * Restarting with stat
superset_app             |  * Debugger is active!
superset_app             |  * Debugger PIN: 145-496-381
superset_tests_worker    | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_tests_worker    | Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
superset_tests_worker    | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_tests_worker    |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_tests_worker    | ERROR:flask_appbuilder.security.sqla.manager:DB Creation and initialization failed: (psycopg2.OperationalError) could not connect to server: Connection refused
superset_tests_worker    |      Is the server running on host "localhost" (::1) and accepting
superset_tests_worker    |      TCP/IP connections on port 5432?
superset_tests_worker    | FATAL:  no pg_hba.conf entry for host "127.0.0.1", user "superset", database "test"
superset_tests_worker    |
superset_tests_worker    | (Background on this error at: http://sqlalche.me/e/13/e3q8)
superset_tests_worker exited with code 1
superset_worker          | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_init            | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_app             | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_app             | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_init            | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_init            |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_init            | INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
superset_init            | INFO  [alembic.runtime.migration] Will assume transactional DDL.
superset_init            | Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
superset_worker          | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_worker          |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_worker          | [2020-10-19 05:33:45,149: INFO/MainProcess] Connected to redis://redis:6379/0
superset_worker          | [2020-10-19 05:33:45,175: INFO/MainProcess] mingle: searching for neighbors
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 1/4 [Complete] -- Applying DB migrations
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 2/4 [Starting] -- Setting up admin user ( admin / admin )
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_app             | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_app             |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_app             | 127.0.0.1 - - [19/Oct/2020 05:33:46] "GET /health HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:127.0.0.1 - - [19/Oct/2020 05:33:46] "GET /health HTTP/1.1" 200 -
superset_worker          | [2020-10-19 05:33:46,237: INFO/MainProcess] mingle: all alone
superset_worker          | [2020-10-19 05:33:46,303: INFO/MainProcess] celery@455da5275a13 ready.
superset_init            | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_init            | Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
superset_init            | Recognized Database Authentications.
superset_init            | Error! User already exists admin
superset_init            | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_init            |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 2/4 [Complete] -- Setting up admin user
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 3/4 [Starting] -- Setting up roles and perms
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_init            | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_init            |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_init            | INFO:superset.security.manager:Syncing role definition
superset_init            | INFO:superset.security.manager:Syncing Admin perms
superset_init            | INFO:superset.security.manager:Syncing Alpha perms
superset_init            | INFO:superset.security.manager:Syncing Gamma perms
superset_init            | INFO:superset.security.manager:Syncing granter perms
superset_init            | INFO:superset.security.manager:Syncing sql_lab perms
superset_init            | INFO:superset.security.manager:Fetching a set of all perms to lookup which ones are missing
superset_init            | INFO:superset.security.manager:Creating missing datasource permissions.
superset_init            | INFO:superset.security.manager:Creating missing database permissions.
superset_init            | INFO:superset.security.manager:Cleaning faulty perms
superset_init            | Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 3/4 [Complete] -- Setting up roles and perms
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            |
superset_init            | Init Step 4/4 [Starting] -- Loading examples
superset_init            |
superset_init            |
superset_init            | ######################################################################
superset_init            |
superset_init            | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_app             | 127.0.0.1 - - [19/Oct/2020 05:34:16] "GET /health HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:127.0.0.1 - - [19/Oct/2020 05:34:16] "GET /health HTTP/1.1" 200 -
superset_init            | /usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
superset_init            |   "Flask-Caching: CACHE_TYPE is set to null, "
superset_init            | DEBUG:superset.models.core:Database.get_sqla_engine(). Masked URL: postgresql://superset:XXXXXXXXXX@db:5432/superset
superset_init            | Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]
superset_init            | Loading examples metadata and related data into examples
superset_init            | Creating default CSS templates
superset_init            | Loading energy related dataset
superset_init            | Traceback (most recent call last):
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 1350, in do_open
superset_init            |     encode_chunked=req.has_header('Transfer-encoding'))
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 1277, in request
superset_init            |     self._send_request(method, url, body, headers, encode_chunked)
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 1323, in _send_request
superset_init            |     self.endheaders(body, encode_chunked=encode_chunked)
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 1272, in endheaders
superset_init            |     self._send_output(message_body, encode_chunked=encode_chunked)
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 1032, in _send_output
superset_init            |     self.send(msg)
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 972, in send
superset_init            |     self.connect()
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 1439, in connect
superset_init            |     super().connect()
superset_init            |   File "/usr/local/lib/python3.7/http/client.py", line 944, in connect
superset_init            |     (self.host,self.port), self.timeout, self.source_address)
superset_init            |   File "/usr/local/lib/python3.7/socket.py", line 728, in create_connection
superset_init            |     raise err
superset_init            |   File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
superset_init            |     sock.connect(sa)
superset_init            | OSError: [Errno 99] Cannot assign requested address
superset_init            |
superset_init            | During handling of the above exception, another exception occurred:
superset_init            |
superset_init            | Traceback (most recent call last):
superset_init            |   File "/usr/local/bin/superset", line 33, in <module>
superset_init            |     sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 829, in __call__
superset_init            |     return self.main(*args, **kwargs)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 586, in main
superset_init            |     return super(FlaskGroup, self).main(*args, **kwargs)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 782, in main
superset_init            |     rv = self.invoke(ctx)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
superset_init            |     return _process_result(sub_ctx.command.invoke(sub_ctx))
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
superset_init            |     return ctx.invoke(self.callback, **ctx.params)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
superset_init            |     return callback(*args, **kwargs)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/decorators.py", line 21, in new_func
superset_init            |     return f(get_current_context(), *args, **kwargs)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/flask/cli.py", line 426, in decorator
superset_init            |     return __ctx.invoke(f, *args, **kwargs)
superset_init            |   File "/usr/local/lib/python3.7/site-packages/click/core.py", line 610, in invoke
superset_init            |     return callback(*args, **kwargs)
superset_init            |   File "/app/superset/cli.py", line 172, in load_examples
superset_init            |     load_examples_run(load_test_data, only_metadata, force)
superset_init            |   File "/app/superset/cli.py", line 110, in load_examples_run
superset_init            |     examples.load_energy(only_metadata, force)
superset_init            |   File "/app/superset/examples/energy.py", line 41, in load_energy
superset_init            |     data = get_example_data("energy.json.gz")
superset_init            |   File "/app/superset/examples/helpers.py", line 73, in get_example_data
superset_init            |     content = request.urlopen(f"{BASE_URL}{filepath}?raw=true").read()
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
superset_init            |     return opener.open(url, data, timeout)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open
superset_init            |     response = meth(req, response)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response
superset_init            |     'http', request, response, code, msg, hdrs)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 563, in error
superset_init            |     result = self._call_chain(*args)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
superset_init            |     result = func(*args)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 755, in http_error_302
superset_init            |     return self.parent.open(new, timeout=req.timeout)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 531, in open
superset_init            |     response = meth(req, response)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 641, in http_response
superset_init            |     'http', request, response, code, msg, hdrs)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 563, in error
superset_init            |     result = self._call_chain(*args)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
superset_init            |     result = func(*args)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 755, in http_error_302
superset_init            |     return self.parent.open(new, timeout=req.timeout)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
superset_init            |     response = self._open(req, data)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open
superset_init            |     '_open', req)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
superset_init            |     result = func(*args)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 1393, in https_open
superset_init            |     context=self._context, check_hostname=self._check_hostname)
superset_init            |   File "/usr/local/lib/python3.7/urllib/request.py", line 1352, in do_open
superset_init            |     raise URLError(err)
superset_init            | urllib.error.URLError: <urlopen error [Errno 99] Cannot assign requested address>
superset_init exited with code 1
superset_app             | 127.0.0.1 - - [19/Oct/2020 05:34:46] "GET /health HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:127.0.0.1 - - [19/Oct/2020 05:34:46] "GET /health HTTP/1.1" 200 -
superset_app             | 127.0.0.1 - - [19/Oct/2020 05:35:17] "GET /health HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:127.0.0.1 - - [19/Oct/2020 05:35:17] "GET /health HTTP/1.1" 200 -
superset_app             | 127.0.0.1 - - [19/Oct/2020 05:35:47] "GET /health HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:127.0.0.1 - - [19/Oct/2020 05:35:47] "GET /health HTTP/1.1" 200 -
superset_app             | 127.0.0.1 - - [19/Oct/2020 05:36:18] "GET /health HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:127.0.0.1 - - [19/Oct/2020 05:36:18] "GET /health HTTP/1.1" 200 -
superset_app             | 172.24.0.1 - - [19/Oct/2020 05:36:23] "GET / HTTP/1.1" 302 -
superset_app             | INFO:werkzeug:172.24.0.1 - - [19/Oct/2020 05:36:23] "GET / HTTP/1.1" 302 -
superset_app             | 172.24.0.1 - - [19/Oct/2020 05:36:23] "GET /superset/welcome HTTP/1.1" 200 -
superset_app             | INFO:werkzeug:172.24.0.1 - - [19/Oct/2020 05:36:23] "GET /superset/welcome HTTP/1.1" 200 -
superset_app             | 172.24.0.1 - - [19/Oct/2020 05:36:23] "GET /static/assets/images/loading.gif HTTP/1.1" 404 -
superset_app             | INFO:werkzeug:172.24.0.1 - - [19/Oct/2020 05:36:23] "GET /static/assets/images/loading.gif HTTP/1.1" 404 -

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:4
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
issue-label-bot[bot]commented, Oct 19, 2020

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.60. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

1reaction
srinifycommented, Mar 19, 2021

Hi @siben168 to help with this, a non-dev docker compose file was added so frontend assets don’t have to be built!

https://github.com/apache/superset/pull/13143

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Errno 99] Cannot assign requested address : flask, python ...
My guess is that the docker container where I run my app is not accessible to other devices, namely the Fuseki server, but...
Read more >
Docker Containers and localhost: Cannot Assign Requested ...
The website's API proxy class kept barfing up this error message every time I tried to call any API endpoints. Cannot assign requested...
Read more >
OSError: [Errno 99] Cannot assign requested address - done
I installed the latest prodigy (prodigy-0.5.0-cp35.cp36-cp35m.cp36m-linux_x86_64.whl) I then ran the following commands from ...
Read more >
[GitHub] [superset] tankeqwe1231 commented on issue #11322
[GitHub] [superset] tankeqwe1231 commented on issue #11322: [Errno 99] Cannot assign requested address in superset_init for docker-compose.
Read more >
How I fixed Python OSError: [Errno 99] Cannot assign ...
Docker container [Errno 99] Cannot assign requested address ... Note that for Docker containers, either you need to run them in network_mode: host ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found