본문 바로가기
Development/Docker

[Docker] WARNING: Retrying after connection broken by NewConnectionError 문제 해결

by 성딱이 2022. 5. 4.
반응형
Error 상황 및 Message 

1. Container 내부에서 pip로 특정 패키지를 설치하려 했으나, Delay가 걸리며 Warning이 뜸

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 0x7f8f2dd10320>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/

 

2. Container 재기동 하려 했으나, 오류 발생

(base) Juhyeon@Juhyeon_PC:/jh/rb/BASE/source/preproc$ docker run -it --rm --gpus all -v "/home/jh:/home/jh" -p 8989:8989 jh/tensorflow2:v1.1
docker: Error response from daemon: driver failed programming external connectivity on endpoint tender_lumiere (357e439c83044a5fa5e3a6440e1cd0802c402aab58d77b1a4d7324f856c2176b):  (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 8989 -j DNAT --to-destination 172.17.0.2:8989 ! -i docker0: iptables: No chain/target/match by that name.
 (exit status 1)).

 

 

 

원인 : Docker 사용중에 방화벽의 설정이 변경이 되었음

 

 

해결
1. Clear All Chains
$ sudo iptables -t filter -F
$ sudo iptables -t filter -X

2. Then restart Docker Service:
$ systemctl restart docker

 

 

출처 : https://stackoverflow.com/questions/31667160/running-docker-container-iptables-no-chain-target-match-by-that-name

 

Running docker container : iptables: No chain/target/match by that name

I'm trying to run a container but I get the following issue : Error response from daemon: Cannot start container b005715c40ea7d5821b15c44f5b7f902d4b39da7c83468f3e5d7c042e5fe3fbd: iptables failed:

stackoverflow.com

 

 

 

 

 

반응형

댓글