NetXMS Support Forum

English Support => General Support => Topic started by: BHMick on September 12, 2022, 11:36:14 AM

Title: Cannot connect to NetXMS agent (Connect failed)
Post by: BHMick on September 12, 2022, 11:36:14 AM
Hello,

I have a problem with the netXMS agent, when I try to make a poll request. I get messages...

----------------------------------------------
Poll request accepted.......
Starting configuration.....
Checking node's capabilities....

     Checking NetXMS agent....
      Cannot connect to NetXMS agent (Connect failed)
     Checking SNMP....
      SNMP agent is active (version 2c)
      etc
      etc
      OK

What else do I need to configure .... Do I need perhaps conf (Agent Conf and Server Conf on web management Console?)

Please help ...

Thanks, best regards.
Title: Re: Cannot connect to NetXMS agent (Connect failed)
Post by: Filipp Sudanov on September 12, 2022, 01:31:56 PM
Hi!

So here's a few prerequisites for server to connect to the agent:

- agent process should be running
- no firewall should be blocking agent's port (it's TCP port 4700)
- In nxagentd.conf configuration file MasterServers parameter should include IP address of your NetXMS server
Title: Re: Cannot connect to NetXMS agent (Connect failed)
Post by: BHMick on September 12, 2022, 01:42:05 PM
Hello Filipp,

I set everything except the firewall, how do I turn off the firewall, btw (Netxms 4.1.420 on Linux Ubuntu)?

Thanks, regards.
Title: Re: Cannot connect to NetXMS agent (Connect failed)
Post by: BHMick on September 12, 2022, 01:51:22 PM
Hello,

I tried turning off the firewall, same thing again...
Title: Re: Cannot connect to NetXMS agent (Connect failed)
Post by: Filipp Sudanov on September 12, 2022, 02:49:02 PM
try running this in command line of your server:
telnet ip_addess 4700where ip_address is the address of your agent. 
What output would this command produce?


Title: Re: Cannot connect to NetXMS agent (Connect failed)
Post by: BHMick on September 12, 2022, 03:22:36 PM
When I run this command....

______________________________________
Output:

Trying 192.168.x.x ...
Connected to 192.168.x.x
Escape character...
Connection closed by foreing host.
_____________________________________

But. when I edit in nxagent.conf and set:
MasterServers=192.168.x.x.
Save and Start again, it automatically returns the IP address 127.0.0.1 in the web  management console.

The agent is active when the address is 127.0.0.1. but there is no communication with the nodes, when I change the server address to 192.168.x.x then I get an error. (Cannot connect - Internal error)

(agent status: unreachable, return IP address on 127.0.0.1)

When I manually set the agent's ip address to 192.168.x.x, the agent is active, but it is set automatically:

PrimaryHost Name=127.0.0.1
Primary IP= 192.168.x.x
and I get a message (internal error) - NATIVE AGENT IS NOT RESPONDING

----------------------------------------------------------------------------

Should I perhaps set up a situation like this:
nxagentd.conf (edit)

MasterServers=127.0.0.1/8,192.168.x.x
It is currently:
MasterServers=192.168.x.x

I don't know what to do anymore....???