ERR_CONNECTION_REFUSED仅在浏览器中使用 [英] ERR_CONNECTION_REFUSED exclusively in browsers

查看:261
本文介绍了ERR_CONNECTION_REFUSED仅在浏览器中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的本地计算机(mac OS High Sierra)上的一个网站上工作,并在网站上添加了一些重定向 .htaccess 文件(以便从中获取图像)远程服务器而不是下载它们)。在此之后,我似乎无法再通过Chrome浏览器访问该网站。 Chrome会通过 ERR_CONNECTION_REFUSED 来回答通往远程服务器的任何网址。

I was working on a website on my local computer (mac OS High Sierra) and had put some redirects in the websites .htaccess file (in order to get images from the remote server instead of downloading them). After this it seemed that I could no longer access the website from my Chrome browser. Chrome would answer to any URL leading to the remote server with ERR_CONNECTION_REFUSED.

我在我的计算机上尝试过其他浏览器等如Firefox,Chrome Canary,Chromium和Opera。他们都无法提供连接。

I tried other browsers on my computer such as Firefox, Chrome Canary, Chromium and Opera. None of them could provide a connection.

接下来,我通过同一台计算机上的TOR-Browser检查了不同的互联网访问,无论我是否可以访问该网站,它都有效。

Next I checked with a different internet access via TOR-Browser on the same computer whether I could access the website, and it worked.

接下来我通过终端检查我是否可以使用 ping 连接到远程服务器, nslookup traceroute 。所有都按预期连接到服务器。

Next I checked via Terminal whether I could connect to the remote server with ping, nslookup and traceroute. All connecting to the server as expected.

我搜索了这个问题的可能解决方案但到目前为止找不到。我曾经读过,重置DNS缓存可以帮助并尝试 sudo killall -HUP mDNSResponder 但它没有。

I googled up possible solutions to this problem but could not find one so far. I had read that resetting the DNS cache could help and tried sudo killall -HUP mDNSResponder but it did not.

我没有编辑 / etc / hosts 文件;重启计算机没有帮助;将 .htaccess 重置为之前的状态没有帮助;重置浏览器中的缓存没有帮助。

I did not edit the /etc/hosts file; a restart of the computer did not help; a reset of the .htaccess to the previous state did not help; resetting the caches in the browsers did not help.

如何通常再次从我的浏览器访问远程网站?

How can I access the remote website from my browsers normally again?

EDIT1:相关问题:无法加载资源:net :: ERR_CONNECTION_REFUSED仅适用于来自Instagram API的选择性图片

Related question: Failed to load resource: net::ERR_CONNECTION_REFUSED for only selective images from instagram API

EDIT2:大约一天后,我又能够访问远程网站即使将重定向放入 .htaccess 文件,也不会再发生 ERR_CONNECTION_REFUSED 事件。所以我觉得在我的计算机上进行某种缓存会阻止浏览器访问远程网站。但是我不知道是什么原因造成了错误信息,它可能是什么样的缓存。

After about one day I was able to access the remote website again with no further incidents of ERR_CONNECTION_REFUSED even after putting the redirects into the .htaccess file. So it seems to me of being some sort of caching on my computer which prevents the browsers from accessing the remote website. However I have no clue what caused the error message in the first place and what kind of cache it might be.

推荐答案

不久之后EDIT2当我能够再次访问远程网站时, ERR_CONNECTION_REFUSED 再次出现 - 这次我测试了另一台具有相同互联网连接的设备,我也遇到了连接错误。现在我认为它与路由器和/或它的防火墙有关 - 而不是ISP,因为我可以使用shell命令(如上所述)连接到远程网站。对远程网站的图像请求似乎导致路由器阻止来自浏览器的进一步访问,可能作为类似于本文中的情况的安全措施 https://www.cnet.com/forums/discussions/can-t-access- a-specific-website-going-thru-my-router-274637 /

Shortly after EDIT2 when I was able to access the remote website again, the ERR_CONNECTION_REFUSED appeared again - this time I tested another device with the same internet connection and I had encountered the connection error too. Now I believe it has something to do with the router and/or it's firewall - not the ISP since I could connect to the remote website with shell commands (named above). The image requests to the remote website seem to cause the router to block further access from browsers, probably as a security measure similar to the situation in this article https://www.cnet.com/forums/discussions/can-t-access-a-specific-website-going-thru-my-router-274637/

这篇关于ERR_CONNECTION_REFUSED仅在浏览器中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆