启动hghac服务报错:OSError: [Errno 98] Address already in use

环境

系统平台:N/A
版本:4.5

症状

启动hghac服务无法正常启动,检查服务状态报错:OSError: [Errno 98] Address already in use。

查看patroni日志提示:

ERROR: Couldn’t start a service on ‘0.0.0.0:8008’, please check your restapi.listen configuration

问题原因

端口被占用

解决方案

使用netstat -tunlp 查看端口占用情况

[root@hgdw2 ~]# netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:8008            0.0.0.0:*               LISTEN      1044/patroni
tcp        0      0 0.0.0.0:5866            0.0.0.0:*               LISTEN      1343/postgres
tcp        0      0 x.x.197.12:2379     0.0.0.0:*               LISTEN      21973/etcd
tcp        0      0 x.x.197.12:2380     0.0.0.0:*               LISTEN      21973/etcd
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      977/sshd
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1149/master
tcp6       0      0 :::22                   :::*                    LISTEN      977/sshd
tcp6       0      0 ::1:25                  :::*                    LISTEN      1149/master
udp        0      0 127.0.0.1:323           0.0.0.0:*                           719/chronyd
udp6       0      0 ::1:323                 :::*                                719/chronyd

2.判断占用端口进程能否杀掉,如能杀掉执行kill命令

kill -9 1044
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值