윈도우 10 포트 중복 문제 해결법 (라라곤, 도커, bitvise)

|

메세지

image 44
윈도우 10 포트 중복 문제 해결법 (라라곤, 도커, bitvise) 6
  • OS 10013 액세스 권한에 의해 숨겨진 소켓에 액세스를 시도했습니다.
    AH00072: make_sock: could not bind to address [::]:포트번호
  • AH00451: no listning sockets available, shutting down
  • AH00015:Unable to open logs

발생 위치

  • 라라곤 (Laragon), XAMPP
  • 도커 (Docker)
  • 비트바이즈 (Bitvise)

포트를 사용하는 모든 곳에서 일어난다고 보면 됩니다

답안

전체 검색

netsh interface ipv4 show excludedportrange protocol=tcp
image
윈도우 10 포트 중복 문제 해결법 (라라곤, 도커, bitvise) 7

제외 포트를 검색하면 위와 같이 막힌 것을 확인할 수 있습니다.
winnat 이란 녀석이 포트 제외(block)를 자동으로 관리해주는데 재부팅을 하여 초기화해야 합니다.

winnat 멈추기

image 1
윈도우 10 포트 중복 문제 해결법 (라라곤, 도커, bitvise) 8
net stop winnat

포트번호를 열어주면 해결됩니다.

image 3
윈도우 10 포트 중복 문제 해결법 (라라곤, 도커, bitvise) 9
docker start container_name
net start winnat

도커를 실행하고 다시 실행하면

에러 메세지

  • Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:3306 -> 0.0.0.0:0: listen tcp 0.0.0.0:3306: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

윈도우 WSL2 Ubuntu 환경에서 라라벨 세일을 실행시켰을 때 생긴 문제입니다.

image 2
윈도우 10 포트 중복 문제 해결법 (라라곤, 도커, bitvise) 10

원인

포트 번호가 이미 사용중일거라 생각하고 검색해보았는데
해당 포트 전체가 막혔을 줄은 몰랐습니다.

현재 사용중인 포트

전체 포트

netstat -a -o

일부 포트

netstat -aon | findstr 3306

에러 내용

2023-02-24T07:20:02.480407Z 0 [ERROR] [MY-010257] [Server] Do you already have another mysqld server running on port: 3306 ?
2023-02-24T07:20:02.480900Z 0 [ERROR] [MY-010119] [Server] Aborting
2023-02-24T07:20:03.822941Z 0 [System] [MY-010910] [Server] C:\laragon\bin\mysql\mysql-8.0.30-winx64\bin\mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2023-02-24T07:20:25.318431Z 0 [Warning] [MY-010097] [Server] Insecure configuration for --secure-file-priv: Current value does not restrict location of generated files. Consider setting it to a valid, non-empty path.
2023-02-24T07:20:25.318486Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2023-02-24T07:20:25.318518Z 0 [System] [MY-010116] [Server] C:\laragon\bin\mysql\mysql-8.0.30-winx64\bin\mysqld (mysqld 8.0.30) starting as process 10424
2023-02-24T07:20:25.342559Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2023-02-24T07:20:25.848936Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2023-02-24T07:20:26.447098Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2023-02-24T07:20:26.447532Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2023-02-24T07:20:26.448862Z 0 [ERROR] [MY-010262] [Server] Can't start server: Bind on TCP/IP port: 액세스 권한에 의해 숨겨진 소켓에 액세스를 시도했습니다.

참조

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다

클릭하여 복사