您的位置: 首页 > 文章 > golang ——An existing connection was forcibly closed by the remote host. golang ——An existing connection was forcibly closed by the remote host. 分类: 文章 • 2024-04-05 10:15:54 在进行网络连接时,出现An existing connection was forcibly closed by the remote host.,客户端的(或非服务器端的文件的错误),在请求连接处出现问题: 1.查看协议是否相同 查看服务器端连接的协议与客户端是否相同(同为tcp或其他)2.使用的端口是否被占用 在win+R,输入cmd后输入 netstat -aon|findstr “8888” 其中8888为所需要查询的端口号,然后再对照着查找任务管理器的PID中断相应程序或更换代码中书写的服务端口 当然,这只是列举的一个例子,这是我自己跑的程序