Ad Widget

Collapse

Server doesn't load Zabbix automatically on reboot

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DonnEdwards
    Junior Member
    • Feb 2011
    • 19

    #1

    Server doesn't load Zabbix automatically on reboot

    I'm puzzled by the startup sequence in Ubuntu 10.04 LTE Server.

    I thought that by following the installation instructions the Zabbix Server would start automatically. It doesn't.

    Code:
    $ sudo /etc/init.d/zabbix-server stop
    Stopping Zabbix server daemon: zabbix_server
    No /usr/local/sbin/zabbix_server found running; none killed.
    If I do ls-l in /usr/local/sbin I can see the zabbix_server file.

    When I run
    Code:
    sudo /etc/init.d/zabbix-server start
    it works fine.

    I'm sure I'm missing something really obvious. What is it?
    By the same token I can't get the firewall to start automatically.
    I'm too inexperienced with Linux to know what to do or even how to ask the right question. I'd appreciate your help.


    PS. The agentd loads fine.
    Last edited by DonnEdwards; 07-03-2011, 17:15.
  • Sparky
    Member
    • Jun 2010
    • 54

    #2
    Suggestion

    I'm also pretty inexperienced on Linux, but I'm running the same Ubuntu 10.04LTS. Something that helped me a lot is to install Webmin http://www.webmin.com/deb.html This lets you easily see a lot of the settings for the server and makes changes a lot simpler.

    Comment

    • DonnEdwards
      Junior Member
      • Feb 2011
      • 19

      #3
      Great suggestion, I'll give it a whirl. Thanks!

      Comment

      • DonnEdwards
        Junior Member
        • Feb 2011
        • 19

        #4
        The Webmin settings show that zabbix server is supposed to load.

        Is there something wrong with this script?

        Code:
        #! /bin/sh
        #
        # Zabbix daemon start/stop script.
        #
        # Written by Alexei Vladishev <[email protected]>.
        
        NAME=zabbix_server
        DAEMON=/usr/local/sbin/${NAME}
        DESC="Zabbix server daemon"
        PID=/tmp/$NAME.pid
        
        test -f $DAEMON || exit 0
        
        case "$1" in
          start)
        	echo "Starting $DESC: $NAME"
        	start-stop-daemon --oknodo --start --pidfile $PID \
        		--exec $DAEMON
        	;;
          stop)
        	echo "Stopping $DESC: $NAME"
        	start-stop-daemon --oknodo --stop --pidfile $PID \
        		--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
        The contents of the /usr/local/sbin folder are:

        Code:
        ls -l
        total 1516
        -rwxr-xr-x 1 root root 418300 2011-02-18 16:34 zabbix_agent
        -rwxr-xr-x 1 root root 502905 2011-02-18 16:34 zabbix_agentd
        -rwxrwxrwx 1 root root 624200 2011-02-18 13:58 zabbix_server
        Last edited by DonnEdwards; 08-03-2011, 14:41.

        Comment

        • gjmeinen
          Junior Member
          • Mar 2008
          • 5

          #5
          it is possible that zabbix is not included in the services startup.

          when you take a look at the map /etc/rc3.d there should be a file named like S05zabbix-server and a similar one for the agentd. This means that zabbix-server and agend are started at runlevel 3.

          I'm not running zabbix on Ubuntu but there are tools to add this to the startup sequence. "update-rc.d" is a command-line tool and "rcconf" is a GUI tool but i don't have any experience with these tools and for the exact commands you could google .

          Hope this helps

          Comment

          • Slesers
            Junior Member
            • Feb 2011
            • 11

            #6
            Check if on the startup Mysql is loaded before zabbix server aplication. It helpded for me.

            Also check startup scripts are they have rigth run levels.

            Comment

            • Sparky
              Member
              • Jun 2010
              • 54

              #7
              Originally posted by Slesers
              Check if on the startup Mysql is loaded before zabbix server aplication. It helpded for me.

              Also check startup scripts are they have rigth run levels.
              My problem was the MySQL not loading, which I activated from the WebAdmin page.

              What is the Zabbix Server log file saying?

              Comment

              • DonnEdwards
                Junior Member
                • Feb 2011
                • 19

                #8
                Sorry about the delay in responding.

                Here is the logfile
                Code:
                   871:20110328:150122.666 Starting Zabbix Server. Zabbix 1.8.4 (revision 16604).
                   871:20110328:150122.667 ****** Enabled features ******
                   871:20110328:150122.667 SNMP monitoring:           YES
                   871:20110328:150122.667 IPMI monitoring:            NO
                   871:20110328:150122.667 WEB monitoring:            YES
                   871:20110328:150122.667 Jabber notifications:      YES
                   871:20110328:150122.667 Ez Texting notifications:  YES
                   871:20110328:150122.667 ODBC:                       NO
                   871:20110328:150122.667 SSH2 support:               NO
                   871:20110328:150122.667 IPv6 support:               NO
                   871:20110328:150122.667 ******************************
                   871:20110328:150122.668 [Z3001] Connection to database 'zabbix' failed:  [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysq
                also

                Code:
                :/etc/rc3.d$ ls -l
                total 4
                -rw-r--r-- 1 root root 677 2010-03-30 09:17 README
                lrwxrwxrwx 1 root root  20 2011-02-18 13:06 S20fancontrol -> ../init.d/fancontrol
                lrwxrwxrwx 1 root root  19 2011-02-18 13:13 S20jabberd14 -> ../init.d/jabberd14
                lrwxrwxrwx 1 root root  15 2011-02-18 13:06 S20snmpd -> ../init.d/snmpd
                lrwxrwxrwx 1 root root  22 2011-02-21 12:16 S20zabbix-agent -> ../init.d/zabbix-agent
                lrwxrwxrwx 1 root root  15 2011-02-17 17:39 S50rsync -> ../init.d/rsync
                lrwxrwxrwx 1 root root  19 2011-02-17 17:39 S70dns-clean -> ../init.d/dns-clean
                lrwxrwxrwx 1 root root  18 2011-02-17 17:39 S70pppd-dns -> ../init.d/pppd-dns
                lrwxrwxrwx 1 root root  17 2011-02-17 17:39 S91apache2 -> ../init.d/apache2
                lrwxrwxrwx 1 root root  21 2011-02-17 17:40 S99grub-common -> ../init.d/grub-common
                lrwxrwxrwx 1 root root  18 2011-02-17 17:21 S99ondemand -> ../init.d/ondemand
                lrwxrwxrwx 1 root root  18 2011-02-17 17:21 S99rc.local -> ../init.d/rc.local
                lrwxrwxrwx 1 root root  15 2011-03-08 14:01 S99ufw -> /etc/init.d/ufw
                lrwxrwxrwx 1 root root  16 2011-03-08 13:57 S99webmin -> ../init.d/webmin
                lrwxrwxrwx 1 root root  25 2011-03-28 15:04 S99zabbix-server -> /etc/init.d/zabbix-server
                What puzzles me is there is no mention of mysql in /etc/rc3.d
                How do I make it run first? I've got webmin loaded, which shows:
                zabbix-server loads using Zabbix daemon start/stop script.
                mysql loads using upstart-job

                I will have a look at update-rc.d

                Comment

                • DonnEdwards
                  Junior Member
                  • Feb 2011
                  • 19

                  #9
                  Fixed!

                  I ran
                  Code:
                  sudo update-rc.d mysql defaults
                  Now there is an entry for mysql in /etc/rc3.d and after rebooting it all seems to be working fine.

                  Thanks to everyone who gave me the clues I needed. I don't know what I would have done without this forum

                  Comment

                  Working...