Created attachment 604072 [details] agent settings - broken agent Description of problem: I was having issues with uninventorying platforms in Bug 830158 so I developed a safe way to uninvenory platform. First I uninventory all its children and then I uninventory platform itself. When I do that (without reproducing Bug 830158) agent disappears. In agent.log I start getting 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://null:16163/?rhq.communications.connector.rhqtype=agent&null] Will retry the agent registration request soon... If I restart agent (using SSH on server) I am getting this: 2012-08-13 20:00:04,535 FATAL [main] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.start-failure}Failed to start the agent java.lang.RuntimeException: Error setting up server invoker SocketServerInvoker[UNINITIALIZED] at org.jboss.remoting.ServerInvoker.create(ServerInvoker.java:854) at org.jboss.remoting.transport.Connector.init(Connector.java:411) at org.jboss.remoting.transport.Connector.create(Connector.java:815) at org.rhq.enterprise.communications.ServiceContainer.setupServerConnector(ServiceContainer.java:1216) 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:2325) at org.rhq.enterprise.agent.AgentMain.start(AgentMain.java:652) at org.rhq.enterprise.agent.AgentMain.main(AgentMain.java:428) Caused by: java.net.UnknownHostException: null at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:867) at java.net.InetAddress.getAddressFromNameService(InetAddress.java:1246) at java.net.InetAddress.getAllByName0(InetAddress.java:1197) at java.net.InetAddress.getAllByName(InetAddress.java:1128) at java.net.InetAddress.getAllByName(InetAddress.java:1064) at java.net.InetAddress.getByName(InetAddress.java:1014) at org.jboss.remoting.ServerInvoker.setup(ServerInvoker.java:1019) at org.jboss.remoting.transport.socket.SocketServerInvoker.setup(SocketServerInvoker.java:157) at org.jboss.remoting.ServerInvoker.create(ServerInvoker.java:850) ... 8 more It looks like agent some configuration properties get deleted. The only way to recover from this state is to run rhq-agent.sh -L and setup agent again. See prefs.xml (after this issue occured) and prefx.default.xml (agent was setup recentlly) attachements. Version-Release number of selected component (if applicable): JON 3.1.1.ER1 How reproducible:hard/random Steps to Reproduce: 1. Import platform with children 2. Uninventory children one by one 3. Uninventory platform Additional info:
Created attachment 604073 [details] agent settings - after clean setup
This is due to the feature introduced by Bug 535246 to de-register the agent when the agent's platform resource is removed from inventory.
Per triage with loleary, crouch, mfoley: Move to JBoss ON product, set target release JON 3.2, clear priority (will be subject to further triage in JON 3.2 timeframe).
This is not a bug. This is how agent de-registration works. You remove the platform (agent) from inventory, and the agent is no longer registered with the server and requires re-configuration.