nboding opened a new issue #2409: [BUG] zk中masters注册ip127.0.0.1
URL: https://github.com/apache/incubator-dolphinscheduler/issues/2409
 
 
   *For better global communication, please give priority to using English 
description, thx! *
   
   **Describe the bug**
   bug : zookeeper masters znode list ip address is 127.0.0.1,instead of wanted 
ip eth0 or eth1
   chinese 
describe:zk中注册的master信息ip地址是127.0.0.1,而不是配置的域名所对应或者解析的ip地址。官网文档中建议在/etc/hosts中注释掉127.0.0.1这条解析,我觉得不合适。
   
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1、zookeeper znode  info:
   [zk: localhost:2181(CONNECTED) 6] ls /dolphinscheduler/masters
   [127.0.0.1]
   2、ds install_config info:
   installPath=/usr/local/dolphinscheduler
   deployUser=dolphinscheduler
   ips=ds1
   sshPort=60022
   masters=ds1
   workers=ds1
   alertServer=ds1
   apiServers=ds1
   3、/etc/hosts info
   $cat /etc/hosts
   127.0.0.1   localhost hadoop1
   10.3.57.15   ds1 hadoop1
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   
   **Which version of Dolphin Scheduler:**
   1.2.1
   
   **Additional context**
   
   
   **Requirement or improvement
   - Please describe about your requirements or improvement suggestions.
   bug fix try:
   1、confirm hostname
   $hostname
   hadoop1
   2、hostname -i
   127.0.0.1 10.3.57.15
   3、edit /etc/hosts,delete hadoop1 from 127.0.0.1 record
   $cat /etc/hosts
   127.0.0.1   localhost
   10.3.57.15   ds1 hadoop1
   4、hostname -i
   10.3.57.15
   it is ok
   
   chinese describe:
   hostname命令返回的服务器主机名,hostname -i 返回的是服务器主机名在/etc/hosts中所有匹配的ip地址   
所以我把/etc/hosts中127.0.01中的主机名删掉,只保留内网ip的解析就可以了,没必要把127.0.0.1整条注释掉, 
只要hostname命令返回值 在/etc/hosts中对应的内网ip正确就可以,ds程序肯定是取了第一个值,我理解上ds程序不应该用hostname -i 
取值这样有点问题,因为好多公司服务器的主机名都是运维配置的,感觉还是直接取配置文件的域名解析的返回ip更准确,或者znode中存域名信息而不是ip addr。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to