Ad Widget

Collapse

Zabbix_Server wont start

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ploochan
    Member
    • Oct 2009
    • 42

    #1

    Zabbix_Server wont start

    Hello,
    I am new in Zabbix. And now I cant start Zabbix_Server

    This is what I get in my command:
    www-1:/etc/init.d# ./zabbix_agent start
    Starting Zabbix agent: zabbix_agentd
    www-1:/etc/init.d# ./Zabbix_Server start
    sh-3.1#

    And I cant find any problems in my logs. I even restart Debian, and still wont restart/start

    here is my script:

    #! /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/local/sbin/zabbix_server
    NAME=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


    Please help!!!!
    Last edited by ploochan; 02-02-2010, 23:36.
  • almly
    Junior Member
    • Feb 2010
    • 4

    #2
    Hi,

    Just to tell you that, i have the same problem !!

    My Zabbix server wont start. All in the web configuration panel is OK, but in the web interface at Zabbix status, i have the following line : "Zabbix server running --> value = NO"

    Have you this same line in your web interface ?

    Thanks

    Alex

    Comment

    • ploochan
      Member
      • Oct 2009
      • 42

      #3
      yes, and the reason is because is not started on the service on the UNIX side. Any ideas?

      Comment

      • zabbix_zen
        Senior Member
        • Jul 2009
        • 426

        #4
        Have you really checked zabbix_server.log?
        It must give you some clue.

        Maybe wrong password on zabbix_server.log when connecting to the DB.

        Comment

        • ploochan
          Member
          • Oct 2009
          • 42

          #5
          ok, at the command prompt, this is what I get
          www-1:~# mysql
          ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

          However, please see attachment

          how is it possible I am using the same user name and on the web configuration is good, but not on the command prompt

          PS: sorry if the question is silly but I'm new at Debian, and Zabbix.

          Also, I found this link: http://www.zabbix.com/forum/showthre...server+running
          do you think by recreating/dropping tables, the service will restart?

          THANKS AGAIN!
          Attached Files
          Last edited by ploochan; 03-02-2010, 18:06.

          Comment

          • ploochan
            Member
            • Oct 2009
            • 42

            #6
            ok, I solved this, but I really dont know how. I just access to mysql to check the tables, and after that I decided to start the services, and it works. I hope stays like this for a while

            Comment

            • zabbix_zen
              Senior Member
              • Jul 2009
              • 426

              #7
              You must guarantee the password you typed in the frontend initial configuration is the same you configured zabbix_server.conf

              About the command line,
              you must access it(as an example),

              mysql -u root -p
              (and typing next the password)

              (-u root can be replace by -u zabbixdb or whatever the DB you want to access)

              Comment

              • almly
                Junior Member
                • Feb 2010
                • 4

                #8
                Oh happy for you ! Infortunately for me the problem is still here !

                As you can see on the picture, in my Zabbix_server log i have the following error :
                "ERROR : cannot create PID file [/var/run/zabbix-server/zabbix_server.pid] [No such file or directory]"

                I tried to create a "zabbix-server" directory but when i restart my server, the directory dissapear !!

                Is anyone have an idea ? i'm sorry, i'm new too in zabbix and linux so... !

                Thanks for you help !
                Attached Files

                Comment

                • alj
                  Senior Member
                  • Aug 2006
                  • 188

                  #9
                  Originally posted by almly
                  Oh happy for you ! Infortunately for me the problem is still here !

                  As you can see on the picture, in my Zabbix_server log i have the following error :
                  "ERROR : cannot create PID file [/var/run/zabbix-server/zabbix_server.pid] [No such file or directory]"

                  I tried to create a "zabbix-server" directory but when i restart my server, the directory dissapear !!

                  Is anyone have an idea ? i'm sorry, i'm new too in zabbix and linux so... !

                  Thanks for you help !
                  /var/run most likely a ram drive on your distribution of linux. So it does not persist through reboots.
                  So modify init script to create this dir if it does not exist or change location of pid file via config to create pid file in /var/run instead.

                  Comment

                  • ploochan
                    Member
                    • Oct 2009
                    • 42

                    #10
                    Originally posted by almly
                    Oh happy for you ! Infortunately for me the problem is still here !

                    As you can see on the picture, in my Zabbix_server log i have the following error :
                    "ERROR : cannot create PID file [/var/run/zabbix-server/zabbix_server.pid] [No such file or directory]"

                    I tried to create a "zabbix-server" directory but when i restart my server, the directory dissapear !!

                    Is anyone have an idea ? i'm sorry, i'm new too in zabbix and linux so... !

                    Thanks for you help !

                    try using the script that I have in the beginning of this Thread. You can find the file under /etc/init.d/Zabbix_Server
                    Last edited by ploochan; 03-02-2010, 21:43.

                    Comment

                    • almly
                      Junior Member
                      • Feb 2010
                      • 4

                      #11
                      /var/run most likely a ram drive on your distribution of linux. So it does not persist through reboots.
                      So modify init script to create this dir if it does not exist or change location of pid file via config to create pid file in /var/run instead.
                      try using the script that I have in the beginning of this Thread. You can find the file under /etc/init.d/Zabbix_Server
                      Ok, i try this and i'll tell you if it's ok or not.

                      Thanks very much

                      Comment

                      • almly
                        Junior Member
                        • Feb 2010
                        • 4

                        #12
                        Ok, my zabbix server value is running now !!

                        Ploochan i took your script, i've create a zabbix-server folder in /var/run and i've restart init.d/zabbix-agent

                        I'll see if it stays like this !

                        Thanks to you

                        Comment

                        • RayVad
                          Junior Member
                          • Mar 2010
                          • 1

                          #13
                          Create the PID file under /home/zabbix/ (e.g. /home/zabbix/run/) and it will run fine.
                          Using Ubuntu 8.04 (Hardy Heron) and compiled zabbix 1.8.1.

                          Comment

                          • ploochan
                            Member
                            • Oct 2009
                            • 42

                            #14
                            so i'm back to same problem. Restarted Debian, and now I'm on 1.8.2
                            any more ideas?

                            Comment

                            • ploochan
                              Member
                              • Oct 2009
                              • 42

                              #15
                              this is all what i can see on the logs related to zabbix

                              May 20 10:00:01 www-1 /USR/SBIN/CRON[28051]: (root) CMD (start-stop-daemon --oknodo --start --pidfile /var/run/zabbix_server/zabbix_server.pid --exec /usr/local/sbin/zabbix_server < /dev/null &> /dev/null #Zabbix Server Check)
                              May 20 11:00:01 www-1 /USR/SBIN/CRON[30575]: (root) CMD (start-stop-daemon --oknodo --start --pidfile /var/run/zabbix_server/zabbix_server.pid --exec /usr/local/sbin/zabbix_server < /dev/null &> /dev/null #Zabbix Server Check)
                              May 20 12:00:01 www-1 /USR/SBIN/CRON[709]: (root) CMD (start-stop-daemon --oknodo --start --pidfile /var/run/zabbix_server/zabbix_server.pid --exec /usr/local/sbin/zabbix_server < /dev/null &> /dev/null #Zabbix Server Check)
                              May 20 12:05:38 www-1 /etc/mysql/debian-start[3785]: zabbix.sessions

                              Comment

                              Working...