superset icon indicating copy to clipboard operation
superset copied to clipboard

The environment variable POSTGRES_HOST was missing !!!

Open bharath0208 opened this issue 6 years ago • 6 comments

Unable to get login web page when using docker-compose up. Screen Shot 2020-02-10 at 5 44 04 PM

OSError: The environment variable POSTGRES_HOST was missing, abort... superset_1 | ERROR:root:Found but failed to import local superset_config superset_1 | Traceback (most recent call last): superset_1 | File "/app/pythonpath/superset_config.py", line 48, in get_env_variable superset_1 | return os.environ[var_name] superset_1 | File "/usr/local/lib/python3.6/os.py", line 669, in getitem superset_1 | raise KeyError(key) from None superset_1 | KeyError: 'POSTGRES_HOST' superset_1 | superset_1 | During handling of the above exception, another exception occurred: superset_1 | superset_1 | Traceback (most recent call last): superset_1 | File "/app/superset/config.py", line 758, in superset_1 | from superset_config import * # pylint: disable=import-error,wildcard-import,unused-wildcard-import superset_1 | File "/app/pythonpath/superset_config.py", line 61, in superset_1 | POSTGRES_HOST = get_env_variable("POSTGRES_HOST") superset_1 | File "/app/pythonpath/superset_config.py", line 56, in get_env_variable superset_1 | raise EnvironmentError(error_msg) superset_1 | OSError: The environment variable POSTGRES_HOST was missing, abort... superset_1 | ERROR:superset.app:Failed to create app superset_1 | Traceback (most recent call last): superset_1 | File "/app/pythonpath/superset_config.py", line 48, in get_env_variable superset_1 | return os.environ[var_name] superset_1 | File "/usr/local/lib/python3.6/os.py", line 669, in getitem superset_1 | raise KeyError(key) from None superset-worker_1 | ERROR:root:Found but failed to import local superset_config superset-worker_1 | Traceback (most recent call last): superset-worker_1 | File "/app/pythonpath/superset_config.py", line 48, in get_env_variable superset-worker_1 | return os.environ[var_name] superset-worker_1 | File "/usr/local/lib/python3.6/os.py", line 669, in getitem superset-worker_1 | raise KeyError(key) from None superset-worker_1 | KeyError: 'POSTGRES_HOST' superset-worker_1 | superset-worker_1 | During handling of the above exception, another exception occurred: superset-worker_1 | superset-worker_1 | Traceback (most recent call last): superset-worker_1 | File "/app/superset/config.py", line 758, in superset-worker_1 | from superset_config import * # pylint: disable=import-error,wildcard-import,unused-wildcard-import superset-worker_1 | File "/app/pythonpath/superset_config.py", line 61, in superset-worker_1 | POSTGRES_HOST = get_env_variable("POSTGRES_HOST") superset-worker_1 | File "/app/pythonpath/superset_config.py", line 56, in get_env_variable superset-worker_1 | raise EnvironmentError(error_msg)

bharath0208 avatar Feb 10 '20 22:02 bharath0208

@bharath0208 have you previously run docker-compose up on the same computer? If so, try running docker-compose up --build to pull in the latest config into the container

nytai avatar Feb 10 '20 23:02 nytai

@nytai i tried running --build command but still getting the same error. I have cleared all docker images and running containers as well.

bharath0208 avatar Feb 11 '20 04:02 bharath0208

@dpgaspar

I tried downloading the latest code and now i see the below error. For some reason its not able to load the loading.png image from the assets folder.

superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | 127.0.0.1 - - [12/Feb/2020 18:58:47] "GET /health HTTP/1.1" 200 -

#bug

bharath0208 avatar Feb 12 '20 19:02 bharath0208

@dpgaspar

I tried downloading the latest code and when i run the docker-compose up command now i see the below error. For some reason its not able to load the loading.png image from the assets folder.

superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:29] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /superset/welcome HTTP/1.1" 200 - superset_1 | 172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | INFO:werkzeug:172.18.0.1 - - [12/Feb/2020 18:58:35] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_1 | 127.0.0.1 - - [12/Feb/2020 18:58:47] "GET /health HTTP/1.1" 200 -

#bug

bharath0208 avatar Feb 12 '20 19:02 bharath0208

Hi @bharath0208 - is it possible that you're using the old contrib/docker/ system? We have recently updated the docker-compose setup. In the new version, POSTGRES_HOST is no longer referenced. Would you mind sharing the SHA of the commit you are trying to build? That would give me the context to help further.

willbarrett avatar Mar 09 '20 21:03 willbarrett

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar May 09 '20 01:05 stale[bot]