Ad Widget

Collapse

Post Installation Troubles - Part 1

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • QwErTy_LoGiC
    Member
    • Feb 2010
    • 66

    #1

    Post Installation Troubles - Part 1

    Hello all,

    I have just installed Zabbix 1.8.1 on Ubuntu server 9.10. The installation worked but I am having troubles with the zabbix_server and zabbix_agentd processes.

    They start automatically flawlessly but I cannot stop, nor restart them. I get this error:

    Code:
    Stopping Zabbix server daemon: zabbix_server
    No /usr/local/sbin/zabbix_server found running; none killed.
    I then run ps -ALf | grep zabbix and I get:

    Code:
    zabbix    1357     1  1357  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_agentd
    zabbix    1360  1357  1360  0    1 15:22 ?        00:00:01 /usr/local/sbin/zabbix_agentd
    zabbix    1361  1357  1361  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_agentd
    zabbix    1362  1357  1362  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_agentd
    zabbix    1363  1357  1363  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_agentd
    zabbix    1364  1357  1364  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_agentd
    zabbix    1368     1  1368  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1441  1368  1441  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1442  1368  1442  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1444  1368  1444  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1445  1368  1445  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1446  1368  1446  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1447  1368  1447  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1448  1368  1448  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1449  1368  1449  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1453  1368  1453  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1454  1368  1454  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1456  1368  1456  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1458  1368  1458  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1461  1368  1461  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1462  1368  1462  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1463  1368  1463  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1466  1368  1466  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1474  1368  1474  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1475  1368  1475  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1476  1368  1476  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1479  1368  1479  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    zabbix    1481  1368  1481  0    1 15:22 ?        00:00:00 /usr/local/sbin/zabbix_server
    the same goes for the zabbix_agentd process.

    Any ideas?

    Thanks!
  • QwErTy_LoGiC
    Member
    • Feb 2010
    • 66

    #2
    Found the problem...

    I finally found the solution for this problem:

    the PID variable in both the zabbix-server and zabbix-agent in the init.d directory had the wrong configuration. When I ran the stop or restart parameter, it could not find the zabbix-server.pid or zabbix-agent.pid files...

    One down, one to go...

    Comment

    • lostinspace
      Junior Member
      • Mar 2010
      • 2

      #3
      Answer

      Could you please post the script that you got working.

      Thanks
      Andrew

      Comment

      • QwErTy_LoGiC
        Member
        • Feb 2010
        • 66

        #4
        Zabbix Daemon Start Script

        Hello,

        In my case, running on Ubuntu Server 9.10, I had to modify the zabbix daemon start scripts for both the server and the agent. Here are the final variables line:

        For the server:
        Code:
        NAME=zabbix_server
        PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
        DAEMON=/usr/local/sbin/${NAME}
        DESC="Zabbix server daemon"
        PID=/tmp/$NAME.pid
        For the agent:
        Code:
        NAME=zabbix_agentd
        PATH=/bin:/usr/bin:/sbin:/usr/sbin:/home/zabbix/bin
        DAEMON=/usr/local/sbin/${NAME}
        DESC="Zabbix agent daemon"
        PID=/tmp/$NAME.pid
        Cheers

        Comment

        • ansuya
          Junior Member
          • Apr 2010
          • 2

          #5
          hi, look your zabbix_serveur.conf

          zabbix_serveur.conf :
          /var/tmp/zabbix_server.pid


          zabbix daemon start scripts:
          PID=/tmp/zabbix_serveur.pid


          differents..

          Comment

          • ploochan
            Member
            • Oct 2009
            • 42

            #6
            Hello,
            I was wondering if someone can help. I have my zabbix 1.8.2 installed on Debian. I am able to start the zabbix_agent but I cant start the zabbix_server
            I have no errors on my zabbix_server.log.
            I was thinking it may be permissions issue. Any idea?

            this is my config for zabbix_agent is
            #! /bin/sh
            ### BEGIN INIT INFO
            # Provides: zabbix-agent
            # Required-Start: $local_fs $network
            # Required-Stop: $local_fs
            # Default-Start: S
            # Default-Stop: 0 6
            # Short-Description: Start zabbix-agent daemon
            ### END INIT INFO
            DAEMON=/usr/local/sbin/zabbix_agentd
            NAME=zabbix_agentd
            DESC="Zabbix agent"
            PID=/var/run/zabbix-agent/$NAME.pid

            test -f $DAEMON || exit 0

            set -e

            case "$1" in
            start)
            rm -f $PID
            echo "Starting $DESC: $NAME"
            start-stop-daemon --oknodo --start --pidfile $PID \
            --exec $DAEMON < /dev/null &> /dev/null
            ;;
            stop)
            echo "Stopping $DESC: $NAME"
            start-stop-daemon --oknodo --stop --exec $DAEMON
            ;;
            restart|force-reload)
            $0 stop
            $0 start
            ;;
            *)
            N=/etc/init.d/$NAME
            echo "Usage: $N {start|stop|restart|force-reload}" >&2
            exit 1
            ;;
            esac

            exit 0



            and the config for my zabbix_server is:
            #! /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
            NAME=zabbix_server
            DAEMON=/usr/local/sbin/zabbix_server
            DESC="zabbix server"
            PID=/var/run/zabbix_server/$NAME.pid

            test -f $DAEMON || exit 0

            set -e

            case "$1" in
            start)
            rm -f $PID
            echo "Starting $DESC: $NAME"
            start-stop-daemon --oknodo --start --pidfile $PID \
            --exec $DAEMON < /dev/null &> /dev/null
            ;;
            stop)
            echo "Stopping $DESC: $NAME"
            start-stop-daemon --oknodo --stop --exec $DAEMON
            ;;
            restart|force-reload)
            $0 stop
            $0 start
            ;;
            *)
            N=/etc/init.d/$NAME
            echo "Usage: $N {start|stop|restart|force-reload}" >&2
            exit 1
            ;;
            esac

            exit 0

            Comment

            • ansuya
              Junior Member
              • Apr 2010
              • 2

              #7
              not enough of the information

              Show here more of yours messages!
              What message do you have when you start your Zabbix?
              Try to start your zabix_server manually ( without this script): /usr/bin/zabbix_server

              Change this line
              "--exec $DAEMON < /dev/null &> /dev/null" to "--exec $DAEMON" (for to see the messages )

              courage!
              Last edited by ansuya; 27-05-2010, 11:55.

              Comment

              • kpfitzgerald
                Junior Member
                • Mar 2011
                • 19

                #8
                ran into a similar problem with a db2 installation

                i just sourced the db2profile or the instance owners profile when running the init.d script, i then vi the script and added this

                . /home/db2inst1/.profile


                works fine now.

                Comment

                Working...