在 Docker 中为 SQL-server 创建容器时的错误消息(具有管理员权限):
“... 来自守护进程的错误响应:驱动程序在端点 SQL19b 上编程外部连接失败(cc372bb961fb8178c2461d26bf16c4232a62e01c5f48b8fcec273370506cc095):启动用户区代理时出错:侦听 tcp.0bid:104 的访问权限是通过套接字:0bid:104 访问绑定的方式,尝试通过套接字访问 0。 .”
日志文件摘录:
[21:39:17.692][ApiProxy ][Info ] time="2019-08-01T21:39:17+02:00" msg="proxy >> HEAD /_ping\n"
[21:39:17.696][ApiProxy ][Info ] time="2019-08-01T21:39:17+02:00" msg="proxy << HEAD /_ping (3.9929ms)\n"
[21:39:17.699][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[21:39:17.742][ApiProxy ][Info ] time="2019-08-01T21:39:17+02:00" msg="proxy >> DELETE /v1.40/containers/22810276e261\n"
[21:39:17.758][ApiProxy ][Info ] time="2019-08-01T21:39:17+02:00" msg="proxy << DELETE /v1.40/containers/22810276e261 (16.129ms)\n"
[21:39:17.759][GoBackendProcess ][Info ] error CloseWrite to: The pipe is being closed.
[21:39:27.866][ApiProxy ][Info ] time="2019-08-01T21:39:27+02:00" msg="proxy >> HEAD /_ping\n"
[21:39:27.869][ApiProxy …Run Code Online (Sandbox Code Playgroud) 我在 Windows 10 中启用了 hyper-v。当我检查排除的端口时,我得到:
C:\> netsh interface ipv4 show excludedportrange protocol=tcp
Protocol tcp Port Exclusion Ranges
Start Port End Port
---------- --------
5357 5357
9800 9800
9801 9801
49671 49770
49871 49970
50000 50059 *
61117 61216
61220 61319
61902 62001
* - Administered port exclusions.
Run Code Online (Sandbox Code Playgroud)
为什么 Hyper-V 保留这些端口?
受管端口排除(即范围 50000-50059 )与其他端口排除有何不同?
例如,当我尝试在 golang 中使用 net.Listen() ping 所有这些端口时,除 50000-50059 之外的所有端口都返回错误:
listen tcp 127.0.0.1:9801: bind: An attempt was made to access a socket in a way forbidden by its access …Run Code Online (Sandbox Code Playgroud) 我试图运行 docker 应用程序...
\n\xce\xbb docker run -p 80:80 -p 8080:8080 --name billingapp sotobotero/udemy-devops:0.0.1\ndocker: Error response from daemon: Ports are not available: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.\nRun Code Online (Sandbox Code Playgroud)\n我试图应用这个答案...\n /sf/answers/4569185841/
\n\xce\xbb netsh int ipv4 add excludedportrange protocol=tcp startport=80 numberofports=1\nThe process cannot access the file because it is being used by another process.\nRun Code Online (Sandbox Code Playgroud)\n我正在尝试使用/sf/answers/4633900911/
\nD:\\Programs\\cmder\\config\\profile.d\n\xce\xbb docker container rm billingapp\nbillingapp\n\nD:\\Programs\\cmder\\config\\profile.d\n\xce\xbb net stop winnat\nThe …Run Code Online (Sandbox Code Playgroud)