Having trouble with docker container installation

84 views
Skip to first unread message

Lucas Crownover

unread,
Jul 9, 2021, 4:36:33 PM7/9/21
to nemo
Hello,

I've followed both the "Installation with Docker" [1] instructions, as well as "Docker Compose installation" [2] instructions and I seem to be getting hung up at the same point on each.

The nemo container does not seem to respond correctly to requests on its port (8000).

I can verify that the service is running and the container is listening on the correct port:

```
root@365021d76745:/nemo# ps aux
USER        PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root          1  0.0  0.0   5476  1592 ?        Ss   20:21   0:00 /bin/bash /usr/local/bin/start_NEMO_in_Docker.sh
root         10  0.0  1.1  31124 20516 ?        S    20:21   0:00 /usr/local/bin/python /usr/local/bin/gunicorn --config=/etc/gunicorn_configuration.py NEMO.wsgi:application
root         13  0.1  2.1  75912 40576 ?        S    20:21   0:00 /usr/local/bin/python /usr/local/bin/gunicorn --config=/etc/gunicorn_configuration.py NEMO.wsgi:application
root         14  0.1  2.1  75824 40520 ?        S    20:21   0:00 /usr/local/bin/python /usr/local/bin/gunicorn --config=/etc/gunicorn_configuration.py NEMO.wsgi:application
root         16  0.1  2.1 371100 40944 ?        Sl   20:21   0:00 /usr/local/bin/python /usr/local/bin/gunicorn --config=/etc/gunicorn_configuration.py NEMO.wsgi:application
root         19  0.0  0.1   5740  2248 ?        Ss   20:22   0:00 bash
root         36  0.0  0.0   9380  1520 ?        R+   20:27   0:00 ps aux
root@365021d76745:/nemo# ss -ltn
State                          Recv-Q                         Send-Q                                                   Local Address:Port                                                    Peer Address:Port
LISTEN                         0                              128                                                         127.0.0.11:35447                                                        0.0.0.0:*
LISTEN                         0                              128                                                            0.0.0.0:8000
```

gunicorn also looks to be healthy from the compose log:

```
nemo     | [2021-07-09 20:21:54 +0000] [10] [INFO] Starting gunicorn 19.9.0
nemo     | [2021-07-09 20:21:54 +0000] [10] [INFO] Listening at: http://0.0.0.0:8000 (10)
nemo     | [2021-07-09 20:21:54 +0000] [10] [INFO] Using worker: gthread
nemo     | [2021-07-09 20:21:54 +0000] [13] [INFO] Booting worker with pid: 13
nemo     | [2021-07-09 20:21:54 +0000] [14] [INFO] Booting worker with pid: 14
nemo     | [2021-07-09 20:21:54 +0000] [16] [INFO] Booting worker with pid: 16
```

I then `curl localhost:8000` from inside the container and get nothing:

```
root@365021d76745:/nemo# curl localhost:8000
root@365021d76745:/nemo#
```

There is nothing in the django logs.

I can see that it's responding to traffic:

```
root@365021d76745:/nemo# tcpdump port 8000 -i any
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
20:33:16.277989 IP6 localhost.41334 > localhost.8000: Flags [S], seq 1551095190, win 43690, options [mss 65476,sackOK,TS val 1483799093 ecr 0,nop,wscale 7], length 0
20:33:16.277999 IP6 localhost.8000 > localhost.41334: Flags [R.], seq 0, ack 1551095191, win 0, length 0
20:33:16.278094 IP localhost.45652 > localhost.8000: Flags [S], seq 1868457247, win 43690, options [mss 65495,sackOK,TS val 1483799093 ecr 0,nop,wscale 7], length 0
20:33:16.279917 IP localhost.8000 > localhost.45652: Flags [P.], seq 181228692:181228981, ack 1868457326, win 342, options [nop,nop,TS val 1483799095 ecr 1483799093], length 289
20:33:16.279925 IP localhost.45652 > localhost.8000: Flags [.], ack 289, win 350, options [nop,nop,TS val 1483799095 ecr 1483799095], length 0
20:33:16.279946 IP localhost.8000 > localhost.45652: Flags [P.], seq 289:294, ack 1, win 342, options [nop,nop,TS val 1483799095 ecr 1483799095], length 5
20:33:16.280270 IP localhost.45652 > localhost.8000: Flags [F.], seq 1, ack 294, win 350, options [nop,nop,TS val 1483799096 ecr 1483799095], length 0
20:33:16.281744 IP localhost.8000 > localhost.45652: Flags [F.], seq 294, ack 2, win 342, options [nop,nop,TS val 1483799097 ecr 1483799096], length 0
20:33:16.281752 IP localhost.45652 > localhost.8000: Flags [.], ack 295, win 350, options [nop,nop,TS val 1483799097 ecr 1483799097], length 0
```

I'm pretty much out of ideas as I'm not sure how to troubleshoot django.

Any ideas on next steps for getting this up?


Thanks!

-Lucas


Mathieu Rampant

unread,
Jul 9, 2021, 5:01:07 PM7/9/21
to Lucas Crownover, nemo
Hi Lucas,
With the docker configuration and in general, NEMO is supposed to be accessible from the HOST (not directly from the container) on port 80. This ensures you are going through Nginx.
In other words, by simply using http://localhost on the HOST machine.

If you want to see it inside the container, use "curl -L locahost:8000" (the -L option will follow redirects and should send you to the login page).

Let me know if you have any other questions
Mathieu


--
You received this message because you are subscribed to the Google Groups "nemo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nemo+uns...@list.nist.gov.
To view this discussion on the web visit https://groups.google.com/a/list.nist.gov/d/msgid/nemo/c0814b9c-f60e-45f7-803d-9f9e22fd1420n%40list.nist.gov.

Lucas Crownover

unread,
Jul 9, 2021, 5:27:47 PM7/9/21
to nemo, mathieu...@gmail.com, nemo, Lucas Crownover
Mathieu,

Thanks, for that tidbit. I seem to have fixed the issue using the newer version of the `settings.py` that was updated yesterday (modifying just a couple fields for my organization).

Thanks for the quick reply!

-Lucas
Reply all
Reply to author
Forward
0 new messages