본문 바로가기

devlog

Docker Compose up ERROR: for webapp Cannot start service webapp: Ports are not available: listen tcp 127.0.0.1:8000: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

개발환경

  • WSL 2 - Ubuntu-20.04 Distribute 
  • anaconda 4.9.2
  • Python 3.8.10
  • PyCharm 2021.2 Professional Edition
  • docker-compose 1.29.2, build 5becea4c / compose file 3.9
  • Docker Engine 20.10.7, build f0df350

발생

docker-compose up 하면 발생

오류 stack strace

ERROR: for webapp  Cannot start service webapp: Ports are not available: listen tcp 127.0.0.1:8000: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

원인

아직 제대로 된 원인 파악불가. 예상되는 문제점은 같은 *:8000이 이미 바인딩 된 상태로 다른 도메인에서 같은(8000) 포트로 바인딩을 또 안되는 같은데 확실하지 않다.

 

해결

AS-IS

ports:

  - "127.0.0.1:8000:8000"

TO-BE

ports:

  - "127.0.0.1:8010:8000"

참고 링크
Unable to bind ports: Docker-for-Windows & Hyper-V excluding but not using important port ranges
Ports are not available: listen tcp 0.0.0.0:3000: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

 

 

'devlog' 카테고리의 다른 글

목적의식 있는 연습을 통한 효과적인 학습  (0) 2022.01.17