How can I configure the JON Agent when NAT is required to reach the Agent's host machine
Issue
- JON server can communicate with the agent via the NAT address only.
- If I use the NAT address as the agent's bind address the agent cannot bind to the assigned address:
The setup has been completed for the preferences at node [/rhq-agent/default]. Failed to start the agent java.net.BindException: Cannot assign requested address at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:365) at java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170) at org.jboss.remoting.transport.socket.SocketServerInvoker.createServerSocket(SocketServerInvoker.java:264) at org.jboss.remoting.transport.socket.SocketServerInvoker.start(SocketServerInvoker.java:193) at org.jboss.remoting.transport.Connector.start(Connector.java:324) at org.rhq.enterprise.communications.ServiceContainer.setupServerConnector(ServiceContainer.java:1226) at org.rhq.enterprise.communications.ServiceContainer.start(ServiceContainer.java:550) at org.rhq.enterprise.communications.ServiceContainer.start(ServiceContainer.java:468) at org.rhq.enterprise.agent.AgentMain.startCommServices(AgentMain.java:2148) at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:636) at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:413) Agent will be restarted soon to see if the failure condition cleared up - If I use the physical address as the agent's bind address the agent fails to register with the JON server:
ERROR [RHQ Agent Registration Thread] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.agent-registration-rejected}The server has rejected the agent registration request. Cause: [org.rhq.core.clientapi.server.core.AgentRegistrationException:Server cannot ping the agent's endpoint. The agent's endpoint is probably invalid or there is a firewall preventing the server from connecting to the agent. Endpoint: socket://192.168.1.10:16163/?rhq.communications.connector.rhqtype=agent&numAcceptThreads=1&maxPoolSize=303&clientMaxPoolSize=304&socketTimeout=60000&enableTcpNoDelay=true&backlog=200] ERROR [RHQ Agent Registration Thread] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.agent-registration-retry}Will retry the agent registration request soon... - Agent's physical address is private and not reachable from the JON server and is only reachable via a NAT address.
Environment
- JBoss Operations Network (JON) 2.3, 2.3.1, 2.4, 3.0, 3.1, 3.2, 3.3
- Host machine for JON Agent is only reachable through Network Address Translation (NAT) (Public Address to Private Physical Address)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
