Ad Widget

Collapse

Zabbix_Server fail to start

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • slava629
    Junior Member
    • Nov 2009
    • 2

    #1

    Zabbix_Server fail to start

    I have installed Appache2, MySQL, PHP in SUSE11 everything up and runing. Zabbix web interface up and run too.
    But I have problem with /etc/init.d/zabbix_server start.
    linux-4bme:/home/zabbix/zabbix-1.6.2 # /etc/init.d/zabbix_server start
    Starting zabbix_server - Warning:/var/tmp/zabbix_server.pid exists! failed
    Here the start up script :

    # init.d/zabbix_server
    #
    ### BEGIN INIT INFO
    # Provides: zabbix_server
    # Required-Start: $network $remote_fs $syslog
    # Should-Start: mysql postgresql
    # Required-Stop:
    # Default-Start: 3
    # Default-Stop:
    # Description: Starts zabbix_server
    ### END INIT INFO

    . /etc/rc.status
    rc_reset
    NAME="zabbix_server"
    CONFIG_FILE="/etc/zabbix/zabbix_server.conf"

    if [ ! -f ${CONFIG_FILE} ]; then
    echo -n "${NAME}configuration file ${CONFIG_FILE} does not exist. "
    # Tell the user this has skipped
    rc_status -s
    exit 6
    fi

    ZABBIX_BIN="/usr/sbin/${NAME}"
    ZABBIX_PID="/var/tmp/zabbix_server.pid"


    if [ ! -x ${ZABBIX_BIN} ] ; then
    echo -n "${ZABBIX_BIN} not installed! "
    # Tell the user this has skipped
    rc_status -s
    exit 5
    fi


    export PATH=$PATH:/usr/sbin

    case "$1" in
    start)
    echo -n "Starting ${NAME} "
    checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN}
    case $? in
    0) echo -n "- Warning: ${NAME} already running! " ;;
    1) echo -n "- Warning: ${ZABBIX_PID} exists! " ;;
    esac

    startproc -p ${ZABBIX_PID} -u zabbix ${ZABBIX_BIN}
    rc_status -v
    ;;
    stop)
    echo -n "Shutting down ${NAME}"
    checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN} || echo -n "- Warning: ${NAME} not running! "
    killproc -p ${ZABBIX_PID} -TERM ${ZABBIX_BIN}
    rc_status -v
    ;;
    restart)
    $0 stop
    $0 start
    rc_status
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
    esac
    rc_exit

    The same story with zabbix_agentd.
    Any help welcome !!! Thank you again.
  • slava629
    Junior Member
    • Nov 2009
    • 2

    #2
    I fixed, yes yes yes ...............................

    The all problem was in /etc/zabbix/server.conf need delete # in string :
    # Name of PID file
    PidFile=/var/tmp/zabbix_server.pid
    and in /etc/init.d/zabbix script look like this:
    #! /bin/sh
    # Copyright (c) 07/2004 A.Tophofen, Germany
    # Modified for Zabbix 1.1alpha7 and SuSE Linux 9.2
    # April 2005, A. Kiepe, Switzerland
    #
    # init.d/zabbix_agentd
    #
    ### BEGIN INIT INFO
    # Provides: zabbix_agentd
    # Required-Start: $network $remote_fs $syslog
    # Required-Stop:
    # Default-Start: 3
    # Default-Stop:
    # Description: Starts Zabbix_Agentd
    ### END INIT INFO

    . /etc/rc.status
    rc_reset
    NAME="zabbix_agentd"
    CONFIG_FILE="/etc/zabbix/zabbix_agentd.conf"

    if [ ! -f ${CONFIG_FILE} ]; then
    echo -n "${NAME}configuration file ${CONFIG_FILE} does not exist. "
    # Tell the user this has skipped
    rc_status -s
    exit 6
    fi

    ZABBIX_BIN="/usr/sbin/${NAME}"
    ZABBIX_PID="/var/tmp/${NAME}"



    if [ ! -x ${ZABBIX_BIN} ] ; then
    echo -n "${ZABBIX_BIN} not installed! "
    # Tell the user this has skipped
    rc_status -s
    exit 5
    fi


    export PATH=$PATH:/usr/sbin

    case "$1" in
    start)
    echo -n "Starting ${NAME} "
    checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN}
    case $? in
    0) echo -n "- Warning: ${NAME} already running! " ;;
    1) echo -n "- Warning: ${ZABBIX_PID} exists! " ;;
    esac

    startproc -p ${ZABBIX_PID} -u zabbix ${ZABBIX_BIN}
    rc_status -v
    ;;
    stop)
    echo -n "Shutting down ${NAME}"
    checkproc -p ${ZABBIX_PID} ${ZABBIX_BIN} || echo -n "- Warning: ${NAME} not running! "
    killproc -p ${ZABBIX_PID} -TERM ${ZABBIX_BIN}
    rc_status -v
    ;;
    restart)
    $0 stop
    $0 start
    rc_status
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    ;;
    esac
    rc_exit

    Parameters marked in blue should look like this and restart all and woo-la!!!!

    Comment

    Working...