Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker container is not runing #13

Closed
shixin-guo opened this issue Apr 11, 2017 · 10 comments
Closed

docker container is not runing #13

shixin-guo opened this issue Apr 11, 2017 · 10 comments
Assignees

Comments

@shixin-guo
Copy link

hello I try to user your docker images to build a superset demo ,and i run
"docker run --detach --name superset amancevice/superset" in bash ,then run "docker exec -it superset superset-init" but bash tell me the container is not runing . so I want to ask you how to do next (sorry I use docker only a few days and have some thing don‘t understand ,so please you criticize )

@amancevice amancevice self-assigned this Apr 11, 2017
@amancevice
Copy link
Owner

amancevice commented Apr 11, 2017

A few thoughts:

First, you're starting your container in --detach mode which means you can't see its ouput. Try leaving that out or running docker logs superset to see the logs. That will tell you why the container stopped.

Second, it looks like the container is stopping because it can't write to its DB because of a bug in my Dockerfile. I didn't see this behavior myself because I am using the image a little differently.

By default, Superset uses a SQLite DB located at ~/.superset/superset.db. The Dockerfile I've writen defines a VOLUME at /home/superset/.superset so that users can easily mount a directory here. If you don't mount a directory here then when your container is removed all the data is removed with it.

The idea is for users to create their own local directory that contains a superset_config.py file that lays down some configuration for how you want Superset to work. If you decide to use SQLite as a back-end then you would also store your superset.db file here.

So to get around the bug, you could do something like this:

docker run --detach --name superset \
  --volume ~/superset:/home/superset/.superset \
  amancevice/superset

Try familiarizing yourself with docker-compose a little and then looking at my examples in the examples directory.

@amancevice
Copy link
Owner

Also, I have fixed the issue with your command. If you run docker pull amancevice/superset the original command you gave me should work.

@shixin-guo
Copy link
Author

shixin-guo commented Apr 13, 2017

2017-04-13 08:35:56,177:INFO:root:Creating missing datasource permissions.
2017-04-13 08:35:56,180:INFO:root:Creating missing database permissions.
2017-04-13 08:35:56,184:INFO:root:Creating missing metrics permissions

sorry I update the images, and run .but also alert error .so I want to consult how to resolve this case
image
image

@amancevice
Copy link
Owner

That all looks fine. I don't see a problem...

Have you published the 8088 port? If you don't publish the port you won't be able to navigate to the app from your host machine.

@shixin-guo
Copy link
Author

shixin-guo commented Apr 14, 2017

I run docker this image on port 8088 but I open browser at localhost:8088 and not take effort

maybe I operate this somewhere wrong

and missing database permissions is ok?????

@amancevice
Copy link
Owner

You need to include the flag -p 8088:8088 to publish the container's port 8088 to your host-machine's port 8088.

@sterlinm
Copy link

sterlinm commented Jul 13, 2017

I seem to be having an issue getting the docker container to run as well (it's running in a vagrant box if that might matter). When I look at the log for my docker run command I don't see any obvious errors, but from what I can tell (and I'm a novice) the docker container stops running after 30 seconds or so. Here's my log:

vagrant@vagrant-ubuntu-trusty-64:~/superset$ sudo docker logs superset
[2017-07-13 19:14:43 +0000] [9] [INFO] Starting gunicorn 19.7.1
[2017-07-13 19:14:43 +0000] [9] [INFO] Listening at: http://0.0.0.0:8089 (9)
[2017-07-13 19:14:43 +0000] [9] [INFO] Using worker: sync
[2017-07-13 19:14:43 +0000] [12] [INFO] Booting worker with pid: 12
[2017-07-13 19:14:43 +0000] [13] [INFO] Booting worker with pid: 13
[2017-07-13 19:14:43 +0000] [14] [INFO] Booting worker with pid: 14
[2017-07-13 19:14:43 +0000] [15] [INFO] Booting worker with pid: 15
/usr/local/lib/python3.6/site-packages/flask_sqlalchemy/__init__.py:800: UserWarning: SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True to suppress this warning.
  warnings.warn('SQLALCHEMY_TRACK_MODIFICATIONS adds significant overhead and will be disabled by default in the future.  Set it to True to suppress this warning.')
Loaded your LOCAL configuration at [/home/superset/.superset/superset_config.py]
Starting server with command:
gunicorn -w 4 --timeout 60 -b  0.0.0.0:8089 --limit-request-line 0 --limit-request-field_size 0 superset:app

When I try to run the init I get a message that the container is not running:

Error response from daemon: Container 1088d2a7fd3496288878fba4de2aa6484bf5370ef9b5e30dad07f7fb504f384b is not running

@amancevice
Copy link
Owner

Can I ask why you are running Docker in a Vagrant box? That seems redundant. Also can you give me the exact command you are using to start the container?

@sterlinm
Copy link

sterlinm commented Jul 14, 2017

My work computer is a windows computer, but if Superset eventually seemed like something worth using I was hoping to run it on AWS in a docker container on Elastic Beanstalk. I just wanted to test it out locally using vagrant. I also am not as well versed in docker as I would like to be so it's possible I'm just making dumb mistakes.

Here's what I was running:

sudo docker run --detach --name superset -v /home/vagrant/superset:/home/superset/.superset amancevice/superset
sudo docker exec -it superset superset-init

I did end up getting it working just in the vagrant machine and skipped docker entirely. In order to do so I had to increase the memory that I was allocating to the machine so it's possible that that was the issue.

@amancevice
Copy link
Owner

You can run Docker on Windows now, so it should work the same there as on AWS without Vagrant.

What are the contents of your /home/vagrant/superset directory?

Also, protip: instead of using single-ticks, use triple-ticks to surround code blocks to keep multi-line formatting:

```
Here is some code
on two lines
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants