Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-2715

Since pmm-client-1.9.0, pmm-admin detects CentOS/RHEL 6 installations using linux-upstart as service manager and ignores SysV scripts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Pending Release
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 1.10.0, 1.11.0, 1.9.1, 1.12.0
    • Fix Version/s: future, 1.15.0
    • Component/s: PMM Client
    • Labels:
      None

      Description

      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
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jaime.sicam@percona.com Jaime Sicam
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 6 hours, 45 minutes
                  1w 6h 45m