connect ECONNREFUSED 192.168.1.213:8900
时间: 2023-08-14 19:03:08 浏览: 303
解决Node.js使用MySQL出现connect ECONNREFUSED 127.0.0.1:3306的问题
回答: 在你提供的引用内容中,我们可以得知connect函数尝试将当前套接字从CLOSE状态转移到SYN_SENT状态,然后转移到ESTABLISHED状态。但是在你的问题中出现了connect ECONNREFUSED 192.168.1.213:8900的错误。这个错误表示连接被拒绝,可能是因为目标主机在指定的IP地址和端口上没有正在监听的服务。你可以尝试使用命令"firewall-cmd --query-port=27017/tcp"来检查27017端口是否开放,如果该端口没有开放,可以使用"firewall-cmd --add-port=27017/tcp"来放开该端口。此外,还可以使用非阻塞的套接字进行连接,并使用select(2)或poll(2)来检查连接是否完成。可以使用getsockopt(2)来读取SO_ERROR选项,以确定连接是成功完成还是失败。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [tcp connect与udp connect](https://blog.csdn.net/wWX336815/article/details/84101761)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *2* [mongodb远程连接出现connect ECONNREFUSED(连接被拒绝)错误的解决方法](https://blog.csdn.net/qq_18404993/article/details/121103912)[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^v92^chatsearchT3_1"}} ] [.reference_item]
- *3* [TCP之控制connect超时](https://blog.csdn.net/farmwang/article/details/62436445)[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^v92^chatsearchT3_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文