Ad Widget

Collapse

hosts and dns : error gethostnyname()

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dsipe
    Senior Member
    • Oct 2006
    • 184

    #1

    hosts and dns : error gethostnyname()

    hye,

    i create a host with its DNS alias instead if its @ip.

    when server start polling, i've got the message "gethostbyname() failed [ Unknown host] under the "Configuration -> Hosts" menu.

    Pinging the alias name on the zabbix's server work fine.

    What's wrong ??
  • markpr
    Member
    • Sep 2005
    • 31

    #2
    Try isolating this from zabbix and see if you can resolve DNS from some simple apache or php scripts.

    If I was to guess, based on the symptoms, you can't resolve DNS from apache because you have apache in a chroot jail without the libraries needed to resolve DNS.

    Comment

    • dsipe
      Senior Member
      • Oct 2006
      • 184

      #3
      i find the source of the problem: in the database, the length of the IP adress field is limited to 15 char.

      When creating my host, i try putting the all alias name [ serveur.eram.loc ] and this was truncated to serveur.eram.lo ...

      that was the reason.

      Can't this field by extend in future release ?

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        serveur.eram.loc does'n sound like a IP address!
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        • dsipe
          Senior Member
          • Oct 2006
          • 184

          #5
          right, but searching in the forum, i found a post telling that to use the DNS name of a serveur, you need to put it in the @ip field.

          That's not correct ?

          Comment

          Working...