TDengine icon indicating copy to clipboard operation
TDengine copied to clipboard

UTL can't get card name from ip:0.0.0.0

Open maikebing opened this issue 7 years ago • 6 comments

07/16 22:35:00.468980 7fe5dd4afb40 ERROR UTL can't get card name from ip:0.0.0.0

场景是这样: 阿里云服务器 安装部署后 ifconfig出来的内网网卡地址客户端可以使用。但是外网客户端不能连接, 报这个错。

maikebing avatar Jul 16 '19 14:07 maikebing

对,只能绑定到实际存在的网卡上,如果需要外网访问,可以采用restful接口。 实际场景,还是比较少不同局域网访问的。

guanshengliang avatar Jul 16 '19 15:07 guanshengliang

我们部署了 2个docker, 在docker直接互相访问都话, 设置这些ip无效 ,请问这块应该咋个设置 @guanshengliang 我们绑定都就是实际网卡都ip,也不行, 另外 restful 访问这里,性能会查很多么, 写入的话。 我们用 python和go今天尝试了,访问,python3 connector调试 同一台里面用 127.0.0.1 连接成功,但是绑定实际ip在内部开发环境,其他人就写入不成功。 这个是撒情况。 。 本地的docker 6020, 6030, 6035 都打开了。。。。。

c8dd55863567 coinphd/taos "./build/bin/taosd -…" 5 minutes ago Up 5 minutes 0.0.0.0:6020->6020/tcp, 0.0.0.0:6030->6030/tcp, 0.0.0.0:6035->6035/tcp, 0.0.0.0:10322->22/tcp taos_taosubuntu_1

Internal IP address of the server, which can be acquired by using ifconfig command.

internalIp 192.168.1.103

client local IP

localIp 192.168.1.103

这里

07/16 15:40:13.932851 7f11e26d4b80 ERROR UTL can't get card name from ip:192.168.1.103 07/16 15:40:13.944203 7f11e26d4b80 ERROR UTL failed to bind udp socket: 99 (Cannot assign requested address), 192.168.1.103:0 TSDB error: App error

xinqiyang avatar Jul 16 '19 15:07 xinqiyang

关于服务器端的taos 的 taos.cfg的配置文件

########################################################

TDengine Configuration

Any questions, please email [email protected]

########################################################

Internal IP address of the server, which can be acquired by using ifconfig command.

internalIp 192.168.1.113

client local IP

localIp 192.168.1.113

data file's directory

dataDir /var/lib/taos

log file's directory

logDir /var/log/taos

http service port, default tcp[6020]

httpPort 6020

这里这里的,是配置我们的网卡ip么, 我们用的是docker部署,是docker的机器的固定内外ipOK么?

xinqiyang avatar Jul 17 '19 05:07 xinqiyang

您可以提供下您具体的场景吗?比如几台host机器,host机器的IP信息,docker的网络配置以及您希望的工作场景。另外这里有一篇博客,不知道有没有作用。

hzcheng avatar Jul 17 '19 08:07 hzcheng

@maikebing Try configure your InternalIp in file /etc/taos/taos.cfg with the local IP of your cloud server. For example, on one of my cloud server (试试在/etc/taos/taos/.cfg 中配置一下InternalIp这个参数,配置成云服务器的内网IP,即ifconfig看到的那个。如果有多张网卡,则此方法可能不适用,但一般共有云上不会发生。示例如下:) image

Then from your local machine, you can access the taosd service deployed on cloud by specifying the server's publicIP (say your cloud server's publicIP is 106.0.0.1): in your terminal, lauch the taos client using taos -h 106.0.0.1. The the taos client will try to connect to the cloud server with the default user name and pass word. If successfully connected, you should be able to see the welcome messages. (然后从本地机器连接部署了taosd服务的云服务器,比如云服务器的公网ip为106.0.0.1,则在命令行中使用命令taos -h 106.0.0.1来连接到服务。注意此时没有指定用户名和密码,会用默认值登陆。如果成功登陆,应该就能看到客户端的欢迎信息)

johnnyhou327 avatar Jul 18 '19 12:07 johnnyhou327

感谢

maikebing avatar Jul 20 '19 00:07 maikebing