Trouble with Proxy Configuration - Windows

Started by immoraldeity, June 18, 2013, 10:23:21 PM

Previous topic - Next topic

immoraldeity

Please forgive my first post as it is a little long winded.

I currently have NetXMS 1.2.7 installed and running properly for my local LAN.  I'm attempting to setup a proxy agent at a remote site and must be missing something.

I currently have a public IP address associated with the server (AGENTPROXY) at the remote site accepting tcp/4700 from our NetXMS Server (running Windows).  With this configuration I was able to add AGENTPROXY to NetXMS and properly poll the configuration.

Per previous posts and investigation, I modified the Agent configuration file for AGENTPROXY to include the following:

EnableProxy = yes
EnableSNMPProxy = yes

I then restarted the Agent on AGENTPROXY.  In addition, I set the EnableZoning option in NetXMS Server and created a new zone for this remote site.  I modified the Communication configuration of the zone to use AGENTSERVER for Default Agent Proxy, Default SNMP Proxy and Default ICMP Proxy.

I then installed the Agent software on REMOTEPC that has MasterServer pointing to AGENTPROXY.  I also have tcp/4700 open on REMOTEPC to allow connections from AGENTSERVER.

I added REMOTEPC in NetXMS as a new node, using AGENTPROXY as the proxy and assigning it to zone for the remote site.  With this configuration, I see REMOTEPC added to NetXMS but am unable to poll the configuration.  Here are the results of the poll:

[18.06.2013 12:04:48] **** Poll request sent to server ****
[18.06.2013 12:04:48] Poll request accepted
[18.06.2013 12:04:48] Starting configuration poll for node REMOTEPC
[18.06.2013 12:04:51] Checking node's capabilities...
[18.06.2013 12:04:51] Checking NetXMS agent...
[18.06.2013 12:04:51] Capability check finished
[18.06.2013 12:04:51] Checking interface configuration...
[18.06.2013 12:04:51] Unable to get interface list from node
[18.06.2013 12:04:51] Interface "unknown" is no longer exist
[18.06.2013 12:04:51] Interface configuration check finished
[18.06.2013 12:04:51] Checking node name
[18.06.2013 12:04:51] Node name is OK
[18.06.2013 12:04:51] Finished configuration poll for node REMOTEPC
[18.06.2013 12:04:51] Node configuration was not changed after poll
[18.06.2013 12:04:51] **** Poll completed successfully ****

I'm trying to determine if this is an issue with NetXMS, my configuration or something with the network.  In doing so I am running nxagentd.exe -D 9 on AGENTPROXY and REMOTEPC.  I have also installed Wireshark on AGENTPROXY. 

When polling from the NetXMS server to REMOTEPC, I see traffic coming from the server to AGENTPROXY, but I see nothing being sent to REMOTEPC.  My assumption would be that the NetXMS Server talks to AGENTPROXY (hey I need to talk to REMOTEPC) and then AGENTPROXY would communicate directly with REMOTEPC, get the data and pass back to the server.

I feel I'm running around in circles at this point.  Any assistance or guidance is greatly appreciated.  Thank you.

Marco Incalcaterra

The only point I did not understand in your configuration is if the AGENTPROXY is assigned to a zone. In my configuration AGENTPROXY is not assigned to a zone and REMOTEPC is assigned to a zone.

I have two proxies for two different zones in my NetXMS and everything works fine.

Best regards,
Marco

immoraldeity

AGENTPROXY is assigned to the "Default" zone while REMOTEPC is assigned to the "Remote" zone.  Are there any other ports other than tcp/4700 needing to be open for this to work?

Thank you for the assistance.

Marco Incalcaterra

Hi,

I have exactly the same configuration of you. No other port needs to be opened than tcp/4700.
Could you please try to dump the poll status from the manual execution of the agent on both AGENTPROXY and REMOTEPC: run the agent in dump mode on both nodes and run a poll status from NetXMS console. Here an example on how I run it on my node:

"C:\Program Files\NetXMS\bin\nxagentd.exe" -c "C:\Program Files\NetXMS\etc\nxagentd.conf" -n "NetXMSAgentdW32" -e "NetXMS Win32 Agent")

Best regards,
Marco

immoraldeity

I'm running -D 9 as I'm assuming you want the debug information.  Nothing comes through on REMOTEPC when running a poll from the NetXMS server.  Although it appears the AGENTPROXY is attempting to setup some kind of proxy.  Maybe something with the 255.255.255.255 reference?  REMOTEPC is showing the unknown interface as having an IP address of 255.255.255.255.  When I added the node for REMOTEPC, I used the DNS name.

AGENTPROXY:

C:\NetXMS\bin>C:\NetXMS\bin\nxagentd.exe -D 9 -c "C:\NetXMS\etc\nxagentd.conf"
[19-Jun-2013 09:56:32.531] Additional configs was loaded from C:\NetXMS\etc\nxagentd.conf.d
[19-Jun-2013 09:56:32.531] Debug level set to 9
[19-Jun-2013 09:56:32.531] Subagent API initialized
[19-Jun-2013 09:56:32.687] Subagent "WINNT.NSM" loaded successfully
[19-Jun-2013 09:56:32.687] Debug callback set for DB library
[19-Jun-2013 09:56:32.687] Subagent "ecs.nsm" loaded successfully
[19-Jun-2013 09:56:32.687] Subagent "ping.nsm" loaded successfully
[19-Jun-2013 09:56:32.703] LogWatch: cannot load wevtapi.dll: The specified module could not be found.
[19-Jun-2013 09:56:32.703] Subagent "logwatch.nsm" loaded successfully
[19-Jun-2013 09:56:32.703] Subagent "portcheck.nsm" loaded successfully
[19-Jun-2013 09:56:32.750] WINPERF: CollectorThread_B waiting for set change
[19-Jun-2013 09:56:32.750] WINPERF: CollectorThread_C waiting for set change
[19-Jun-2013 09:56:32.750] Subagent "winperf.nsm" loaded successfully
[19-Jun-2013 09:56:32.750] WINPERF: CollectorThread_A waiting for set change
[19-Jun-2013 09:56:32.750] WINPERF: CollectorThread_A: set changed
[19-Jun-2013 09:56:32.750] WINPERF: CollectorThread_A entered data collection loop
[19-Jun-2013 09:56:32.750] Subagent "wmi.nsm" loaded successfully
[19-Jun-2013 09:56:33.750] External parameters providers poller thread will not start
[19-Jun-2013 09:56:33.750] PushConnector: named pipe created, waiting for connection
[19-Jun-2013 09:56:33.750] StorageDiscoveryConnector: named pipe created, waiting for connection
[19-Jun-2013 09:56:33.765] Trying to bind on 0.0.0.0:4700
[19-Jun-2013 09:56:33.765] Listening on socket 0.0.0.0:4700
[19-Jun-2013 09:56:34.750] NetXMS Agent started
Agent running. Press ESC to shutdown.
[19-Jun-2013 09:56:45.765] Incoming connection from x.x.x.x
[19-Jun-2013 09:56:45.765] Connection from x.x.x.x accepted
[19-Jun-2013 09:56:45.765] [session:0] Received control message CMD_GET_NXCP_CAPS
[19-Jun-2013 09:56:45.765] [session:0] Sending message CMD_NXCP_CAPS (size 16)
[19-Jun-2013 09:56:45.781] [session:0] Received message CMD_KEEPALIVE
[19-Jun-2013 09:56:45.781] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:56:45.781] [session:0] Received message CMD_SETUP_PROXY_CONNECTION
[19-Jun-2013 09:56:45.781] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:56:45.796] [session:0] Session with x.x.x.x closed
[19-Jun-2013 09:57:03.609] Incoming connection from x.x.x.x
[19-Jun-2013 09:57:03.609] Connection from x.x.x.x accepted
[19-Jun-2013 09:57:03.609] Incoming connection from x.x.x.x
[19-Jun-2013 09:57:03.609] [session:0] Received control message CMD_GET_NXCP_CAPS
[19-Jun-2013 09:57:03.609] Connection from x.x.x.x accepted
[19-Jun-2013 09:57:03.609] [session:0] Sending message CMD_NXCP_CAPS (size 16)
[19-Jun-2013 09:57:03.609] [session:1] Received control message CMD_GET_NXCP_CAPS
[19-Jun-2013 09:57:03.609] [session:1] Sending message CMD_NXCP_CAPS (size 16)
[19-Jun-2013 09:57:03.625] [session:0] Received message CMD_KEEPALIVE
[19-Jun-2013 09:57:03.625] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:57:03.625] [session:1] Received message CMD_KEEPALIVE
[19-Jun-2013 09:57:03.625] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:57:03.625] [session:0] Received message CMD_ENABLE_AGENT_TRAPS
[19-Jun-2013 09:57:03.625] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:57:03.625] Incoming connection from x.x.x.x
[19-Jun-2013 09:57:03.625] [session:0] Received message CMD_GET_PARAMETER
[19-Jun-2013 09:57:03.625] Connection from x.x.x.x accepted
[19-Jun-2013 09:57:03.625] [session:0] Requesting parameter "Net.Interface.AdminStatus(2)"
[19-Jun-2013 09:57:03.625] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 09:57:03.625] [session:2] Received control message CMD_GET_NXCP_CAPS
[19-Jun-2013 09:57:03.625] [session:0] Sending message CMD_REQUEST_COMPLETED (size 48)
[19-Jun-2013 09:57:03.625] [session:2] Sending message CMD_NXCP_CAPS (size 16)
[19-Jun-2013 09:57:03.640] [session:0] Received message CMD_GET_PARAMETER
[19-Jun-2013 09:57:03.640] [session:0] Requesting parameter "Net.Interface.Link(2)"
[19-Jun-2013 09:57:03.640] [session:2] Received message CMD_KEEPALIVE
[19-Jun-2013 09:57:03.640] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 09:57:03.640] [session:2] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:57:03.640] [session:0] Sending message CMD_REQUEST_COMPLETED (size 48)
[19-Jun-2013 09:57:03.640] [session:2] Received message CMD_GET_PARAMETER
[19-Jun-2013 09:57:03.640] [session:2] Requesting parameter "Icmp.Ping(255.255.255.255)"
[19-Jun-2013 09:57:03.640] [session:2] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 09:57:03.640] [session:2] Sending message CMD_REQUEST_COMPLETED (size 48)
[19-Jun-2013 09:57:03.656] [session:2] Session with x.x.x.x closed
[19-Jun-2013 09:57:03.656] [session:1] Session with x.x.x.x closed
[19-Jun-2013 09:57:03.671] Incoming connection from x.x.x.x
[19-Jun-2013 09:57:03.671] Connection from x.x.x.x accepted
[19-Jun-2013 09:57:03.671] [session:1] Received control message CMD_GET_NXCP_CAPS
[19-Jun-2013 09:57:03.671] [session:1] Sending message CMD_NXCP_CAPS (size 16)
[19-Jun-2013 09:57:03.671] [session:1] Received message CMD_KEEPALIVE
[19-Jun-2013 09:57:03.671] [session:1] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:57:03.671] Incoming connection from x.x.x.x
[19-Jun-2013 09:57:03.671] Connection from x.x.x.x accepted
[19-Jun-2013 09:57:03.687] [session:2] Received control message CMD_GET_NXCP_CAPS
[19-Jun-2013 09:57:03.687] [session:2] Sending message CMD_NXCP_CAPS (size 16)
[19-Jun-2013 09:57:03.687] [session:2] Received message CMD_KEEPALIVE
[19-Jun-2013 09:57:03.687] [session:2] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 09:57:03.687] [session:2] Received message CMD_GET_PARAMETER
[19-Jun-2013 09:57:03.687] [session:2] Requesting parameter "Icmp.Ping(255.255.255.255)"
[19-Jun-2013 09:57:03.687] [session:2] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 09:57:03.687] [session:2] Sending message CMD_REQUEST_COMPLETED (size 48)
[19-Jun-2013 09:57:03.703] [session:2] Session with x.x.x.x closed
[19-Jun-2013 09:57:03.703] [session:1] Session with x.x.x.x closed

REMOTEPC:

C:\NetXMS\bin>C:\NetXMS\bin\nxagentd.exe -D 9 -c "C:\NetXMS\etc\nxagentd.conf"
[19-Jun-2013 09:51:40.425] Additional configs was loaded from C:\NetXMS\etc\nxagentd.conf.d
[19-Jun-2013 09:51:40.427] Debug level set to 9
[19-Jun-2013 09:51:40.428] Subagent API initialized
[19-Jun-2013 09:51:40.439] Subagent "WINNT.NSM" loaded successfully
[19-Jun-2013 09:51:40.440] Debug callback set for DB library
[19-Jun-2013 09:51:40.441] Subagent "ecs.nsm" loaded successfully
[19-Jun-2013 09:51:40.443] Subagent "ping.nsm" loaded successfully
[19-Jun-2013 09:51:40.445] Subagent "logwatch.nsm" loaded successfully
[19-Jun-2013 09:51:40.446] Subagent "portcheck.nsm" loaded successfully
[19-Jun-2013 09:51:41.958] WINPERF: CollectorThread_A waiting for set change
[19-Jun-2013 09:51:41.958] Subagent "winperf.nsm" loaded successfully
[19-Jun-2013 09:51:41.959] WINPERF: CollectorThread_B waiting for set change
[19-Jun-2013 09:51:41.965] Subagent "wmi.nsm" loaded successfully
[19-Jun-2013 09:51:41.963] WINPERF: CollectorThread_C waiting for set change
[19-Jun-2013 09:51:41.960] WINPERF: CollectorThread_A: set changed
[19-Jun-2013 09:51:41.976] WINPERF: CollectorThread_A entered data collection loop
[19-Jun-2013 09:51:42.966] External parameters providers poller thread will not start
[19-Jun-2013 09:51:42.970] Trying to bind on 0.0.0.0:4700
[19-Jun-2013 09:51:42.970] PushConnector: named pipe created, waiting for connection
[19-Jun-2013 09:51:42.972] Listening on socket 0.0.0.0:4700
[19-Jun-2013 09:51:42.974] StorageDiscoveryConnector: named pipe created, waiting for connection
[19-Jun-2013 09:51:43.971] NetXMS Agent started
Agent running. Press ESC to shutdown.

Marco Incalcaterra

Yes, I forgot the "-D 9" :)

I have a very similar output (at least the initial part, then it starts to collect the requests from the proxy).
Here the log from my REMOTEPC:

C:\Users\marco>"C:\Program Files\NetXMS\bin\nxagentd.exe" -D 9 -c "C:\Program Files\NetXMS\etc\nxagentd.conf"
[19-Jun-2013 19:33:47.870] Additional configs was loaded from C:\Program Files\NetXMS\etc\nxagentd.conf.d
[19-Jun-2013 19:33:47.870] Debug level set to 9
[19-Jun-2013 19:33:47.870] Subagent API initialized
[19-Jun-2013 19:33:47.870] Subagent "WINNT.NSM" loaded successfully
[19-Jun-2013 19:33:47.870] Debug callback set for DB library
[19-Jun-2013 19:33:47.995] WINPERF: CollectorThread_A waiting for set change
[19-Jun-2013 19:33:47.995] WINPERF: CollectorThread_B waiting for set change
[19-Jun-2013 19:33:47.995] Subagent "winperf.nsm" loaded successfully
[19-Jun-2013 19:33:47.995] WINPERF: CollectorThread_C waiting for set change
[19-Jun-2013 19:33:47.995] WINPERF: CollectorThread_A: set changed
[19-Jun-2013 19:33:47.995] WINPERF: CollectorThread_A entered data collection loop
[19-Jun-2013 19:33:48.995] External parameters providers poller thread will notstart
[19-Jun-2013 19:33:48.995] StorageDiscoveryConnector: named pipe created, waiting for connection
[19-Jun-2013 19:33:48.995] PushConnector: named pipe created, waiting for connection
[19-Jun-2013 19:33:48.995] Trying to bind on 0.0.0.0:4700
[19-Jun-2013 19:33:48.995] Listening on socket 0.0.0.0:4700
[19-Jun-2013 19:33:49.994] NetXMS Agent started
Agent running. Press ESC to shutdown.
[19-Jun-2013 19:34:13.301] Incoming connection from 192.168.10.3
[19-Jun-2013 19:34:13.301] Connection from 192.168.10.3 accepted
[19-Jun-2013 19:34:13.426] [session:0] Received message CMD_KEEPALIVE
[19-Jun-2013 19:34:13.426] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 19:34:13.458] [session:0] Received message CMD_ENABLE_AGENT_TRAPS
[19-Jun-2013 19:34:13.458] [session:0] Sending message CMD_REQUEST_COMPLETED (size 32)
[19-Jun-2013 19:34:13.598] [session:0] Received message CMD_GET_PARAMETER
[19-Jun-2013 19:34:13.598] [session:0] Requesting parameter "Net.Interface.AdminStatus(11)"
[19-Jun-2013 19:34:13.598] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 19:34:13.598] [session:0] Sending message CMD_REQUEST_COMPLETED (size 48)
[19-Jun-2013 19:34:13.629] [session:0] Received message CMD_GET_PARAMETER
[19-Jun-2013 19:34:13.629] [session:0] Requesting parameter "Net.Interface.Link(11)"
[19-Jun-2013 19:34:13.629] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 19:34:13.629] [session:0] Sending message CMD_REQUEST_COMPLETED (size 48)
[19-Jun-2013 19:34:19.534] [session:0] Received message CMD_GET_PARAMETER
[19-Jun-2013 19:34:19.534] [session:0] Requesting parameter "Net.Interface.BytesIn("Local Area Connection")"
[19-Jun-2013 19:34:19.534] [session:0] GetParameterValue(): result is 0 (SUCCESS)
[19-Jun-2013 19:34:19.534] [session:0] Sending message CMD_REQUEST_COMPLETED (size 64)
Agent shutting down...
[19-Jun-2013 19:34:21.190] Shutdown() called
[19-Jun-2013 19:34:21.190] Trap sender thread terminated
[19-Jun-2013 19:34:21.987] [session:0] CommSession::disconnect()
[19-Jun-2013 19:34:21.987] [session:0] Session with 192.168.10.3 closed
[19-Jun-2013 19:34:22.987] Session Watchdog thread terminated
[19-Jun-2013 19:34:22.987] Listener thread terminated
[19-Jun-2013 19:34:22.987] WINPERF: Collector thread for counter set B terminated
[19-Jun-2013 19:34:22.987] WINPERF: Collector thread for counter set A terminated
[19-Jun-2013 19:34:22.987] WINPERF: Collector thread for counter set C terminated
[19-Jun-2013 19:34:23.486] NetXMS Agent stopped


192.168.10.3 is the internal network IP of my proxy.
Did you try to put the IP address directly instead of the DNS name in the REMOTEPC name?
Do the AGENTPROXY and REMOTEPC belongs to the same subnet?

Best regards,
Marco

immoraldeity

Yes, they belong to the same subnet. 

Surprisingly, using the IP address in the node configuration for REMOTEPC worked!  Is there any reason you can think of that would cause NetXMS to send a broadcast (255.255.255.255) when using the name instead of the IP address?  My concern with using the IP address is for workstation monitoring where they use DHCP addresses that could change at any time.

Thank you very much for your assistance in troubleshooting this!

Marco Incalcaterra

Hi,

I'm sorry but this is out of my knowledge, I don't know! I have only static IPs on my networks, this is why I did not encounter that kind of problem (and I did not dig to solve it  :P )

Marco

d-ray

Hi,

I have just the same problem...
And did just the wame tests of you  :(

Denis