Ad Widget

Collapse

Cannot create PID file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mg3
    Junior Member
    • Mar 2007
    • 9

    #1

    Cannot create PID file

    Hello,

    after a restart of the server, the zabbix server cannot be started again. I checked the logfile:
    Code:
    005512:20070319:222449 Cannot create PID file [/var/run/zabbix-server/zabbix_server.pid] [No such file or directory]
    I have no idea why the pid file can't be created anymore

    Anyone?

    Thanks,

    Jo
  • James Wells
    Senior Member
    • Jun 2005
    • 664

    #2
    Greetings,

    Right off the bat, I suspect you are missing the directory /var/run/zabbix-server By default the pid file is /var/run/zabbix-server.pid, so the start stop script may have removed the directory instead of the pid file.
    Unofficial Zabbix Developer

    Comment

    • mg3
      Junior Member
      • Mar 2007
      • 9

      #3
      Hi,

      I created the directory again but it said 'permission denied' in the logfile. So I reinstalled the server and now the problem is solved, but I am affraid when the server restarts, the problem will rise again..

      greetz,

      Jo

      Comment

      • tronite
        Senior Member
        • Jun 2007
        • 147

        #4
        Originally posted by mg3
        Hello,

        after a restart of the server, the zabbix server cannot be started again. I checked the logfile:
        Code:
        005512:20070319:222449 Cannot create PID file [/var/run/zabbix-server/zabbix_server.pid] [No such file or directory]
        I have no idea why the pid file can't be created anymore

        Anyone?

        Thanks,

        Jo
        Hey this reminds me of a similar incident where there I could not stop the zabbix server and alas how I hacked this was by rm -f the zabbix pid file then start the service again, brings me to wonder but it's probably a problem between the keyboard and the screen.

        Comment

        • psmith
          Junior Member
          • May 2007
          • 5

          #5
          Perhaps the user that Zabbix is running under does not have appropriate permissions to delete in /var ?

          Comment

          • niak
            Member
            • Nov 2007
            • 30

            #6
            cannot create pid file

            Hi,

            I have the same problem,

            When i installed zabbix (1.4.1) for the first time, i have no problem :i can monitor my hosts, create graphs...
            But when i restart my system, zabbix delete the directory : zabbix-server in /var/run.
            In the zabbix_server.log :"cannot create PID file [/var/run/zabbix-server/zabbix_server.pid]

            So i can't restart my server after install .

            Any one have solutions ?

            I am on ubuntu 7.10 !

            sorry for my English, i'm French

            Comment

            • niak
              Member
              • Nov 2007
              • 30

              #7
              Hi ,

              I find the solution of my problem:
              /etc/zabbix/zabbix-server.conf : It is necessary to change : PidFile=/var/run/zabbix-server/zabbix_server.pid in
              PidFile=/home/your_account_name/zabbix/zabbix_server.pid

              You have to create a directory "zabbix" in your home, don't create the file "zabbix_server.pid" in the directory manually! the system will create the file after restarting!

              Restart your system! and the problem disappears ! No errors in zabbix-server.log

              PS(I am on Ubuntu 7.10)

              Bye...
              Last edited by niak; 14-12-2007, 09:27.

              Comment

              • nlp
                Junior Member
                • Oct 2008
                • 5

                #8
                Did not help for me

                Hey,
                I still have this problem... For me its looks like zabbix-server isnt running under the user zabbix

                Comment

                • tof233
                  Member
                  • Nov 2010
                  • 94

                  #9
                  Fixed by setting in zabbix_agentd.conf : PidFile=/var/run/zabbix/zabbix_agentd.pid
                  (and for Zabbix server: PidFile=/var/run/zabbix/zabbix_server.pid )
                  and doing:

                  Code:
                  shell > chown -R zabbix:zabbix /var/run/zabbix

                  Comment

                  • alp
                    Member
                    • Nov 2009
                    • 90

                    #10
                    I have a same problem in gentoo now.

                    When i chown /var/run/zabbix and reboot system, after that this directory is removed =( And zabbix don't start. How can i solve it without copy PID to my home dir?

                    Comment

                    • Skymit
                      Junior Member
                      • Sep 2020
                      • 1

                      #11
                      Code:
                      mkdir /var/run/zabbix
                      Code:
                      chown zabbix:zabbix /var/run/zabbix
                      Code:
                      systemctl restart zabbix-java-gateway.service

                      Comment

                      • KillingerJose
                        Junior Member
                        • Oct 2020
                        • 1

                        #12
                        Thanks for the update and quick reply. I'll be sure to keep an eye on this thread.

                        walgreenslistens
                        Last edited by KillingerJose; 12-04-2021, 13:57.

                        Comment

                        • Michaell
                          Junior Member
                          • Oct 2020
                          • 1

                          #13
                          In fact, this file was simply not there, we create a folder, a file and assign rights GarageBand App
                          HTML Code:
                          mkdir /var/run/zabbix touch /var/run/zabbix/zabbix_agentd.pid chown -R zabbix:zabbix /var/run/zabbix chmod -R [COLOR=var(--hljs-number)]775[/COLOR] /var/run/zabbix
                          Last edited by Michaell; 19-10-2020, 07:21.

                          Comment

                          Working...