Ad Widget

Collapse

ZBX_TCP_READ() failed [Connection reset by peer]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AudiAddict
    Junior Member
    • Jun 2008
    • 29

    #1

    ZBX_TCP_READ() failed [Connection reset by peer]

    I've recently got a zabbix server installed.

    And in the local network it seems to be working perfectly.

    But I cannot get it to monitor our servers in the datacenter which are not in the local network.

    I've done the following :

    Created port mappings for 10051 and 10050 on both the server and the client.

    Firewall states the following :


    Jun 4 20:27:46 id=firewall.nl time="2008-06-04 18:27:46" fw="51005636" pri=5 msg="Open inbound, NAT tunnel" proto=10050/tcp src=zabbixserverip srcport=58194 nat=ourclientipexternal natport=10050 dst=ourclientipinternal dstport=10050 rule=4

    Jun 4 20:27:46 id=firewall.nl time="2008-06-04 18:27:46" fw="51005636" pri=5 msg="Close inbound, NAT tunnel" proto=10050/tcp src=ourclientipexternal srcport=58194 nat=ourclientip natport=10050 dst=ourclientipinternal dstport=10050 rule=4 duration=0 sent=175 rcvd=104 pkts_sent=3 pkts_rcvd=2

    Jun 4 20:28:16 id=firewall.nl time="2008-06-04 18:28:16" fw="51005636" pri=5 msg="Open outbound, NAT" proto=10051/tcp src=clientipinternal srcport=2645 nat=ourclientipexternal natport=2645 dst=zabbixserver dstport=10051 rule=5

    Jun 4 20:28:40 id=firewall.nl time="2008-06-04 18:28:40" fw="51005636" pri=5 msg="Close outbound, NAT" proto=10051/tcp src=ourclientipinternal srcport=2645 nat=ourclientipexternal natport=2645 dst=zabbixserverip dstport=10051 rule=5 duration=24 sent=294 rcvd=260 pkts_sent=6 pkts_rcvd=6


    In other words there is traffic being sent back and forth. From the logs I see that the client is closing the connection or something?

    I've tried binding the agent.conf settings to the internalclient ip and external client ip. And not binding it all. both no go.

    Restarted the server and the service, ran the exe files in the zabbix server dir.

    Using Zabbix 1.4.5 btw and the agent too. OS is windows server 2003 with NO FIREWALL enabled.

    Anybody know what's wrong? I can ping and resolve the ip from the zabbix server btw.

    edit: logs from the server say :



    3387:20080605:100105 Get value from agent failed. Error: ZBX_TCP_READ() failed [Connection reset by peer]
    3387:20080605:100105 Host [Lapaz] will be checked after 60 seconds

    Last edited by AudiAddict; 05-06-2008, 10:02.
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    Check the Agent.conf file, make sure the server IP is the IP address from which the connection will come from, ie your Firewall, not the Zabbix server. Also from the server telnet to the agent and see if you can receive a key. ie

    telnet agent.ip.address portnum (telnet 1.2.3.4 10050)
    agent.version

    You should receive a string stating the version of the agent back. If you don't then it's a network configuration issue, or a client configuration issue.
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • hanarina
      Junior Member
      • May 2008
      • 11

      #3
      got the same problems..

      i have got the same problems..ZBX_TCP_READ() failed [Connection reset by peer]..im running windows as the agent is there any configuration i miss??

      Comment

      • AudiAddict
        Junior Member
        • Jun 2008
        • 29

        #4
        Originally posted by nelsonab
        Check the Agent.conf file, make sure the server IP is the IP address from which the connection will come from, ie your Firewall, not the Zabbix server. Also from the server telnet to the agent and see if you can receive a key. ie

        telnet agent.ip.address portnum (telnet 1.2.3.4 10050)
        agent.version

        You should receive a string stating the version of the agent back. If you don't then it's a network configuration issue, or a client configuration issue.
        The bind ip you mean I assume?

        I have a internal adress (172.16.20.25) and a external address (public) 80.85.x.x.

        I have tried both, both no go. Firewall address? That would be the gateway ip I assume?

        telnet gives me this


        Zabbix:~# telnet lapaz 10050
        Trying 172.16.5.20...
        Connected to lapaz.b-net.local.
        Escape character is '^]'.
        Connection closed by foreign host.


        It doesn't even allow me to type agent.version (quits right away). Connection closed by foreign host seems like the same error as the topic thread title.

        I tried all ip's (internal/external and with dns hostname)

        Comment

        • nelsonab
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2006
          • 1233

          #5
          Originally posted by AudiAddict
          telnet gives me this


          Zabbix:~# telnet lapaz 10050
          Trying 172.16.5.20...
          Connected to lapaz.b-net.local.
          Escape character is '^]'.
          Connection closed by foreign host.


          It doesn't even allow me to type agent.version (quits right away). Connection closed by foreign host seems like the same error as the topic thread title.

          I tried all ip's (internal/external and with dns hostname)
          That would mean the ip address for the server in the client configuration file is not the same as the one from which the connection is coming from.

          If your connection from the server is traversing a firewall which is translating the source IP address you will need to set the server line in the client file to be that IP address.

          Example

          Code:
            Server       -->        Firewall       -->    Client
          192.168.0.100    192.168.0.1  1.2.3.4           1.2.3.5
                            (private)   (public)
          In the above example the client will need to be configured with 1.2.3.4 as the IP address of the server.
          RHCE, author of zbxapi
          Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
          Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

          Comment

          • AudiAddict
            Junior Member
            • Jun 2008
            • 29

            #6
            It's working now!! Thanks Nelson!

            Comment

            • chris_ok
              Junior Member
              • Jun 2008
              • 11

              #7
              Hi Nelson/audiaddict,

              I've same problem like audiaddict I'm running zabbix server ver 1.6.1 and zabbix agent 1.4.4 for windows.

              the error message is ZBX_TCP_READ() failed [Connection reset by peer]

              I've tried to telnet my windows server
              zabbix@EniNMS:~$ telnet 10.159.40.44 10050
              Trying 10.159.40.44...
              Connected to 10.159.40.44.
              Escape character is '^]'.
              Connection closed by foreign host.
              zabbix@EniNMS:~$ telnet idsv0023 10050
              Trying 10.159.40.44...
              Connected to idsv0023.eniindonesia.pri.
              Escape character is '^]'.
              Connection closed by foreign host.
              zabbix@EniNMS:~$ ping idsv0023
              PING idsv0023.eniindonesia.pri (10.159.40.44) 56(84) bytes of data.
              64 bytes from idsv0023.eniindonesia.pri (10.159.40.44): icmp_seq=1 ttl=128 time=0.450 ms
              64 bytes from idsv0023.eniindonesia.pri (10.159.40.44): icmp_seq=2 ttl=128 time=0.275 ms
              ^X
              --- idsv0023.eniindonesia.pri ping statistics ---
              2 packets transmitted, 2 received, 0% packet loss, time 999ms
              rtt min/avg/max/mdev = 0.275/0.362/0.450/0.089 ms
              zabbix@EniNMS:~$
              I'm not be able to type agent.version

              there's no firewall between zabbix server and zabbix agent.
              between zabbix server and agent is one segment network address.
              and one more thing is I'm also running with zabbix server ver 1.4.5 and zabbix agent ver 1.4.4 for windows it's already running with no error.

              Please advice.....
              Last edited by chris_ok; 02-01-2009, 04:43.

              Comment

              Working...