Ad Widget

Collapse

Server cannot contact agent running in localhost!?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jbatista
    Junior Member
    • Jun 2009
    • 2

    #1

    Server cannot contact agent running in localhost!?

    Hi everyone,

    I'm running Zabbix server and agent on localhost with a Ubuntu Karmic Linux (release 9.10) desktop as I'm trying to learn about it by experimenting. The server and agent versions are 1:1.6.4-2build1. Installation (apt-get install) went without a problem. Everything seems to be almost working.

    Except for the server not being able to monitor the agent on localhost (127.0.0.1). On the web interface, the Configuration->Hosts show 1 host (localhost) with IP=127.0.0.1 and Port=10050, using Template_Linux. The status says "Monitored", but availablity="Not available" and the error message is:
    Got empty string from [127.0.0.1]. Assuming that agent dropped connection because of access permissions
    I've tried to switch off the Ubuntu Uncomplicated FireWall (ufw), and it makes no difference, so I guess it's not coming from the firewall.

    Relevant file contents follows:
    zabbix_server.conf
    ListenPort=10051
    ListenIP=127.0.0.1
    SenderFrequency=30
    DebugLevel=3
    Timeout=5
    PidFile=/var/run/zabbix-server/zabbix_server.pid
    LogFile=/var/log/zabbix-server/zabbix_server.log
    zabbix_agend.conf
    Server=localhost
    Timeout=3
    Sample from zabbix_server.log:
    7382:20100423:150406 Item [localhost:agent.ping] error: Got empty string from [127.0.0.1]. Assuming that agent dropped connection because of access permissions
    Sample from zabbix_agentd.log:
    7491:20100423:145156 zabbix_agentd active check started [localhost:10051]
    Output from zabbix_agent -t system.uptime:
    user@ubuntu:~$ zabbix_agent -t system.uptime
    system.uptime [u|10704]
    user@ubuntu:~$ telnet localhost 10051
    Trying ::1...
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    system.uptime
    Connection closed by foreign host.
    user@ubuntu:~$
    Content of /etc/hosts:
    127.0.0.1 localhost
    127.0.1.1 ubuntu

    # The following lines are desirable for IPv6 capable hosts
    ::1 localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    Has anyone faced this problem with the Ubuntu 9.10 ("Karmic Koala") Linux distro? Are there any settings that have to be performed outside of the installation through apt-get install? I'm using apache2 and mysql on the same machine.

    I'll provide further information on request.
    Thank you in advance for your feedback!
    Last edited by jbatista; 23-04-2010, 15:21.
  • jbatista
    Junior Member
    • Jun 2009
    • 2

    #2
    Solution

    Don't you just love when you answer your own question (and RTFM)? ...

    I've found this post: http://www.zabbix.com/forum/showthread.php?t=11329
    Therefore, I edited the zabbix_agentd.conf file and changed
    Server=localhost
    to
    Server=127.0.0.1
    (didn't even had to provide an IPv6 address instead). I restarted the agentd and it now works , the Configuration->Hosts lists now localhost with Availability="Available" and the error="-".

    Hopes this helps others!

    Comment

    • Martin Mspace
      Junior Member
      • Apr 2017
      • 1

      #3
      zabbix server not receiving data from agent

      I spent almost two days trying to resolve and issue with my zabbix server not receiving data from an agent in another server.
      I have solved the issue by editing my zabbix-agent.conf file Hostname from using address like myip.address.com to the real ip as 192.168.6.5.

      I checked that the issue was caused by my server conf file in /etc/hosts that had been changed by another guy to the gateway ip instead of the real ip that the hostname should resolve like this:
      192.168.1.9 myip.address.com and hence 'myip.address.com' resolve to wrong ip address which i noted lately after solving the issue as above.

      Comment

      Working...