Roy-Try-Catch
← Back to list

【Docker】Docker 啟動容器時連接埠被佔用:An attempt was made to access a socket in a way forbidden by its access permissions

Roy • Updated 2026-10-15 15:38:43

我想啟動之前使用過的一個容器,卻出現以下錯誤訊息:

Error invoking remote method 'docker-start-container': Error: (HTTP code 500) server error - Ports are not available: listen tcp 0.0.0.0:8443: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

大部分的解決方案都是執行 docker restart {container}。

容器確實重新啟動成功,但服務仍然無法使用。

查了資料之後發現,需要先關閉 Windows NAT 服務:

net stop winnat

docker start container_name

net start winnat

Comments

No comments yet.

請先登入