docker-red-discordbot icon indicating copy to clipboard operation
docker-red-discordbot copied to clipboard

Boot loop due to connection to pypi.org broken

Open potvinp opened this issue 2 years ago • 5 comments

Good afternoon,

Running the latest version of the docker container and it appears that the container is stuck in a boot loop. Below are some logs from the container fron when it starts to when it restarts automatically. I have stopped the container, removed the /data/venv folder, pulled the latest image and then created the container again withoutt any resolution.

Timezone set to America/Toronto
Starting with UID/GID: 1000/1000
Activating Python virtual environment...
Updating Red-DiscordBot...
Requirement already satisfied: pip in /data/venv/lib/python3.8/site-packages (21.1.1)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/pip/
Requirement already satisfied: setuptools in /data/venv/lib/python3.8/site-packages (56.0.0)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/wheel/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/wheel/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/wheel/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/wheel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/wheel/
ERROR: Could not find a version that satisfies the requirement wheel (from versions: none)
ERROR: No matching distribution found for wheel

potvinp avatar Sep 02 '21 18:09 potvinp

Is the boot loop caused by docker-compose restarting the container after it exits? From what I can tell, if the updater fails in any way (exits non-zero), it should stop the whole container.

PhasecoreX avatar Sep 02 '21 19:09 PhasecoreX

Is the boot loop caused by docker-compose restarting the container after it exits? From what I can tell, if the updater fails in any way (exits non-zero), it should stop the whole container.

Yes, that is the exact cause from what I noticed. Is there any reason why the updater should be failing with that error in the first place?

potvinp avatar Sep 03 '21 16:09 potvinp

Based on the errors, my assumption is that for some reason PyPi is having server issues. Or maybe your Docker host is having connectivity issues to the PyPi servers. I would see if you can use your browser and connect to pypi.org. There's nothing that I can do container-wise to fix that though. If it can't connect to PyPi, there's no way to install/update Red-DiscordBot.

PhasecoreX avatar Sep 04 '21 00:09 PhasecoreX

EDIT: i tried it on my local machine and it worked out of the box, i have no idea why it wont on my servers though... they are located on 2 different networks so i'w have to do some testing :/

maby this is also related to this? i'w tried this on 2 different hosts now both have other containers running.

Starting with UID/GID: 1000/1000 Activating Python virtual environment... Updating Red-DiscordBot... Requirement already satisfied: pip in /data/venv/lib/python3.8/site-packages (21.1.1) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0787282d90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0787282c40>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f0787282d00>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f07872821f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f078728b1c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pip/ Requirement already satisfied: setuptools in /data/venv/lib/python3.8/site-packages (56.0.0) WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14120ab640>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14120ab550>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14120ab610>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14120abd60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14120abbe0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools/ WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14137e0070>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/wheel/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14137e0220>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/wheel/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14137e03d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/wheel/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14137e0580>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/wheel/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f14137e0730>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/wheel/ ERROR: Could not find a version that satisfies the requirement wheel (from versions: none) ERROR: No matching distribution found for wheel

kieeps avatar Sep 14 '21 09:09 kieeps

Yours specifically has Failed to establish a new connection: [Errno -3] Temporary failure in name resolution, so my guess is that your servers are using a different DNS resolver/server than your local machine, and they are not resolving the IP address of PyPi.

On the servers I would try a drill pypi.org (or dig instead of drill) to see that whatever DNS server your servers are using is working correctly. And then technically you'd have to make sure that the docker containers are using the hosts (your servers) DNS settings as well. By default they are, but it is possible to manually set the DNS servers for a container.

But who knows, it could just be temporary, as the error message suggests.

PhasecoreX avatar Sep 14 '21 12:09 PhasecoreX

same thing, but also i have RUN ping pypi.org -p 443 working on docker:

=> [ 4/21] RUN ping pypi.org -p 443                                                                                                                                                                   7.0s
 => => # 64 bytes from 151.101.64.223 (151.101.64.223): icmp_seq=2 ttl=55 time=21.6 ms 

with not working pip install:

 => => # ut. (read timeout=5.0)")': /simple/aiofiles/                                                                                                                                                      
 => => # Starting new HTTPS connection (2): pypi.org:443                                                                                                                                                   
 => => # Incremented Retry for (url='/simple/aiofiles/'): Retry(total=3, connect=None, read=None, redirect=None, status=None)                                                                              
 => => # WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed o
 => => # ut. (read timeout=5.0)")': /simple/aiofiles/                                                                                                                                                      
 => => # Starting new HTTPS connection (3): pypi.org:443   

lyf2000 avatar Feb 13 '24 12:02 lyf2000