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

Web in continuous restart loop, can't connect to server #41

Closed
tony opened this issue Dec 22, 2016 · 1 comment
Closed

Web in continuous restart loop, can't connect to server #41

tony opened this issue Dec 22, 2016 · 1 comment

Comments

@tony
Copy link

tony commented Dec 22, 2016

Related #19

I notice something at https://github.com/mjhea0 pointing to docker/compose#1013.

I don't have a clue what's really happening in that thread.

MacOS Sierra 10.12.2 (16C67)
ef08c89

~/work/django/dockerizing-django master
❯ docker-compose version
docker-compose version 1.9.0, build 2585387
docker-py version: 1.10.6
CPython version: 2.7.12
OpenSSL version: OpenSSL 1.0.2j  26 Sep 2016

~/work/django/dockerizing-django master
❯ docker version
Client:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 06:14:34 2016
 OS/Arch:      darwin/amd64

Server:
 Version:      1.12.5
 API version:  1.24
 Go version:   go1.6.4
 Git commit:   7392c3b
 Built:        Fri Dec 16 06:14:34 2016
 OS/Arch:      linux/amd64

~/work/django/dockerizing-django master
❯ docker-machine version
docker-machine version 0.8.2, build e18a919
~/work/django/dockerizing-django master
❯ docker-compose ps
            Name                          Command                 State              Ports
---------------------------------------------------------------------------------------------------
dockerizingdjango_nginx_1      /usr/sbin/nginx                  Up           0.0.0.0:80->80/tcp
dockerizingdjango_postgres_1   /docker-entrypoint.sh postgres   Up           0.0.0.0:5432->5432/tcp
dockerizingdjango_redis_1      docker-entrypoint.sh redis ...   Up           0.0.0.0:6379->6379/tcp
dockerizingdjango_web_1        /usr/local/bin/gunicorn do ...   Up           8000/tcp
dockerizingdjango_web_run_5    /usr/local/bin/python mana ...   Restarting   8000/tcp

~/work/django/dockerizing-django master
❯ docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                         PORTS                    NAMES
00bc13514884        dockerizingdjango_web     "/usr/local/bin/pytho"   6 minutes ago       Restarting (0) 2 minutes ago   8000/tcp                 dockerizingdjango_web_run_5
40a0d36fde42        dockerizingdjango_nginx   "/usr/sbin/nginx"        6 minutes ago       Up 6 minutes                   0.0.0.0:80->80/tcp       dockerizingdjango_nginx_1
b9319a22dea6        dockerizingdjango_web     "/usr/local/bin/gunic"   6 minutes ago       Up 6 minutes                   8000/tcp                 dockerizingdjango_web_1
839bf6cf11ad        redis:latest              "docker-entrypoint.sh"   6 minutes ago       Up 6 minutes                   0.0.0.0:6379->6379/tcp   dockerizingdjango_redis_1
9489589b4de4        postgres:latest           "/docker-entrypoint.s"   6 minutes ago       Up 6 minutes                   0.0.0.0:5432->5432/tcp   dockerizingdjango_postgres_1

Frustratingly, the servers for dockerizingdjango_web_run_5 keep restarting, even after docker-compose kill

~/work/django/dockerizing-django master
❯ docker-compose kill
Killing dockerizingdjango_nginx_1 ... done
Killing dockerizingdjango_web_1 ... done
Killing dockerizingdjango_redis_1 ... done
Killing dockerizingdjango_postgres_1 ... done

~/work/django/dockerizing-django master
❯ docker-compose ps
            Name                          Command                 State       Ports
-------------------------------------------------------------------------------------
dockerizingdjango_nginx_1      /usr/sbin/nginx                  Exit 137
dockerizingdjango_postgres_1   /docker-entrypoint.sh postgres   Exit 137
dockerizingdjango_redis_1      docker-entrypoint.sh redis ...   Exit 137
dockerizingdjango_web_1        /usr/local/bin/gunicorn do ...   Exit 137
dockerizingdjango_web_run_5    /usr/local/bin/python mana ...   Restarting   8000/tcp

Any hints as to why there is a restart loop and what I can do to get more debug info would be helpful. That way I can provide a bit more details.

❯ docker ps
CONTAINER ID        IMAGE                   COMMAND                  CREATED             STATUS                         PORTS               NAMES
00bc13514884        dockerizingdjango_web   "/usr/local/bin/pytho"   17 minutes ago      Restarting (1) 3 minutes ago   8000/tcp            dockerizingdjango_web_run_5
@tony
Copy link
Author

tony commented Dec 22, 2016

Okay I understand better now.

I wasn't sourcing the docker-machine: eval $(docker-machine env machine-name)

@tony tony closed this as completed Dec 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant