Container 가 DB 에 도달 못 해 — 이제 어쩌지?
서비스 간 network 문제는 두 번째로 흔한 디버깅 카테고리. 진단 도구를 앱 image 에 깔지 마. 전용 디버그 image 써 — nicolaka/netshoot 가 정석. curl, dig, nslookup, tcpdump, mtr 다 들어있어.
~14 min · debug, networking
서비스 간 network 문제는 두 번째로 흔한 디버깅 카테고리. 진단 도구를 앱 image 에 깔지 마. 전용 디버그 image 써 — nicolaka/netshoot 가 정석. curl, dig, nslookup, tcpdump, mtr 다 들어있어.
# Drop a debug container onto the same network as the broken service
docker run --rm -it --network app-net nicolaka/netshoot
# Inside:
nslookup api # does DNS resolve?
curl -v http://api:8000/health # does HTTP work?
ping -c 2 db # are we even on the same network?
tcpdump -i any 'port 5432' # what's actually crossing the wire?curl -v 가 예상 응답 — 확인. 가장 유용한 명령 4개 캡처.아직 댓글이 없어요. 첫 댓글을 남겨보세요.