Ad Widget

Collapse

Zabbix server cannot connect to agent

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShadowMonster
    Junior Member
    • Sep 2012
    • 14

    #1

    Zabbix server cannot connect to agent

    I have zabbix server in my home server and I want monitor other server fair away (other continent) - well server work good with his local agent etc. I install agent only on remote Linux server but zabbix server all time cannot connect I get message:

    Get value from agent failed: cannot connect to [[my_server_hostname]:10050]: [22] Invalid argument


    It's not fail of firewall or something I can telnet 10050 from server and 10051 from agent side.

    Zabbix server logs show me same thing I check yet agent log and it show me:

    22293:20120923:211802.372 Sleeping for 1 second(s)
    22289:20120923:211802.469 In update_cpustats()
    22289:20120923:211802.469 End of update_cpustats()
    22293:20120923:211803.372 In send_buffer() host:'my_server_dns_hostname' port:10051 values:0/100
    22293:20120923:211803.372 End of send_buffer():SUCCEED

    Seams all fine but it still show me this error. Can someone tell what what can be wrong.

    this value 0/100 is all time same like it repeat I think with ping from zabbix server it should not be random or something like wrote in zabbix protocol?
  • mbsit
    Senior Member
    • Sep 2012
    • 130

    #2
    Hi
    First try to get value from agent using: zabbix_get tool - localy
    Log in to remote server and try to:

    zabbix_get -s localhost -p 10050 -k agent.ping

    After that try to do it remotely from Zabbix server.

    zabbix_get -s IP_OF_REMOTE_AGENT -p 10050 -k agent.ping

    Bests,
    Grzegorz

    --
    Wdrożenia Zabbix - Warszawa
    Pozdrawiam
    Grzegorz Grabowski
    ____
    Wdrożenia, szkolenia, umowy serwisowe
    Warszawa - Polska

    Comment

    • ShadowMonster
      Junior Member
      • Sep 2012
      • 14

      #3
      Dzięki Grzegorzu za odpowiedź.

      Well I check it in both cases it show just number 1 (any time when I try) - so I think it mean that it work correctly.

      Just maybe more info about my server. It is in my home network where I have dynamic IP so to connect I use DNS instead of IP because of dynDNS service (freedns.afraid.org).

      I think maybe it is more problem with network or server setting - when I telnet server from my remote one by telnet my_ip 10051 then I got connection but it freeze on Escape character - it do not disconnect but maybe this protocol is that.

      Is there any tool to test connection from agent?

      Comment

      • mbsit
        Senior Member
        • Sep 2012
        • 130

        #4
        YES
        The name is zabbix_sender

        Send any value to any host, you should type smth like:

        zabbix_sender -z SERVER_IP -s HOSTNAME -k KEY -o VALUE -vv

        only SERVER_IP should be correct.

        and then response like this:

        zabbix_sender [3469]: DEBUG: answer [{
        "response":"success",
        "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000081"}]
        info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000081"
        sent: 1; skipped: 0; total: 1

        It means - you connected.

        I pozdrawiam

        Bests,
        Grzegorz
        Pozdrawiam
        Grzegorz Grabowski
        ____
        Wdrożenia, szkolenia, umowy serwisowe
        Warszawa - Polska

        Comment

        • ShadowMonster
          Junior Member
          • Sep 2012
          • 14

          #5
          Well I check it and I got:

          zabbix_sender [6588]: DEBUG: answer [{
          "response":"success",
          "info":"Processed 0 Failed 1 Total 1 Seconds spent 0.000041"}]
          info from server: "Processed 0 Failed 1 Total 1 Seconds spent 0.000041"
          sent: 1; skipped: 0; total: 1

          So all seams fine but I still have this connection error on my front end

          Is zabbix use also some other ports? I forgot mention that my ISP is blocking all standard ports but 10050 and 10051 are not but maybe he use some other ones? zabbix do not use UDP?

          Pozdrawiam

          Comment

          • mbsit
            Senior Member
            • Sep 2012
            • 130

            #6
            So, we check communication. All is OK.

            Temporary change the host configuration to use IP not DNS name.
            Agent works in active or Passive mode.
            If active, check the HOSTNAME in zabbix_agentd.conf and in Frontend (twice)

            Standard port doesn't matter, Zabbix use only 10050/10051 TCP.

            Bests,
            Grzegorz

            --
            Wdrożenia Zabbix - Warszawa
            Pozdrawiam
            Grzegorz Grabowski
            ____
            Wdrożenia, szkolenia, umowy serwisowe
            Warszawa - Polska

            Comment

            • ShadowMonster
              Junior Member
              • Sep 2012
              • 14

              #7
              LOL I found it!

              Problem was on server side configuration - SourceIP set - I had localhost when I change it on server DNS it start working.

              Thank You very much Greg for support - it point me in correct direction. I would happy buy you a beer but I'm in Sao Paulo now

              Please can you look in this topic yet: http://www.zabbix.com/forum/showthread.php?t=29860

              I just need some simple suggestion.

              Thanks & Regards
              Martin

              Comment

              Working...