[英]How to solve google chrome "Failed to load resource: net::ERR_CONNECTION_REFUSED" issue in windows 10 when server is running on Ubuntu 18.04?
I am trying to run this project on Ubuntu 18.04 server.我正在尝试在 Ubuntu 18.04 服务器上运行这个项目。 I am running both server and client on this machine.我在这台机器上同时运行服务器和客户端。 Then from windows 10 with port 9000 I am getting access to client in my chrome browser at http://localhost:8000/#/然后从端口为 9000 的 Windows 10 中,我可以在我的 chrome 浏览器中访问客户端http://localhost:8000/#/
The browser loads the project but the problem is I can't log into the website with trusted account and some other data do not get loaded .浏览器加载项目,但问题是我无法使用受信任的帐户登录网站,并且其他一些数据没有加载。 When I see browser console I see an error message saying:当我看到浏览器控制台时,我看到一条错误消息:
Failed to load resource: net::ERR_CONNECTION_REFUSED无法加载资源:net::ERR_CONNECTION_REFUSED
This is the server setting:这是服务器设置:
This is the client setting and putty setting to connect to client.这是连接到客户端的客户端设置和腻子设置。
VPN has been used to connect to server via PuTTY . VPN 已被用于通过 PuTTY 连接到服务器。
The error message in browser:浏览器中的错误信息:
Could anyone shed some light on this issue?任何人都可以对这个问题有所了解吗? Is it related to windows 10 or VPN or some other issues?它与 Windows 10 或 VPN 或其他一些问题有关吗? I followed some steps from here https://www.ionos.com/digitalguide/hosting/technical-matters/err-connection-reset/我从这里遵循了一些步骤https://www.ionos.com/digitalguide/hosting/technical-matters/err-connection-reset/
By default, the Flask development environment uses 127.0.0.1 (localhost), which restricts access to process on the same host (except for VMs/containers, which aren't a factor here).默认情况下,Flask 开发环境使用 127.0.0.1 (localhost),它限制对同一主机上的进程的访问(VM/容器除外,这不是这里的一个因素)。
To access Flask from outside of localhost (eg, from your Windows 10 machine), use the IP address 0.0.0.0.要从本地主机之外(例如,从您的 Windows 10 机器)访问 Flask,请使用 IP 地址 0.0.0.0。 (You can pass it to run()
, or via a command line option of the flask
command. (您可以将其传递给run()
,或通过flask
命令的命令行选项。
However, do note the warnings about (not) using the development environment for production use.但是,请注意有关(不)将开发环境用于生产用途的警告。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.