Ad Widget

Collapse

Get value from agent & Timeout while connecting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spirou
    Member
    • Jun 2016
    • 62

    #1

    Get value from agent & Timeout while connecting

    Hi,

    i am on zabbix and i can't connect to my host, i receive the message bellow :

    Get value from agent failed: cannot connect to [[host.test.zone.fr]:10050]: [111] Connection refused

    and

    Timeout while connecting to "host.test.zone.fr:161"

    From my serveur zabbix (ubuntu) with commande line "snmpget" to my my host
    "host.test.zone.fr" its ok but not in GUI zabbix :/

    any ideas ?

    regards.
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Check firewalls on both sides - on server side and on agent side.
    Sincerely yours,
    Aleksey

    Comment

    • Spirou
      Member
      • Jun 2016
      • 62

      #3
      Originally posted by aib
      Check firewalls on both sides - on server side and on agent side.
      There is no firewall, no iptables.

      it work on the zabbix server :

      snmpget -v2c comZabbix host.test.zone.fr 1.2.5.2.12210.0.1 (etc.)

      but not work in zabbix server GUI

      Comment

      • aib
        Senior Member
        • Jan 2014
        • 1615

        #4
        Originally posted by Spirou
        There is no firewall, no iptables.

        it work on the zabbix server :

        snmpget -v2c comZabbix host.test.zone.fr 1.2.5.2.12210.0.1 (etc.)

        but not work in zabbix server GUI
        I'm not sure what are you talking about.

        In first message you complained about broken connection between Zabbix Server and Zabbix Agent (port 10050)

        Now you are showing me that SNMP connection allowed (port 161).

        I assume that some "hosts-in-between" can pass SNMP packets and reject packets from high number ports (port 10050 in case of Zabbix).

        Did you try to connect from Zabbix server to agent by telnet?
        Code:
        Telnet host.test.zone.fr 10050
        Are you completely sure that Zabbix Agent started on client's side and listening to port 10050?

        Did you try to test Zabbix Agent on client's side?
        Code:
        zabbix_agentd -p
        Take a look on instruction about Zabbix Agent installation
        Zabbix Agent Installation on Ubuntu 1. Download agent package,     # wget http://www.zabbix.com/downloads/1.8.5/zabbix_agents_1.8.5.li...
        Sincerely yours,
        Aleksey

        Comment

        • Spirou
          Member
          • Jun 2016
          • 62

          #5
          Originally posted by aib
          I'm not sure what are you talking about.

          In first message you complained about broken connection between Zabbix Server and Zabbix Agent (port 10050)

          Now you are showing me that SNMP connection allowed (port 161).

          I assume that some "hosts-in-between" can pass SNMP packets and reject packets from high number ports (port 10050 in case of Zabbix).

          Did you try to connect from Zabbix server to agent by telnet?
          Code:
          Telnet host.test.zone.fr 10050
          Are you completely sure that Zabbix Agent started on client's side and listening to port 10050?

          Did you try to test Zabbix Agent on client's side?
          Code:
          zabbix_agentd -p
          Take a look on instruction about Zabbix Agent installation
          http://shifengchen1.blogspot.ca/2013...tallation.html
          well, in fact im using 99% snmp and in the GUI zabbix it say 'failed to connect' and the host is in 'red' while in command line it work like i said on my linux server zabbix (snmpget).

          ill hope be clear

          regards.

          Comment

          • Spirou
            Member
            • Jun 2016
            • 62

            #6
            I dont understand why snmp is not "available" in green on zabbix gui.

            Comment

            • aib
              Senior Member
              • Jan 2014
              • 1615

              #7
              Originally posted by Spirou
              I dont understand why snmp is not "available" in green on zabbix gui.
              What do you mean?
              I'm using Zabbix 3.0.3 and all my SNMP controlled devices have Green Availability rectangle
              Attached Files
              Sincerely yours,
              Aleksey

              Comment

              • Spirou
                Member
                • Jun 2016
                • 62

                #8
                Originally posted by aib
                What do you mean?
                I'm using Zabbix 3.0.3 and all my SNMP controlled devices have Green Availability rectangle

                yes and mine is red and when click on the red ti say :

                Timeout while connecting to "host.test.zone.fr:161"

                Comment

                • Spirou
                  Member
                  • Jun 2016
                  • 62

                  #9
                  the item snmpV2agent i create in zabbix had probably the wrong snmpass OID and i think that the reason snmp is in red.
                  how can i make a simple test with snmp with an OID like "sysLocation"?

                  regards.

                  Comment

                  • aib
                    Senior Member
                    • Jan 2014
                    • 1615

                    #10
                    1) Create a new host
                    2) Add SNMP Interface with correct IP address
                    3) Add template "Template SNMP device"

                    Switch to Monitoring -> Latest Data, select new host and wait for new data.
                    In the same time, check zabbix_server.log for any error messages.
                    Code:
                    tail -f /var/log/zabbix/zabbix_server.log
                    For me, all error messages about "Timeout...." mean - It's smell Firewall-ish.
                    Sincerely yours,
                    Aleksey

                    Comment

                    • Spirou
                      Member
                      • Jun 2016
                      • 62

                      #11
                      ok tx the result :

                      1352:20160629:222823.229 SNMP agent item "sysUpTime" on host "hostsnmp" failed: first network error, wait for 15 seconds
                      1354:20160629:222846.462 SNMP agent item "sysUpTime" on host "hostsnmp" failed: another network error, wait for 15 seconds
                      1354:20160629:222909.484 temporarily disabling SNMP agent checks on host "hostsnmp": host unavailable

                      Comment

                      • Spirou
                        Member
                        • Jun 2016
                        • 62

                        #12
                        1354:20160629:223106.601 temporarily disabling SNMP agent checks on host "ubuntu": host unavailable

                        Comment

                        • Spirou
                          Member
                          • Jun 2016
                          • 62

                          #13
                          Well, it seem when i add snmp interface with 127.0.0.1 it work but when i put 192.168.1.13 it dont work, its the same server !

                          Comment

                          • aib
                            Senior Member
                            • Jan 2014
                            • 1615

                            #14
                            Check this about configuration of SNMPD and iptables on Ubuntu
                            http://serverfault.com/questions/333...cess-on-ubuntu
                            Sincerely yours,
                            Aleksey

                            Comment

                            • zabx_ks
                              Member
                              • May 2016
                              • 48

                              #15
                              Hi,

                              Small question...
                              1) Have you set your hostname host.test.zone.fr in zabbix_agent.conf file?
                              whatever yes or no I recommend better to use IP address not hostnames.

                              Code:
                              Server=***********
                              ServerActive=*******

                              2) And +1 what Aib said - check if your ports are open and deal with SELinux.

                              3) Can you find more info in log file?

                              zabx_ks

                              Comment

                              Working...