Closed M3Du5AL3M closed 4 years ago
Try Ufw allow 8888
No success, so I tried wget http://localhost:8888, but no success to connect
Resolving localhost (localhost)... 127.0.0.1 Connecting to localhost (localhost)|127.0.0.1|:8888... connected. HTTP request sent, awaiting response... No data received. Retrying.
--2020-05-09 13:10:19-- (try: 2) http://localhost:8888/ Connecting to localhost (localhost)|127.0.0.1|:8888... connected. HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers. Retrying.
The first response sounds to me, the webservice is listening or isn't it? The second one could be a reset, because auth is required...
also check container ports... (remember not --net host is used)
51893/udp -> 0.0.0.0:51893 8888/tcp -> 0.0.0.0:8888 51853/udp -> 0.0.0.0:51853 51900/udp -> 0.0.0.0:51900
Are you trying to connect to your remote server (on your lan or similar) in that case localhost should be replaced with the local ip address
Also, check the logs of the docker container
Docker logs
[2020-05-09 13:09:19 +0000] [6] [INFO] Starting gunicorn 19.9.0 [2020-05-09 13:09:19 +0000] [6] [INFO] Listening at: unix:/tmp/gunicorn.sock (6) [2020-05-09 13:09:19 +0000] [6] [INFO] Using worker: uvicorn.workers.UvicornWorker /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, *args, *kwargs) [2020-05-09 13:09:19 +0000] [8] [INFO] Booting worker with pid: 8 /usr/lib/python3.8/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used return io.open(fd, args, **kwargs) [2020-05-09 13:09:19 +0000] [9] [INFO] Booting worker with pid: 9 [2020-05-09 13:09:21 +0000] [8] [INFO] Started server process [8] [2020-05-09 13:09:21 +0000] [8] [INFO] Waiting for application startup. [2020-05-09 13:09:21 +0000] [8] [INFO] Application startup complete. [2020-05-09 13:09:21 +0000] [9] [INFO] Started server process [9] [2020-05-09 13:09:21 +0000] [9] [INFO] Waiting for application startup. [2020-05-09 13:09:21 +0000] [9] [INFO] Application startup complete.
Sounds also good to me...
Are you trying to connect to your remote server (on your lan or similar) in that case localhost should be replaced with the local ip address
Yes for sure, that's what I try currently
Came back after weeks and the container is now running properly, as I can see. :-) No Net Host mode, ports all default...
You advised to open http://localhost:8888 Maybe a stupid question, but my Ubuntu Host is headless, so I tried to use http://:8888 but never get it running, also not with "--net host" option. Where I'm wrong?
Is it required to use the container on a server with head running?