Incubator-superset: superset_1 container is not starting after running docker-compose

Created on 25 Nov 2019  路  4Comments  路  Source: apache/incubator-superset

superset_1 container is not starting after running docker-compose.

Expected results

As per 'start docker' instructions, localhost:8088 should be browse-able after running docker-compose.

Actual results

The following error is output after running docker-compose up and localhost:8088 is not browse-able:

$ sudo docker-compose up
superset_postgres_1 is up-to-date
superset_redis_1 is up-to-date
Starting superset_superset_1 ...

ERROR: for superset_superset_1  a bytes-like object is required, not 'str'

ERROR: for superset  a bytes-like object is required, not 'str'
Traceback (most recent call last):
  File "site-packages/docker/api/client.py", line 261, in _raise_for_status
  File "site-packages/requests/models.py", line 940, in raise_for_status
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.22/containers/af4f8a741c5219c9744455455347673b7f61ee8e632590ea8ea36bee4a70d5e5/start

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "compose/service.py", line 625, in start_container
  File "compose/container.py", line 241, in start
  File "site-packages/docker/utils/decorators.py", line 19, in wrapped
  File "site-packages/docker/api/container.py", line 1095, in start
  File "site-packages/docker/api/client.py", line 263, in _raise_for_status
  File "site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 400 Client Error: Bad Request ("b'OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \\"/entrypoint.sh\\": permission denied": unknown'")

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bin/docker-compose", line 6, in <module>
  File "compose/cli/main.py", line 71, in main
  File "compose/cli/main.py", line 127, in perform_command
  File "compose/cli/main.py", line 1106, in up
  File "compose/cli/main.py", line 1102, in up
  File "compose/project.py", line 570, in up
  File "compose/parallel.py", line 112, in parallel_execute
  File "compose/parallel.py", line 210, in producer
  File "compose/project.py", line 556, in do
  File "compose/service.py", line 568, in execute_convergence_plan
  File "compose/service.py", line 510, in _execute_convergence_start
  File "compose/parallel.py", line 112, in parallel_execute
  File "compose/parallel.py", line 210, in producer
  File "compose/service.py", line 508, in <lambda>
  File "compose/service.py", line 620, in start_container_if_stopped
  File "compose/service.py", line 627, in start_container
TypeError: a bytes-like object is required, not 'str'
[85189] Failed to execute script docker-compose

After running docker-compose run --rm superset ./docker-init.sh after the initial time, this is the output:

$ sudo docker-compose run --rm superset ./docker-init.sh
Starting superset_redis_1    ... done
Starting superset_postgres_1 ... done
Error response from daemon: OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \"/entrypoint.sh\": permission denied": unknown

How to reproduce the bug

Follow 'start docker' instructions here: https://superset.incubator.apache.org/installation.html#start-with-docker

Environment

  • superset version: n/a
  • python version: 2.7.5
  • node.js version: v8.16.0
  • npm version: 6.4.1

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 am unable to get into the superset container. docker logs on the container returns nothing.)
  • [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.

Additional context

The workstation has limited access to the internet, so I had to manually import the python, postgres, and redis docker images. I have the log of docker-compose run --rm superset ./docker-init.sh but it is too big for a pastebin. There was no errors that I could see.

#bug

Most helpful comment

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

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

All 4 comments

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

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

Ok I was able to get this fixed and there was two issues.
One was that the docker-entrypoint.sh and docker-init.sh scripts both needed to be made executable (chomd +x) and both files also needed to have their line endings changes to unix (dos2unix <filename>).

EDIT: This wasn't the actual fix, see below

I got it working. It's a git error (see here: https://github.com/docker/labs/issues/215)

git config --global core.autocrlf false

Delete superset repo

git clone https://github.com/apache/incubator-superset/
cd incubator-superset/contrib/docker
docker-compose run --rm superset ./docker-init.sh

docker-compose up

@evanmiller29 Thanks yeah, that was definitely needed because it wasn't just those two files that had the wrong line endings. But I also had to add the solution from here: https://github.com/apache/incubator-superset/issues/6694

So I ended up re-cloning the repo like you suggested, then I added the following lines to end of the docker-entrypoint.sh:

cd /home/superset/superset/static && rm assets && ln -s /home/superset/superset/assets/ assets
chmod 777 /home/superset/superset/assets/

After all that, the app came up just fine.

Was this page helpful?
0 / 5 - 0 ratings