【发布时间】:2017-03-28 15:53:11
【问题描述】:
对于使用任何类型的 Web 应用程序都很陌生,我一直在尝试慢慢构建 Facebook Messenger Bot。当我尝试使用 ngrok 时,我无法访问给定的地址,即:
ngrok http 5000
是我在命令行中输入的内容,它正在返回:
ngrok by @inconshreveable
Session Status online
Version 2.1.18
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://ea986ca5.ngrok.io -> localhost:5000
Forwarding https://ea986ca5.ngrok.io -> localhost:5000
Connections ttl opn rt1 rt5 p50 p90
0 0 0.00 0.00 0.00 0.00
但是当我按照 Facebook 开发者页面的要求获取地址“https://ea986ca5.ngrok.io”时,它会说:
The connection to http://ea986ca5.ngrok.io was successfully tunneled to your
ngrok client, but the client failed to establish a connection to the local
address localhost:5000.
Make sure that a web service is running on localhost:5000 and that it is a
valid address.
The error encountered was: dial tcp [::1]:5000: connectex: No connection
could be made because the target machine actively refused it.
我的本地端口有问题吗?谢谢!
【问题讨论】:
-
你真的可以访问 localhost:5000 吗?
-
既然你提到了,我不能?为什么会这样?
-
你有服务器监听那个端口吗?
-
不,好像没有,我该如何改变?
-
或者我最好只使用正在监听的端口?
标签: https ngrok http-tunneling