Ad Widget

Collapse

Zabbix Proxy Service

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kola
    Junior Member
    • Feb 2020
    • 20

    #1

    Zabbix Proxy Service

    Good day

    I have been giving the responsibility of managing Zabbix at my work. I upgraded our server successfully to 4.4.6 and i built a new Cent OS 7 Zabbix proxy in a remote office. However after installing the Zabbix proxy and starting the service i noticed this error when checking the proxy service status
    Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: No such file or directory

    Should i be worried about this?

    Also i noticed on the server frontend the proxy does not seem to be reporting yet. Last seen shows as never.

    [root@atlprdmon01 zabbix]# systemctl status zabbix-proxy.service -l
    ● zabbix-proxy.service - Zabbix Proxy
    Loaded: loaded (/usr/lib/systemd/system/zabbix-proxy.service; disabled; vendor preset: disabled)
    Active: active (running) since Wed 2020-02-26 11:08:42 CST; 437ms ago
    Process: 4050 ExecStop=/bin/kill -SIGTERM $MAINPID (code=exited, status=1/FAILURE)
    Process: 4052 ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE (code=exited, status=0/SUCCESS)
    Main PID: 4054 (zabbix_proxy)
    CGroup: /system.slice/zabbix-proxy.service
    └─4054 /usr/sbin/zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf

    Feb 26 11:08:42 atlprdmon01.usatl.price.corp systemd[1]: zabbix-proxy.service holdoff time over, scheduling restart.
    Feb 26 11:08:42 atlprdmon01.usatl.price.corp systemd[1]: Stopped Zabbix Proxy.
    Feb 26 11:08:42 atlprdmon01.usatl.price.corp systemd[1]: Starting Zabbix Proxy...
    Feb 26 11:08:42 atlprdmon01.usatl.price.corp systemd[1]: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: No such file or directory
    Feb 26 11:08:42 atlprdmon01.usatl.price.corp systemd[1]: Started Zabbix Proxy.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #2
    If you reboot the proxy, does /run/zabbix get recreated by systemd?

    If it does, is it writable by the user you're running the zabbix_proxy as?

    Does the name for the PID file in the zabbix_proxy.conf match the name that systemctl is looking for?

    Comment

    • kola
      Junior Member
      • Feb 2020
      • 20

      #3
      Originally posted by tim.mooney
      If you reboot the proxy, does /run/zabbix get recreated by systemd?

      If it does, is it writable by the user you're running the zabbix_proxy as?

      Does the name for the PID file in the zabbix_proxy.conf match the name that systemctl is looking for?
      Thanks for the reply Tim

      I did a reboot and noticed the service would not auto start. So i enabled the service to auto start using the systemctl enable zabbix-proxy./service command and also disabled SELINUX. Did another reboot and now the service starts. Now i can see the proxy from the server (Proxy is in active mode)

      To answer your question
      Yes the file is created and i am running as root so i assume based on the permissions root has write acess to the file
      [root@atlprdmon01 zabbix]# ls -alh
      total 4.0K
      drwxr-xr-x 2 zabbix zabbix 80 Feb 26 13:16 .
      drwxr-xr-x 34 root root 960 Feb 26 13:16 ..
      -rw-rw-r-- 1 zabbix zabbix 4 Feb 26 13:16 zabbix_proxy.pid
      srwx------ 1 zabbix zabbix 0 Feb 26 13:16 zabbix_proxy_preprocessing.sock
      [root@atlprdmon01 zabbix]# who
      root pts/0 2020-02-26 13:17 (ehpm539.wpg.price.corp)
      [root@atlprdmon01 zabbix]#


      The zabbix_proxy.conf file has the following path for PidFile
      PidFile=/var/run/zabbix/zabbix_proxy.pid

      I checked that directory and i noticed a pid file created same time as the one above.
      [root@atlprdmon01 zabbix]# cd /var/run/zabbix/
      [root@atlprdmon01 zabbix]# ls -alh
      total 4.0K
      drwxr-xr-x 2 zabbix zabbix 80 Feb 26 13:16 .
      drwxr-xr-x 34 root root 960 Feb 26 13:16 ..
      -rw-rw-r-- 1 zabbix zabbix 4 Feb 26 13:16 zabbix_proxy.pid
      srwx------ 1 zabbix zabbix 0 Feb 26 13:16 zabbix_proxy_preprocessing.sock





      The proxy seems to be running fine now with running the systemctl command to enable the service auto starting so I am not sure if i still need to change the PidFIle path in the config file to fix the error. Right now the status still shows as below

      [root@atlprdmon01 zabbix]# systemctl status zabbix-proxy.service -l
      ● zabbix-proxy.service - Zabbix Proxy
      Loaded: loaded (/usr/lib/systemd/system/zabbix-proxy.service; enabled; vendor preset: disabled)
      Active: active (running) since Wed 2020-02-26 13:16:56 CST; 1h 43min ago
      Process: 1951 ExecStart=/usr/sbin/zabbix_proxy -c $CONFFILE (code=exited, status=0/SUCCESS)
      Main PID: 1967 (zabbix_proxy)
      CGroup: /system.slice/zabbix-proxy.service
      ├─1967 /usr/sbin/zabbix_proxy -c /etc/zabbix/zabbix_proxy.conf
      ├─2022 /usr/sbin/zabbix_proxy: configuration syncer [synced config 36783 bytes in 0.168278 sec, idle 3600 sec
      ├─2024 /usr/sbin/zabbix_proxy: trapper #1 [processed data in 0.000000 sec, waiting for connection
      ├─2025 /usr/sbin/zabbix_proxy: trapper #2 [processed data in 0.000000 sec, waiting for connection
      ├─2026 /usr/sbin/zabbix_proxy: trapper #3 [processed data in 0.000000 sec, waiting for connection
      ├─2027 /usr/sbin/zabbix_proxy: trapper #4 [processed data in 0.000000 sec, waiting for connection
      ├─2028 /usr/sbin/zabbix_proxy: trapper #5 [processed data in 0.000000 sec, waiting for connection
      ├─2029 /usr/sbin/zabbix_proxy: heartbeat sender [sending heartbeat message success in 0.081625 sec, idle 60 sec
      ├─2030 /usr/sbin/zabbix_proxy: data sender [sent 1 values in 0.083075 sec, sending data
      ├─2031 /usr/sbin/zabbix_proxy: housekeeper [deleted 2221 records in 0.063808 sec, idle for 1 hour(s)
      ├─2032 /usr/sbin/zabbix_proxy: http poller #1 [got 0 values in 0.000610 sec, idle 5 sec
      ├─2033 /usr/sbin/zabbix_proxy: discoverer #1 [processed 0 rules in 0.000448 sec, idle 60 sec
      ├─2034 /usr/sbin/zabbix_proxy: history syncer #1 [processed 0 values in 0.000031 sec, idle 1 sec
      ├─2035 /usr/sbin/zabbix_proxy: history syncer #2 [processed 0 values in 0.000050 sec, idle 1 sec
      ├─2036 /usr/sbin/zabbix_proxy: history syncer #3 [processed 0 values in 0.000041 sec, idle 1 sec
      ├─2037 /usr/sbin/zabbix_proxy: history syncer #4 [processed 0 values in 0.000051 sec, idle 1 sec
      ├─2038 /usr/sbin/zabbix_proxy: self-monitoring [processed data in 0.000047 sec, idle 1 sec
      ├─2039 /usr/sbin/zabbix_proxy: task manager [processed 0 task(s) in 0.000467 sec, idle 5 sec
      ├─2040 /usr/sbin/zabbix_proxy: poller #1 [got 0 values in 0.000026 sec, idle 2 sec
      ├─2041 /usr/sbin/zabbix_proxy: poller #2 [got 1 values in 0.008577 sec, idle 2 sec
      ├─2042 /usr/sbin/zabbix_proxy: poller #3 [got 0 values in 0.000039 sec, idle 2 sec
      ├─2043 /usr/sbin/zabbix_proxy: poller #4 [got 0 values in 0.000024 sec, idle 2 sec
      ├─2044 /usr/sbin/zabbix_proxy: poller #5 [got 0 values in 0.000020 sec, idle 2 sec
      ├─2045 /usr/sbin/zabbix_proxy: unreachable poller #1 [got 0 values in 0.000034 sec, idle 5 sec
      ├─2046 /usr/sbin/zabbix_proxy: icmp pinger #1 [got 0 values in 0.000035 sec, idle 5 sec
      ├─2047 /usr/sbin/zabbix_proxy: preprocessing manager #1 [queued 0, processed 2 values, idle 5.002159 sec during 5.002322 sec
      ├─2048 /usr/sbin/zabbix_proxy: preprocessing worker #1 started
      ├─2049 /usr/sbin/zabbix_proxy: preprocessing worker #2 started
      └─2050 /usr/sbin/zabbix_proxy: preprocessing worker #3 started

      Feb 26 13:16:56 atlprdmon01.usatl.price.corp systemd[1]: Starting Zabbix Proxy...
      Feb 26 13:16:56 atlprdmon01.usatl.price.corp systemd[1]: Can't open PID file /run/zabbix/zabbix_proxy.pid (yet?) after start: No such file or directory
      Feb 26 13:16:56 atlprdmon01.usatl.price.corp systemd[1]: Started Zabbix Proxy.

      Comment

      • tim.mooney
        Senior Member
        • Dec 2012
        • 1427

        #4
        I'm not sure why systemd is complaining about the PID file, then. /run and /var/run are linked to the same location (/run is the systemd mount point, /var/run is a symlink) on RHEL/CentOS 7.

        My initial suspicion (that /run/zabbix wasn't being recreated on reboot, because there was a missing config in /usr/lib/tmpfiles.d) doesn't appear to be the issue. It was recreated and the permsisions are fine.

        I suppose you could try changing the zabbix_proxy.conf so that PidFile=/run/zabbix/zabbix_proxy.pid instead of PidFile=/var/run/zabbix/zabbix_proxy.pid and then do a reboot, but honestly that shouldn't make any difference.

        I'm not sure what's causing that message from systemd.

        Comment

        • kola
          Junior Member
          • Feb 2020
          • 20

          #5
          Ok then. I guess I could try your suggestion changing the file path in the config file if it breaks again. I will leave as it is running fine right now.

          Thank you for your help

          Comment

          Working...