An attempt was made to access a socket in a way forbidden by its access permissions
时间: 2023-08-26 20:08:20 浏览: 205
错误提示"An attempt was made to access a socket in a way forbidden by its access permissions"通常是由于端口被占用导致的。这个错误提示表明Nginx无法访问指定的端口,因为该端口的访问权限被限制了。\[1\]
要解决这个问题,可以按照以下步骤进行操作:
1. 打开命令提示符(cmd)并以管理员身份运行。
2. 使用命令"netstat -ano"查看80端口的使用情况。\[3\]
3. 使用命令"netstat -ano | findstr "80""找到占用80端口的进程的PID(Process ID)。\[3\]
4. 使用命令"net stop http"强制停止占用80端口的进程。\[3\]
5. 如果无法终止PID为4的进程,可能是80端口被系统程序占用。可以在"此电脑"->"管理"->"服务"中找到"World Wide Web发布服务",停止并将启动方式设置为手动。\[3\]
6. 如果安装了SQL Server,请关闭部分SQL服务。\[3\]
7. 使用命令"netstat -ano"再次检查是否还有80端口。如果已经没有了80端口,重新启动Nginx即可。\[3\]
8. 如果以上方法都无法解决问题,可以尝试更改Nginx监听的端口号。在nginx.conf文件中将监听的端口80修改为其他未被占用的端口,例如8090,然后重新启动Nginx。\[3\]
通过以上步骤,您应该能够解决"An attempt was made to access a socket in a way forbidden by its access permissions"错误,并成功启动Nginx服务。
#### 引用[.reference_title]
- *1* [Nginx无法启动 -10013: An attempt was made to access a socket in a way forbidden by its access ...](https://blog.csdn.net/ningfeng8899/article/details/128896444)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [解决:An attempt was made to access a socket in a way forbidden by its access permissions和无法终止 ...](https://blog.csdn.net/zch981964/article/details/128266227)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文