Ad Widget

Collapse

Zabbix agents not connecting when on different subnet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zsysadmin
    Junior Member
    • Sep 2011
    • 2

    #1

    Zabbix agents not connecting when on different subnet

    We added a new subnet (10.40.0.0) and have a few servers on it. The Zabbix server is on the older subnet (10.30.0.0). The configuration has been checked and the server is listening on the correct interfaces while the client is looking at the correct server (on the 10.30 subnet).

    The client is reporting this error over and over:
    Code:
     15080:20110928:002429 Timeout while answering request
     15080:20110928:002429 Getting list of active checks failed. Will retry after 60 seconds
    On the server end the error is:

    Code:
    Got empty string from [*server*]. Assuming that agent dropped connection because of access permissions
    Should Zabbix have any problems across subnets?
    Last edited by zsysadmin; 29-09-2011, 02:15.
  • frater
    Senior Member
    • Oct 2010
    • 340

    #2
    If you have your subnetmask wrong you will be able to "send" data, but not receive them....
    My guess is that you have your routing all wrong, but can't really tell as you're not giving enough data here.....

    are those servers even able to ping each other?

    It can also be that you have to adapt your routing table to make sure the replies aren't coming from the default IP but from the IP it is expecting it from....

    You haven't given enough data... but this may put you on the right track:

    route add -net 10.40.0.0 netmask 255.255.0.0 dev <dev>
    route add -net 10.30.0.0 netmask 255.255.0.0 dev <dev>
    Last edited by frater; 29-09-2011, 03:27.
    Zabbix agents on Linux, FreeBSD, Windows, AVM-Fritz!box, DD-WRT and QNAP

    Comment

    • zsysadmin
      Junior Member
      • Sep 2011
      • 2

      #3
      Yes I am able to ping between the servers as well as SSH into them.

      When I telnet into the Zabbix server it seems to be happy as a clam

      Code:
      telnet 10.30.0.123 10051
      Trying 10.30.0.123...
      Connected to 10.30.0.123.
      Escape character is '^]'.
      But when I telnet from the server to the client the connection will close as soon as it's established.

      Code:
      telnet 10.40.4.1 10050
      Trying 10.40.4.1...
      Connected to 10.40.4.1.
      Escape character is '^]'.
      Connection closed by foreign host.
      I think the problems are network related but I can't be sure, would those route commands help with that or is there another way to test network issues?
      Last edited by zsysadmin; 29-09-2011, 19:37.

      Comment

      • jerrac
        Junior Member
        • Jan 2012
        • 4

        #4
        Originally posted by zsysadmin
        Yes I am able to ping between the servers as well as SSH into them.

        When I telnet into the Zabbix server it seems to be happy as a clam

        Code:
        telnet 10.30.0.123 10051
        Trying 10.30.0.123...
        Connected to 10.30.0.123.
        Escape character is '^]'.
        But when I telnet from the server to the client the connection will close as soon as it's established.

        Code:
        telnet 10.40.4.1 10050
        Trying 10.40.4.1...
        Connected to 10.40.4.1.
        Escape character is '^]'.
        Connection closed by foreign host.
        I think the problems are network related but I can't be sure, would those route commands help with that or is there another way to test network issues?
        I am having very similar problems. Did you ever figure out what to do?

        The only difference is that I don't see the client error you reported in your first post. Everything else seems exactly the same.

        I have two subnets, monitoring servers on the same subnet as the zabbix server works fine, but when I try to monitor servers on a different subnet, zabbix-server gives me the "assuming the agent dropped..." error.

        I can ping, and the telnet command have the exact same results as in the quote.

        Suggestions? What other information can I get that will help you help me?

        Comment

        • gollem
          Junior Member
          • Nov 2012
          • 3

          #5
          Found this topic and I would like to know if there is solution for the issue mention. Mine is as zsysadmin issue

          Comment

          • jerrac
            Junior Member
            • Jan 2012
            • 4

            #6
            Ah, should have updated this topic ages ago.

            I had to add a proxy server inside the subnet that wasn't working. Then configure all the servers in that subnet to use the proxy for zabbix reporting.

            It's been a while, and I might have just forgotten, but why is that the case? The proxy server can connect to, and send the information it's collected to the master server. Why can't we just connect to the master server directly?

            Comment

            • Hrobocop
              Junior Member
              • Oct 2012
              • 22

              #7
              But actually, if I understand docs right, there is only one way communication - zabbix proxy is connecting to zabbix server. There is no communication in other direction....

              Comment

              • gollem
                Junior Member
                • Nov 2012
                • 3

                #8
                Originally posted by jerrac
                Ah, should have updated this topic ages ago.

                I had to add a proxy server inside the subnet that wasn't working. Then configure all the servers in that subnet to use the proxy for zabbix reporting.

                It's been a while, and I might have just forgotten, but why is that the case? The proxy server can connect to, and send the information it's collected to the master server. Why can't we just connect to the master server directly?
                Thanks for the update but is that the solution that zabbix provide officially? Looks to me like a workaround.

                I just wish that 'Source IP =' in zabbix_server.conf can accept IP from other subnets.

                Comment

                • gollem
                  Junior Member
                  • Nov 2012
                  • 3

                  #9
                  Would like to share on my findings.

                  I was restarting the zabbix_agentd and saw that the logs showing it is restricting my zabbix Server IP bacause it can only see the gateway IP.

                  So I change the Server paramater from Zabbix Server IP to Gateway IP in zabbix_agentd.conf and the updates start coming.

                  Comment

                  • barton21
                    Junior Member
                    • Feb 2019
                    • 5

                    #10
                    For the sake of users convenience we will explain that how they can subnet their network but in case for detailed information just go for this webpage https://appuals.com/how-to-subnet-your-network-easily/.
                    1- You need to open Advanced Subnet Calculator and switch to Classful Subnet Calculator tab.
                    2- Insert the IP address of your network and choose the number of subnets that you want to divide.
                    3- The number of hosts you want per subnet can also be altered, so just tap Generate Subnets.
                    4- Now you would probably have the number of subnets that you had chosen before.
                    5- Under Host Range, you will find former and latter valid host addresses. It is close to the broadcast address for that definite subnet.
                    6- Below Subnet, find the network ID for that subnet and to copy these addresses tap the option of Copy Subnets and to import these addresses just choose the icon of Export and press it.

                    Comment

                    Working...