Ad Widget

Collapse

Windows agent troubleshooting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rdubya
    Junior Member
    • Jul 2020
    • 6

    #1

    Windows agent troubleshooting

    I've decided to ditch Nagios/Icinga and have easily spun up a Zabbix server with a working installation of 6.0.30.
    Linux servers are added with no problem, but my first Windows server is a bust. I've read through many threads here and other places but I feel like I've hit all of the usual suspects and am still stuck.

    CLIENT:
    I installed the zabbix_agent-6.0.30-windows-i38 agent on a Windows 19 Server. The agent starts and stops successfully and logs problems to the expected output file. I have stopped the Windows firewall, and time of day matches correctly on both server and client.

    The client configuration contains;
    Code:
    Server=10.177.176.7
    ServerActive=10.177.176.7
    Hostname=<redacted_but_matches_server_config>
    LogFile=c:\zabbix_agent-6.0.30-windows-i386\zabbix_agentd.log
    The log tells me;
    HTML Code:
    failed to accept an incoming connection: connection from "172.16.11.1" rejected, allowed hosts: "10.177.176.7"
    Telnet gives me a blank screen that comes back to a typical prompt.


    SERVER:
    The web interface presents a red [ZBX] under availability.

    The Hostname is correct and matches the client config file
    I am using the "Windows by Zabbix agent" template.
    I created the group "Windows Server"
    Under Interfaces, the client IP and hostname match and the port is default

    From the server, I can telnet to the client (by IP or DNS);
    Code:
    telnet 172.16.11.32 10050
    Trying 172.16.11.32...
    Connected to 172.16.11.32.
    Escape character is '^]'.
    Connection closed by foreign host.
    But zabbix_get tells me;
    Code:
    zabbix_get -s 172.16.10.40 -k system.uname
    zabbix_get [73493]: Get value error: ZBX_TCP_READ() failed: [104] Connection reset by peer
    zabbix_get [73493]: Check access restrictions in Zabbix agent configuration
    Again, the firewall is disabled so I'm expecting no impediments.

    What have I missed?
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Your IP addressing is confusing me.

    The error says that the agent didn't accept connection from 172.16.11.1, rightly so, as Server directive only allows 10.177.176.7. What is 172.16.11.1?

    On the server you tested the telnet connection to 172.16.11.32, but in zabbix_get you use 172.16.10.40. What is the correct agent IP address?

    Markku

    Comment

    • rdubya
      Junior Member
      • Jul 2020
      • 6

      #3
      Ugh, I grabbed the wrong text. Here's the correct snippet;
      Code:
      telnet 172.16.10.40 10050
      Trying 172.16.10.40...
      Connected to 172.16.10.40.
      Escape character is '^]'.
      Connection closed by foreign host.
      The Zabbix server is 10.177.176.7, the client is 172.16.10.40

      172.16.11.1 is the gateway for the client. I have seen a couple posts where there were communication issues and the error included the gateway. I guess that's an artifact of the main problem.

      Originally posted by Markku
      Your IP addressing is confusing me.

      The error says that the agent didn't accept connection from 172.16.11.1, rightly so, as Server directive only allows 10.177.176.7. What is 172.16.11.1?

      On the server you tested the telnet connection to 172.16.11.32, but in zabbix_get you use 172.16.10.40. What is the correct agent IP address?

      Markku

      Comment

      • Markku
        Senior Member
        Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
        • Sep 2018
        • 1781

        #4
        172.16.11.1 is the gateway for the client. I have seen a couple posts where there were communication issues and the error included the gateway. I guess that's an artifact of the main problem.
        That is absolutely the problem: Zabbix agent expects the Zabbix server-initiated connection to only come from 10.177.176.7 (as per the agent configuration), but your network changes the connection source IP address to 172.16.11.1.

        Contact your network admin to change the network address translation (NAT) settings, or allow 172.16.11.1 (instead of 10.177.176.7) in the Server directive in the agent.

        Markku

        Comment

        • rdubya
          Junior Member
          • Jul 2020
          • 6

          #5
          Yep. I just found a blog post mentioning that. Thanks!

          Comment

          • rdubya
            Junior Member
            • Jul 2020
            • 6

            #6
            While I wait for some network help, I have to wonder why a Windows client is having this problem and I have a dozen or so Linux hosts on the same subnet that don't have that problem. Mysterious.

            Comment

            • Markku
              Senior Member
              Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
              • Sep 2018
              • 1781

              #7
              Cannot tell without the actual configurations, I only gave the suggestions based on the information presented.

              Markku

              Comment

              Working...