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.

Failed testing Docker image

See original GitHub issue

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 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

Superset version

latest, followed https://superset.incubator.apache.org/installation.html

$ git show
commit 4c21c658244f995e76de027ec35d98ec7b173534 (HEAD -> master, origin/master, origin/HEAD)

Expected results

running docker instance and able to login

Actual results

work@735b8b78ea54:~/incubator-superset$ bash docker-init.sh failes:

  • Click version conflict: pkg_resources.ContextualVersionConflict: (Click 7.0 (/usr/local/lib/python3.6/site-packages), Requirement.parse('click==6.7'), {'Flask-AppBuilder'})

Solution for me: $ pip3.6 install click==6.7 --user

  • permissions denied (1st): clean-webpack-plugin: /home/work/incubator-superset/superset/assets/dist has been removed. 95% emitting OptimizeCssAssetsWebpackPluginError: EACCES: permission denied, mkdir '/home/work/incubator-superset/superset/assets/dist'

  • permission denied (2nd): 2018-09-27 07:13:29,300:ERROR:flask_appbuilder.security.sqla.manager:Creation of Permission View Error: (sqlite3.IntegrityError) UNIQUE constraint failed: ab_permission_view.permission_id, ab_permission_view.view_menu_id [SQL: 'INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES (?, ?)'] [parameters: (2, 5)] (Background on this error at: http://sqlalche.me/e/gkpj) 2018-09-27 07:13:29,311:ERROR:flask_appbuilder.security.sqla.manager:Add Permission to Role Error: Can't flush None value found in collection Role.permissions

  • connection refused to amqp:// [2018-09-27 07:13:54,796: ERROR/MainProcess] consumer: Cannot connect to amqp://guest:**@127.0.0.1:5672//: [Errno 111] Connection refused. Trying again in 2.00 seconds...

https://github.com/apache/incubator-superset/issues/5919 and https://github.com/apache/incubator-superset/issues/5916 do not help, I’m not able to change the permissions within the container:

$ chmod 777 /home/work/incubator-superset/superset/assets chmod: changing permissions of '/home/work/incubator-superset/superset/assets': Operation not permitted $ mkdir dist mkdir: cannot create directory ‘dist’: Permission denied

Consequences: login form is available, but login is not possible.

Steps to reproduce

follow https://superset.incubator.apache.org/installation.html:

git clone https://github.com/apache/incubator-superset/
cd incubator-superset
cp contrib/docker/{docker-build.sh,docker-compose.yml,docker-entrypoint.sh,docker-init.sh,Dockerfile} .
cp contrib/docker/superset_config.py superset/
bash -x docker-build.sh
docker-compose up -d
docker-compose exec superset bash
bash docker-init.sh

Docker host is Ubuntu 18.04.1 LTS, Kernel 4.15.0-34-generic

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
CloudChaoszerocommented, Oct 2, 2018

This is an issue related to click==6.7

To fix, I installed click==6.7 by editing the Docker file:

RUN pip install -e . --no-cache-dir  && pip install -r requirements-dev.txt --no-cache-dir 
#add this too
RUN pip install click==6.7

of course, The permanent solution is to edit requirements.txt and setup.py to add this dependency.

@abshammeri Thanks! You are awesome!

In addition to RUN pip install click==6.7, I added the parameter --user like so RUN pip install click==6.7 --user

1reaction
xentitycommented, Oct 3, 2018

but keep in mind that this was not the main point of my issue (I only listed the Click issue for the sake of completeness and found already a solution), but there is still the problem that /home/work/incubator-superset/superset/assets/dist cannot be created, but is necessary to finish the docker-init.sh .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction to Failure Testing With Docker - QualiMente
Failure testing is the process of exploring how a system behaves when subjected to the application, host, and network problems that software ...
Read more >
How to Fix and Debug Docker Containers Like a Superhero
Container errors are tricky to diagnose, but some investigative magic works wonders. Read along to learn how to debug Docker containers.
Read more >
Improve CI process by testing against docker image and fail ...
Build container image. · If unsuccessful, abort as failed. · Run test in the container image. · If unsuccessful, remove image and abort...
Read more >
How to fail a functional test inside docker-container
If you would like to fail the test based on some condition, you need to use thresholds.
Read more >
How do I get a test report when my Jest unit tests fail in Docker?
When adding the continueOnError: true flag to the Docker build step the build continues to the next step, but the problem still exists....
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