-
Type:
Bug
-
Status: Done
-
Priority:
Medium
-
Resolution: Fixed
-
Affects Version/s: 1.10.0, 1.11.0, 1.9.1, 1.12.0
-
Fix Version/s: 1.15.0
-
Component/s: PMM Client
-
Labels:None
In CentOS/RHEL 6 both upstart and SysV scripts are used. Since upstart is detected, pmm-admin installs upstart scripts:
cat /etc/init/pmm-linux-metrics-42000.conf
# PMM Prometheus node_exporter
description "PMM Prometheus node_exporter"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
The problem here is the the exporters are started before the network is started and so this error appears:
time="2018-07-10T13:23:17+08:00" level=info msg="Starting HTTPS server of 192.168.0.5:42000 ..." source="server.go:106" time="2018-07-10T13:23:17+08:00" level=fatal msg="listen tcp 192.168.0.5:42000: bind: address already in use" source="server.go:107"
The problem is almost all services in CentOS 6 use SysV and the network and firewall scripts are in SysV so you can't use them as a condition before you can start the exporter. I've tried but if you have a workaround, please update the start scripts.
Otherwise, please make pmm-admin detect CentOS 6 as using SysV scripts.
Tests:
PMM client 1.8.1
rpm -Uvh pmm-client-1.8.1-1.x86_64.rpm
Preparing... ########################################### [100%]
1:pmm-client ########################################### [100%]
[root@centos-happy ~]# pmm-admin config --server=192.168.0.7
OK, PMM server is alive.
PMM Server | 192.168.0.7
Client Name | centos-happy
Client Address | 192.168.0.5
[root@centos-happy ~]# pmm-admin info
pmm-admin 1.8.1
PMM Server | 192.168.0.7
Client Name | centos-happy
Client Address | 192.168.0.5
Service Manager | unix-systemv
Go Version | 1.9.4
Runtime Info | linux/amd64
pmm-client 1.9.1
[root@centos-happy ~]# rpm -Uvh pmm-client-1.9.0-1.el6.x86_64.rpm
Preparing... ########################################### [100%]
1:pmm-client ########################################### [100%]
[root@centos-happy ~]# pmm-admin config --server=192.168.0.7
OK, PMM server is alive.
PMM Server | 192.168.0.7
Client Name | centos-happy
Client Address | 192.168.0.5
[root@centos-happy ~]# pmm-admin info
pmm-admin 1.9.0
PMM Server | 192.168.0.7
Client Name | centos-happy
Client Address | 192.168.0.5
Service Manager | linux-upstart
Go Version | 1.9.4
Runtime Info | linux/amd64