Ad Widget

Collapse

gethostbyname() failed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • timc3
    Junior Member
    • Nov 2006
    • 2

    #1

    gethostbyname() failed

    We had a power outage last night which unfortunetly ended up in taken down everything, even zabbix and upon rebooting almost all the host entries had errors next to them stating:

    gethostbyname() failed [Host name lookup failure]

    Unfortunetly there was no problem as all the machines where back and healthy and running. I checked whether it was a DNS problem by querying the internal DNS on the machine, even creating a script that uses gethostbyname to resolve it on the machine. It resolved the correct address.

    The agent was running the machines, I checked by telneting to the correct port.

    The only thing that resolved the problem was deleting the host and then re-entering it. As soon as I did that it came back straight away with no problem, but I can't do this with every host because they have alot of configuration options and I will have to enter everything again.

    I am running it on a Debian box from an apt-install version.
  • timc3
    Junior Member
    • Nov 2006
    • 2

    #2
    Solved it.

    Right, I thought that I would have a dig around in the database, and it looks like I have solved it, though I am not pleased at the way I have had to do this.

    In the database, I had a look under the hosts table and in the "disable_until" field I noticed all the hosts that I have a problem with have a large number, so I changed this to 0 for a host, and now I can see that host again in Zabbix.

    Is their a function on the webgui that changes this somewhere? If not there should be.

    Comment

    • markpr
      Member
      • Sep 2005
      • 31

      #3
      Tim,

      I think you can just go into the Host Configuration and change the host status manually back to "monitored"

      The polling intervals can be adjusted in the zabbix_server configuration file:

      http://www.zabbix.com/manual/v1.1/config_files.php

      UnavailableDelay, UnreachableDelay and UnreachablePeriod.

      I followed the same procedure as you in some of the earlier alpha, beta's to kick-start monitoring of the servers again but these server parameters look promising.

      Mark
      Last edited by markpr; 03-11-2006, 16:31.

      Comment

      • Nelson O. Aponte
        Junior Member
        • Mar 2007
        • 5

        #4
        gethostbyname() failed

        Hi everyone, I'm having a problem with Zabbix 1.1.7 and I'd appreciate any help.
        A few days ago I installed Zabbix Server and Agent on SuSe Enterprise Server 10, and it worked almost perfectly, I could monitor that OS, but then I installed the agent on Windows 2003 Server but it didn't work.
        After some time looking around, I realized that I couldn't telnet the port 10051 (Server's port) from the Windows server and neither from the SuSe server, so I checked the server's log and it was not up, however I could see the agent up and gathering data on the web page, so I tried to fix the server (maybe that was preventing the Windows server from sending data), but when I loaded the server again, the linux agent stoped reporting data and the host became unreachable. Before that the Availability status for the Windows server was "Unknown", but from that moment on I can see every server as "Not available".
        Another thing I discovered was that neither the zabbix server nor the agent where being loaded at boot time due to an error with mysql, the server says:
        -Query failed: MySQL server has gone away [2006]
        - One server process died. Shutting down...
        - ZABBIX server is down

        So I have to start the server and the agent manually everytime I restart SuSe, but they seem to start correctly, however they agent is still not available.
        I also tried changing the default ports, 10060 for the server and 10061 for the SuSe agent, but it didn't work.
        I've also opened the ports on the firewalls and disabled them because nothing seems to work out.

        By the way, when I start the server and the agent, I can telnet the ports successfully from any PC (I don't see any other applications running on those ports), so I don't understand what's going on. The hostnames are correctly set on both the agent and the web page, the agent starts correctly on both SuSe and Windows.

        Does anybody know how to solve this?
        Thanks
        Last edited by Nelson O. Aponte; 02-04-2007, 07:34.

        Comment

        Working...