influxdb - 连接到 InfluxDB 的远程连接被拒绝
问题描述
我在 Xubuntu 机器上有一个正在运行的 Influxd 服务器,我想通过互联网从另一台(Ubuntu)计算机进行查询(因此,客户端和服务器位于不同的 LAN 中)。我在路由器上的 influxdb 和 portforwardport 8086
上设置了身份验证,但我无法访问服务器。
输入:
curl -G http://xx.xxx.xx.xxx:8086/query -u admin:admin --data-urlencode "q=SHOW DATABASES"
(xx.xxx.xx.xxx is the server public ip address)
输出:
curl: (7) Failed to connect to xx.xxx.xx.xxx port 8086: Connection refused
相同的 curl 查询,如果在服务器上运行localhost
而不是xx.xxx.xx.xxx
返回正确的结果。
输出:
{
"results":[{
"statement_id":0,
"series":[{
"name":"databases",
"columns":["name"],
"values":[["_internal"],["test"]]
}]
}]
}
我究竟做错了什么?
解决方案
推荐阅读
- google-apps-script - Web App 脚本无法由其他用户启动
- c++ - 尝试编译某些代码时,OpenCV“不是'cv'的成员”错误
- azure - 使用 ADF 将文件从 ADLGen2 下载到本地服务器
- excel - 数据模型中的数据透视表显示空白行,但源数据中没有
- openam - Forgerock OpenAM
- scala - 地图视图(
) 在斯卡拉 - reactjs - 反应本机侧抽屉不关闭
- javascript - 如何使用正则表达式不匹配其中包含某些标签的 HTML 标签?
- php - Pecl 无法在 macOS Big Sur 上编译 Imagick 扩展,如何解决?
- django - 用'|'转换django url (或)正则表达式到现代 Django 路径