windows 10 20h1 에서 wsl2 docker를 사용중인데

8081포트에 bind 하는 프로그램이 10013 bind 에러를 내면서 실행이 되지 않았다.

포트를 사용중인 프로그램은 분명 없었는데


docker에서 elk를 테스트 해보려고 구동 했는데 역시 실행되지 않았다.

Creating network "docker-elk_elk" with driver "bridge"
Creating docker-elk_elasticsearch_1 ... error

ERROR: for docker-elk_elasticsearch_1  Cannot start service elasticsearch: Ports are not available: listen tcp 0.0.0.0:9200: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

ERROR: for elasticsearch  Cannot start service elasticsearch: Ports are not available: listen tcp 0.0.0.0:9200: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
ERROR: Encountered errors while bringing up the project.

intellij를 실행 했는데 bind 오류가 발생하면서 실행되지 않았다.

아무리 포트를 사용중인 프로그램을 찾아봐도 포트는 사용중이지 않았다.


intellij 오류창의 링크를 접속해보니 나와 같은 문제점이 있는 분이 있었고 그 아래 답변이 하나 있었다.


https://intellij-support.jetbrains.com/hc/en-us/articles/360007568559


나와 동일한 오류를 겪고 계신분의 덧글

On Windows "netsh winsock reset" in the Administrator console followed by the reboot should help. Also try disabling the antivirus/firewall and verify that the network configuration is correct.

관리자 창을 띄우고  명령을 실행하고 재부팅 하니 intellij와 개발 중인 프로그램은 실행되었다.

다만 도커는 아직도 안된다. 이건 조금 더 삽질을 해봐야 할 것 같다.

It's very uncommon when all 50 ports in this range are not available on the system.

Please provide the output from the following command in the Administrator console:

netsh interface ipv4 show excludedportrange protocol=tcp

Does it list all the ports in the range used by IntelliJ IDEA?

One of the possible reasons is a network misconfiguration caused by the Hyper-V. You can try to temporary disable Hyper-V Windows feature and see if it helps. Enabling it back should not cause the same problem again.

netsh 명령을 해보니 포트 목록에 9200이 포함되어 있다. hyper-v 관련 문제로 보인다.

그아래 다른 덧글을 좀 더 살펴보니 hyper-v가 예약한 포트 목록 때문으로 보인다고 한다.

관리자 콘솔에서 다음 명령 실행


netsh int ipv4 set dynamicport tcp start=49152 num=16383
netsh int ipv4 set dynamicport udp start=49152 num=16383

만세!! 오늘의 삽질 끝!


github의 관련 이슈
https://github.com/docker/for-win/issues/3171



'지식창고 > 삽질' 카테고리의 다른 글

vcpkg 2020.06 업데이트 static link 방법 달라진점  (0) 2020.06.17
vcpkg 설치 및 사용설정  (0) 2020.06.05
윈도우10 시작 메뉴 문제  (0) 2016.10.25
phpstorm gulp 설정  (0) 2016.07.01