Ad Widget

Collapse

zabbix on ubuntu problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • c0mputernick
    Junior Member
    • Aug 2009
    • 13

    #1

    zabbix on ubuntu problem

    I have a fresh install of ubuntu 9.04 and zabbix latest and for some reason, every reboot deletes the /var/run/zabbix-server folder so zabbix fails to startup because it cant create the pid file because the directory doesnt exsist.

    if i create the directory and make it owned by zabbix:zabbix and then try to start zabbix-server it starts correctly. but it doesnt survive a reboot, the directory gets delete again.

    i installed zabbix using apt-get like i normally would to install something.

    is this a known issue or is there something wrong with the machine?

    thanks for any help you can give.
  • WavyGravy
    Junior Member
    • Aug 2009
    • 3

    #2
    The Ubuntu Repositories are generally out of date. Follow the guides posted on this forum post to install it from source.

    Comment

    • c0mputernick
      Junior Member
      • Aug 2009
      • 13

      #3
      The current ubuntu version is 1.6.1 and the latest is 1.6.5.

      from the release notes i didnt see anything related to the issue we are having on ubuntu.

      Is this a known issue?

      I have no problem installing from source, but i dont really like to break the debian way of things, its easier to maintain packages and such with their apt-get package manager. and i dont mind using a version thats a little out of date if it does what i need it to do.

      if this is a known issue, does anyone know if its been fixed in the latest release? any ubuntu users install from source having the same problem? id hate to reinstall from source and end up having the same problem.

      Comment

      • WavyGravy
        Junior Member
        • Aug 2009
        • 3

        #4
        I've always run Zabbix from source on my machines, but it looks like the startup scripts aren't working properly.

        Try and having a look at the scripts in /etc/init.d/, specifically the zabbix-server and zabbix-agent scripts. I don't think the default scripts in the zabbix package have the proper path specified for the DAEMON, and I would also make sure that the init.d scripts have the proper permissions, and that you have updated rc.d.

        Use the wiki as a guide, and see if you need to modify some of the paths in the startup scripts, I'm not exactly sure what directories the apt version uses.

        Comment

        • troffasky
          Senior Member
          • Jul 2008
          • 567

          #5
          Originally posted by c0mputernick
          any ubuntu users install from source having the same problem? id hate to reinstall from source and end up having the same problem.
          Yes, this is a bug with the Ubuntu packages. I came across it myself when using 6.06.

          Binary package hint: zabbix-agent The init script /etc/init.d/zabbix-agent expects the directory /var/run/zabbix-agent to exist, and fails to start if the pid can't be written to /var/run/zabbix-agent/zabbix_agentd.pid . Since the /var/run path is mounted as tmpfs, this directory is removed whenever the machine is rebooted. The directory can be created at zabbix-agent start by altering the script /etc/init.d/zabbix-agent as follows: #! /bin/sh ### BEGIN INIT INFO # Provides: zabb...


          Same Problem as in "#96644 zabbix_agentd will not start after reboot" Here is a fixed version of /etc/init.d/zabbix-server #! /bin/sh ### BEGIN INIT INFO # Provides: zabbix-server # Required-Start: $local_fs $network # Required-Stop: $local_fs # Default-Start: S # Default-Stop: 0 6 # Short-Description: Start zabbix-server daemon ### END INIT INFO DAEMON=/usr/sbin/zabbix_server NAME=zabbix_server DESC="Zabbix server" PID=/var/run/zabbix-server/$NAME.pid ### BEGIN /v...


          I don't know if installing from source would create an init script. Probably a lot easier to use the fix on either of those tickets.

          Or use Debian instead ;-)

          Comment

          • WavyGravy
            Junior Member
            • Aug 2009
            • 3

            #6
            The source install won't automatically create the init scirpt. You have to copy the init script and then modify it. The bugfix is essentially the same modification that is outlined in the source installation FAQ linked earlier.

            Comment

            Working...