connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 61.182.227.80, server: xxxxx.com, request: "POST /prod-api/system/xxx/xxxx HTTP/1.1", upstream: "http://xx.xx.xx.xx:xxxx/system/", host: "xx.xx.xx.xx:xx", referrer: "http://xx.xx.xx.xx:xx/index" 這個報錯大致意思是計算機拒絕訪問這個鏈接。困擾了好久,經(jīng)過網(wǎng)上搜索才發(fā)現(xiàn)是nginx配置文件問題,發(fā)布這篇文章,希望各位避免踩坑!
看一下nginx的報錯日志:
問題出在了nginx.conf這個配置文件里:
win+R輸入cmd,調(diào)出dos面板,再輸入命令-ipconfig查看IPv4地址 ,把這個IPv4地址與配置文件IP地址替換,端口號改成和tomcat一樣的端口號就行。
?
?重啟nginx,OK,問題解決。(項目部署到服務器上的出現(xiàn)這種問題也是類似步驟)
——————————————————————文章來源:http://www.zghlxwxcb.cn/news/detail-587231.html
如有不對地方,歡迎各位大佬留言及時糾正?。?/strong>文章來源地址http://www.zghlxwxcb.cn/news/detail-587231.html
到了這里,關(guān)于connect() failed (10061: No connection could be made because the target machine actively refused it)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!