Ad Widget

Collapse

Agent Errors After Server Shut down and Startup.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cgroothius
    Member
    • Sep 2008
    • 37

    #1

    Agent Errors After Server Shut down and Startup.

    Hi. Newbie.

    I had a working install until I shut off my Zabbix box yesterday. After powering it up today, I can log into the system via web. Windows Agents however are reporting
    Event Type: Warning
    Event Source: ZABBIX Agent
    Event Category: None
    Event ID: 1
    Date: 2/24/2009
    Time: 2:09:40 PM
    User: N/A
    Computer: P####A01
    Description:
    [3876]: Getting list of active checks failed. Will retry after 60 seconds

    I cannot telnet to server on port 10050 or 10051. I get "connection refused"

    I have checked to see SE linux is disabled and firewall is also off...

    Any suggestions? I ran netstat and I do not see anything listening on 10050 or 10051.

    Thanks
    Frustrated.
  • Calimero
    Senior Member
    • Nov 2006
    • 481

    #2
    Is zabbix_server running ?
    Maybe you init.d scripts aren't working properly and zabbix didn't restart on boot ?

    Comment

    • cgroothius
      Member
      • Sep 2008
      • 37

      #3
      Sorry to be a dunce but are there a couple of quick commands I can use to check those possibilities

      Comment

      • jroberson
        Senior Member
        • May 2008
        • 124

        #4
        What distro are you using? If it is a RedHat based distro, you can use the "service" command to start/stop/restart/status that particular service. Try "service zabbix_server status" and see if it is even running. If not try "service zabbix_server start" and see if you get any errors. If you do, check the zabbix log (default "\tmp\zabbix_server.log") and see if it is something going on there.

        Comment

        • cgroothius
          Member
          • Sep 2008
          • 37

          #5
          Seems like I have issues...

          [cgroothius@zabbix /]$ service zabbix_server status
          zabbix_server: unrecognized service
          [cgroothius@zabbix /]$

          Not sure how this can be as it was working just fine day before yesterday.

          Comment

          • jroberson
            Senior Member
            • May 2008
            • 124

            #6
            Well, that just means that it might not have been setup in the init.d yet. Use a method from the Wiki - Howtos to setup your init.d. BUT before that you might just try manually starting the service by running zabbix_server and see what error, if any, pops up. If it works, then it might just not be starting up automagically on restart.

            (PS: I don't think you can directly run zabbix_server as root. I remember having some issues with that but it was a while ago.)

            (PPS: You could also try ps -aux and see if zabbix_server is running. )
            Last edited by jroberson; 25-02-2009, 21:32. Reason: Forgot the obvious answer

            Comment

            • cgroothius
              Member
              • Sep 2008
              • 37

              #7
              Thanks for your help with this. Seems zabbix is not running..no sign of it in output from ps -aux:

              When i run "xabbix_server" I see the following...

              [root@zabbix tmp]# zabbix_server
              zabbix_server [23610]: Cannot open [/tmp/zabbix_server.log] [Permission denied]
              [root@zabbix tmp]#

              Comment

              • a2s
                Junior Member
                • Feb 2009
                • 2

                #8
                Originally posted by cgroothius
                Thanks for your help with this. Seems zabbix is not running..no sign of it in output from ps -aux:

                When i run "xabbix_server" I see the following...

                [root@zabbix tmp]# zabbix_server
                zabbix_server [23610]: Cannot open [/tmp/zabbix_server.log] [Permission denied]
                [root@zabbix tmp]#

                You must change permissions for write and change..

                Comment

                • cgroothius
                  Member
                  • Sep 2008
                  • 37

                  #9
                  Still not happening for me..

                  Do I need to change something here ??

                  [root@zabbix tmp]# ls -l zabbix_server.log
                  -rwxr-xr-x 1 cgroothius nkeeter 17920 2009-02-23 11:03 zabbix_server.log

                  [root@zabbix tmp]# zabbix_server
                  zabbix_server [27989]: Cannot open [/tmp/zabbix_server.log] [Permission denied]



                  Thanks again..

                  Comment

                  • Calimero
                    Senior Member
                    • Nov 2006
                    • 481

                    #10
                    Either you start zabbix_server as non-root.

                    Or you start it as root and then zabbix will switch to user "zabbix" (which you need to create first, of course).

                    Any way, the user (zabbix or your non-zabbix/non-root user) must have write access to log file + pid file.

                    Comment

                    • cgroothius
                      Member
                      • Sep 2008
                      • 37

                      #11
                      Thanks all for your help!!

                      Solution was to chown zabbix /etc/zabbix_server.log

                      I then ran command zabbix_server and zabbix server started with no errors.

                      Seems that after the reboot the other day a new log file was created with different permissions (I have a zabbix_server.log.old as well). is this "normal" behaviour?

                      Thanks again,
                      Colin.

                      Comment

                      • Calimero
                        Senior Member
                        • Nov 2006
                        • 481

                        #12
                        zabbix (both server and agents) can rotate their log files.

                        There are configuration options that allow you to tell zabbix when to rotate logs (or actually what maximum size log files can reach). Or you can disable log rotation (if you prefer using logrotate which gives you more control).

                        Comment

                        • cgroothius
                          Member
                          • Sep 2008
                          • 37

                          #13
                          Thanks again.

                          I have a an additional issue now in that the agent on the Zabbix Server will not start...I cant seems to get passed this. any ideas for that side of thinggs?

                          C.

                          Comment

                          • jroberson
                            Senior Member
                            • May 2008
                            • 124

                            #14
                            Try the same stuff as before. Try to run it manually and then check the logs. It might be a permissions issue again just like the other one.

                            Comment

                            Working...