Incubator-superset: Problem installing Superset from master branch

Created on 15 Jun 2020  路  9Comments  路  Source: apache/incubator-superset

A clear and concise description of what the bug is.

Expected results

Can run Superset from master branch in first time installation

Actual results

Problem on npm

Screenshots

Terminal:
Capture

Browser:
Capture

How to reproduce the bug

  1. Run docker-compose up to start all the containers

Environment

  • superset version: master
  • python version: 3.6.9
  • node.js version: 10-jessie

Checklist

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

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

All 9 comments

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

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

@syazwan0913 would you mind providing an expanded error trace? It looks like your superset-node container is not successfully building assets. Please examine the output from that container and let us know what you find.

@willbarrett Here is the full log

superset_init            | Traceback (most recent call last):
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
superset_init            |     ws.require(__requires__)
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 900, in require
superset_init            |     needed = self.resolve(parse_requirements(requirements))
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 791, in resolve
superset_init            |     raise VersionConflict(dist, req).with_context(dependent_req)
superset_init            | pkg_resources.ContextualVersionConflict: (SQLAlchemy-Utils 0.36.6 (/usr/local/lib/python3.6/site-packages), Requirement.parse('sqlalchemy-utils<0.36.5,>=0.33.2'), {'apache-superset'})
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 4, in <module>
superset_init            |     __import__('pkg_resources').require('apache-superset==0.999.0.dev0')
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3260, in <module>
superset_init            |     @_call_aside
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3244, in _call_aside
superset_init            |     f(*args, **kwargs)
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3273, in _initialize_master_working_set
superset_init            |     working_set = WorkingSet._build_master()
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 585, in _build_master
superset_init            |     return cls._build_from_requirements(__requires__)
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 598, in _build_from_requirements
superset_init            |     dists = ws.resolve(reqs, Environment())
superset_init            |   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 786, in resolve
superset_init            |     raise DistributionNotFound(req, requirers)
superset_init            | pkg_resources.DistributionNotFound: The 'sqlalchemy-utils<0.36.5,>=0.33.2' distribution was not found and is required by apache-superset
superset_db              | syncing data to disk ...
superset_db              | WARNING: enabling "trust" authentication for local connections
superset_db              | You can change this by editing pg_hba.conf or using the option -A, or
superset_db              | --auth-local and --auth-host, the next time you run initdb.
superset_db              | ok
superset_db              |
superset_db              | Success. You can now start the database server using:
superset_db              |
superset_db              |     pg_ctl -D /var/lib/postgresql/data -l logfile start
superset_db              |
superset_init exited with code 1
superset_db              | waiting for server to start....2020-06-25 06:35:48.966 UTC [46] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
superset_db              | 2020-06-25 06:35:48.998 UTC [47] LOG:  database system was shut down at 2020-06-25 06:35:47 UTC
superset_db              | 2020-06-25 06:35:49.007 UTC [46] LOG:  database system is ready to accept connections
superset_db              |  done
superset_db              | server started
superset_node            | npm ERR! Unexpected end of JSON input while parsing near '...":"^0.2.0","karma-pha'
superset_node            |
superset_node            | npm ERR! A complete log of this run can be found in:
superset_node            | npm ERR!     /root/.npm/_logs/2020-06-25T06_35_49_090Z-debug.log
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_node exited with code 1
superset_tests_worker    | INFO:superset.utils.logging_configurator:logging was configured successfully
superset_tests_worker    | /usr/local/lib/python3.6/site-packages/flask_caching/__init__.py:189: 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) server closed the connection unexpectedly
superset_tests_worker    |      This probably means the server terminated abnormally
superset_tests_worker    |      before or while processing the request.
superset_tests_worker    |
superset_tests_worker    | (Background on this error at: http://sqlalche.me/e/e3q8)
superset_tests_worker    | Loaded your LOCAL configuration at [/app/pythonpath/superset_config.py]

OK, it appears that you are running into a dependency conflict on SQLAlchemy. I just attempted to rebuild our Docker container locally and ran into the same issue. I'll work on a fix today.

Yes I had to temporary downgrade sqlalchemy-utils version in order to make the installation working

@willbarrett Is it fixed already?

@syazwan0913 we discovered that the dependency issue was due to an unnamed Docker volume that carried the older dependency forward. We've run this to blow away our docker volumes locally and resolve the issue:

docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker system prune -a

This does blow away all of the data in the dockerized database volume, so it's not a perfect solution. Leaving this open in case a better solution presents itself.

@willbarrett Okay I will try it out. Thanks

Closing as this issue is no longer reproducible on master.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eliab picture eliab  路  3Comments

dinhhuydh picture dinhhuydh  路  3Comments

tmccartan picture tmccartan  路  3Comments

amien90 picture amien90  路  3Comments

john-bodley picture john-bodley  路  3Comments