AbstractZKClient:[148] - register failure , MASTER server already started on host : 127.0.0.1
问题:
[ERROR] 2021-07-29 11:25:14.301 org.apache.dolphinscheduler.service.zk.AbstractZKClient:[148] - register failure , MASTER server already started on host : 127.0.0.1
排错:
通过ifconfig查看
bond1: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1500
inet 221.221.221.11 netmask 255.255.255.0 broadcast 221.221.221.255
inet6 fe80::e63d:1aff:fe2a:d9b4 prefixlen 64 scopeid 0x20
ether e4:3d:1a:2a:d9:b4 txqueuelen 1000 (Ethernet)
RX packets 28972887 bytes 5807596963 (5.4 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28598903 bytes 3512311479 (3.2 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
em3: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether e4:3d:1a:2a:d9:b4 txqueuelen 1000 (Ethernet)
RX packets 12587671 bytes 2148184418 (2.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 28459725 bytes 3494524151 (3.2 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16
em4: flags=6211<UP,BROADCAST,RUNNING,SLAVE,MULTICAST> mtu 1500
ether e4:3d:1a:2a:d9:b4 txqueuelen 1000 (Ethernet)
RX packets 16392678 bytes 3660567966 (3.4 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 139178 bytes 17787328 (16.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1 (Local Loopback)
RX packets 79034 bytes 4822934 (4.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 79034 bytes 4822934 (4.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
发现本地lo网卡,127.0.0.1,
解决办法,禁用lo网卡:
ifdown lo #需要root权限
启用命令是:ifup lo
重启应用,依然报错,还是报已在127.0.0.1注册,,,,,产生一丝邪念,全部网卡都禁用了,只留一个带主机IP地址的网卡,,,,结果环境登不进去了,,,,,所以禁用不可取!!!!!!
最终解决
通过执行hostname -i 查看主机IP,发现是127.0.0.1,可以修改主机名,配置/etc/hosts 来绑定IP。
hostname name # 临时修改主机名,机器重启失效,正常机器不会重启
vi /etc/hosts
192.168.xx.xx name
再次执行hostname -i ,此时显示192.168.xx.xx
重启应用,启动成功