【发布时间】:2021-08-11 10:15:04
【问题描述】:
我正在尝试将颤振连接到我的烧瓶后端。但是颤振会出现以下错误
Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 50512
我什至尝试使用我的 ipv4 地址甚至 localhost 甚至主机 0.0.0.0 并尝试了各种端口,但每次端口都在颤振错误中不断变化。有时候是这样的
Unhandled Exception: SocketException: OS Error: Connection refused, errno = 111, address = 127.0.0.1, port = 39223
谁能建议我如何解决这个问题。这是我的烧瓶代码
port = int(os.environ.get('PORT', 5000))
if __name__ == '__main__':
app.run(debug=True, host='127.0.0.1', port=port) // changing to 0.0.0.0 also doesn't work neither different ports
我可以连接到 Heroku 服务器,但不能连接到 localhost。
【问题讨论】:
-
您是在 Flutter 网页版还是移动版上试用?
-
我正在使用我的手机通过 USB 数据线连接
-
是的,我有互联网...我可以连接到 heroku 服务器,但我知道 localhost 有什么问题
-
我在运行应用程序时得到这个...正在连接到 ws://127.0.0.1:52173/sometexts 的 VM 服务