superset_1 container is not starting after running docker-compose.
As per 'start docker' instructions, localhost:8088 should be browse-able after running docker-compose.
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
Follow 'start docker' instructions here: https://superset.incubator.apache.org/installation.html#start-with-docker
Make sure these boxes are checked before submitting your issue - thank you!
docker logs on the container returns nothing.)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.
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
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.
Most helpful comment
Issue-Label Bot is automatically applying the label
#bugto 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.