TroubleShooting/Docker
[TroubleShooting / Docker] An attempt was made to access a socket in a way forbidden by its access permissions.
머지?는 병합입니다
2024. 9. 1. 02:59
Docker 에서 포트 번호를 선 점유해서 발생하는 현상이다
powershell 에서 다음 명령어를 치면
netsh interface ipv4 show excludedportrange protocol=tcp
netsh interface ipv4 show excludedportrange protocol=tcp
아래처럼 사용 불가능한 포트번호들이 나온다.
도커를 끄고 재부팅후 같은 명령어를 실행한다.
재부팅을 후 같은 명령어를 넣으면 아래 처럼 범위가 훨씬 좁아졌다
그 다음 powershell 을 관리자로 실행시킨다
netsh int ipv4 add excludedportrange protocol=tcp startport=8000 numberofports=1 store=persistent
netsh int ipv4 add excludedportrange protocol=tcp startport=8000 numberofports=1 store=persistent
startport=8000 자리에 원하는 포트 번호를 넣으면 된다.
그러면 다른 리소스에서 8000 포트는 못가져가도록 미리 처리를 해준다