Ad Widget

Collapse

Zabbix Server startup problems.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Slesers
    Junior Member
    • Feb 2011
    • 11

    #1

    Zabbix Server startup problems.

    Hello, I have got one issue what is really pissing me off. And I don't know the root cause of this problem: is it problem somewhere in Zabbix world or personal (installed on me dependency curve-hands.dll) Such I am begginer in Linux world. I have got problem with Zabbix server restart.
    System Centos 5.5. and Zabbix 1.8.4. When the server is restarted or booted up the Zabbix agent start automatically but the Zabbix server service is not starting up. Both init.d scripts are taken from the official Zabbix package.
    First thing what I checked was runlevels. And it's added as 3 and 5. Chmod and owner for init.d script is also the same. I am starting to think maybe script is wrong on my system. Script is posted below.

    Code:
    #!/bin/bash
    #
    # chkconfig: - 55 45
    # description: zabbix_server  
    # probe: false
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    # Source networking configuration.
    . /etc/sysconfig/network
    
    # Check that networking is up. If you are running without a network, comment this out.
    [ "${NETWORKING}" = "no" ] && exit 0
    
    RETVAL=0
    progdir="/usr/local/sbin/"
    prog="zabbix_server"
    
    start() {
            # Start daemons.
    	if [ -n "`/sbin/pidof $prog`" ]; then
    		echo -n "$prog: already running"
    		failure $"$prog start"
    		echo
    		return 1
    	fi
            echo -n $"Starting $prog: "
    	# we can't seem to use daemon here - emulate its functionality
            su -c $progdir$prog - $USER 
    	RETVAL=$?
    	usleep 100000
    	if [ -z "`/sbin/pidof $progdir$prog`" ]; then
    		RETVAL=1
    	fi
    	[ $RETVAL -ne 0 ] && failure $"$prog startup"
     	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog && success $"$prog startup"
    	echo	
    	return $RETVAL
    }
    stop() {
    	RETVAL=0
    	pid=
            # Stop daemons.
            echo -n $"Stopping $prog: "
    	pid=`/sbin/pidof -s $prog`
    	if [ -n "$pid" ]; then
    	 kill -TERM $pid
            else
    	 failure $"$prog stop"
    	 echo
    	 return 1
            fi
    	RETVAL=$?
    	[ $RETVAL -ne 0 ] && failure $"$prog stop" 
    	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog && success $"$prog stop" 
    	echo
    	return $RETVAL
    }
    restart() {
    	stop
    	start
    }	
    
    # See how we were called.
    case "$1" in
    	start)
    		start
    		;;
    	stop)
    		stop
    		;;
    	restart)
    		restart
    		;;
    	condrestart)
    		[ -f /var/lock/subsys/$prog ] && restart
    		;;
    	*)
            	echo $"Usage: $0 {start|stop|restart|condrestart}"
    		exit 1
    esac
    
    exit $?
    Yes I know it's basic newbie question, but be please kind and help me
  • ahuser
    Junior Member
    • Feb 2011
    • 4

    #2
    start the zabbix service with "/etc/init.d/zabbix-server start" ?
    look at "ps aux | grep zabbix_server" whether the service runs

    Comment

    • ahuser
      Junior Member
      • Feb 2011
      • 4

      #3
      and check if the service in run level 2 "ls /etc/rc2.d/"

      Comment

      • bernard
        Member
        • Oct 2008
        • 54

        #4
        in complement to 'ahuser' post
        • Check your zabbix user is NOT root.

        zabbix process check this think at startup.
        • Be sure the user used to start Zabbix_Server (usually zabbix) can access to binary, config and all zabbix related files.
        • Do you somthing in log (set level to 4 for debug) ?


        Hope this help,
        Regards

        Comment

        • Slesers
          Junior Member
          • Feb 2011
          • 11

          #5
          Thank you guys for the help.

          I found the why Zabbix_Server did not started. It's very hard to start application what uses database before database is started. That's why it failed.

          I changed boot order for /etc/rc directories and now it works.

          Comment

          Working...