Ad Widget

Collapse

Could not lock PID file [/tmp/zabbix_agentd.pid]: [13] Permission denied

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bern
    Junior Member
    • Nov 2016
    • 7

    #1

    Could not lock PID file [/tmp/zabbix_agentd.pid]: [13] Permission denied

    I installed the Zabbix agent on a AIX machine. Though it works well, I have the following error repeated countless time.

    Code:
    zabbix_agentd [3539390]: Is this process already running? Could not lock PID file [/tmp/zabbix_agentd.pid]: [13] Permission denied
    Code:
    $ ls -l /tmp | grep zabbix
    -rw-rw-r--    1 zabbix   zabbix            8 Sep 26 11:01 zabbix_agentd.pid

    Code:
     $ oslevel -s
    7200-03-03-1914

    Code:
    $ /opt/zabbix/sbin/zabbix_agentd -V
    zabbix_agentd (daemon) (Zabbix) 4.0.7
    Revision 92831 18 April 2019, compilation time: May 10 2019 08:40:52
    
    Copyright (C) 2019 Zabbix SIA
    License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
    This is free software: you are free to change and redistribute it according to
    the license. There is NO WARRANTY, to the extent permitted by law.
    
    Supported technology levels: 6100 and above

    A search on internet let me see other people with the same problem but without any solution.

    Does a solution exist for this problem?
  • bziegler
    Junior Member
    • Oct 2019
    • 6

    #2
    Hi bern,

    zabbix agent uses the pid file /tmp/zabbix_agentd.pid by default. If you try running multiple instances of zabbix agent, you have to change the location of the seconds processes pid file. Check your zabbix agent config file. First paragraph is the pid file location.

    rgds

    Comment

    • bern
      Junior Member
      • Nov 2016
      • 7

      #3
      I have only one instance but this instance has child processes. My feeling is probably a little problem in the code for the AIX agent. The child processes are probably trying to access the pid file.

      Comment

      • bziegler
        Junior Member
        • Oct 2019
        • 6

        #4
        Hi,

        I am currently running zabbix agent in version 4.2.1 on multiple lpars without any issue. Maybe you should try to update your agents.

        rgds

        Comment

        • dimir
          Zabbix developer
          • Apr 2011
          • 1080

          #5
          How do you control (start/stop) Zabbix agent process? Are you using some kind of init script?

          Comment

          • bziegler
            Junior Member
            • Oct 2019
            • 6

            #6
            A single agent on every lpar is startet by inittab, configured with mkitab:

            Code:
            mkitab "zabbix:2:once:/path/to/sbin/zabbix_agentd -c /path/to/conf/zabbix_agentd.conf >/dev/null 2>&1"

            https://www.ibm.com/support/knowledg...ds/mkitab.html

            But we also have agents starting and stopping with our resource groups (PowerHA).
            Last edited by bziegler; 05-11-2019, 11:16.

            Comment

            • dimir
              Zabbix developer
              • Apr 2011
              • 1080

              #7
              Could there be any security mechanism causing that error?
              You say it works well, the agent is started, despite this error? Does it mean sometimes it's started, sometimes fails?
              The error appears when the following code block fails
              Code:
              fcntl(fd, F_SETLK, &fl)
              The error is set to EACCES (13), "Permission denied". From the fcntl man page:
              Code:
                     EACCES or EAGAIN
                            Operation is prohibited by locks held by other processes.
              Perhaps it takes some time to stop one of the agent processes and before it's finished another instance is attempted to start.
              Last edited by dimir; 06-11-2019, 11:57.

              Comment

              Working...