Bug 1127092 - Agent [null] would like to connect to this server
Summary: Agent [null] would like to connect to this server
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Agent, Installer, Storage Node
Version: JON 3.2
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER02
: JON 3.3.0
Assignee: Jay Shaughnessy
QA Contact: Armine Hovsepyan
URL:
Whiteboard:
Depends On: 1127029
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-06 06:53 UTC by Heiko W. Rupp
Modified: 2015-09-03 00:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 1127029
Environment:
Last Closed: 2014-12-11 14:00:06 UTC
Type: Bug


Attachments (Terms of Use)

Description Heiko W. Rupp 2014-08-06 06:53:20 UTC
I think this should go into 3.3.
Additional comment (at the end) from Elias explains why


+++ This bug was initially created as a clone of Bug #1127029 +++

Description of problem:

I have a agent in my network (don't know which one) connecting to RHQ with not so good results:

01:16:45,788 INFO  [org.rhq.enterprise.server.core.CoreServerServiceImpl] (http-/0.0.0.0:7080-13) Agent [null][4.12.0(422702f)] would like to connect to this server

It would be helpful if the message included the remote client IP address, but I don't know and it's difficult to know when there are hundreds of existing agents.


Version-Release number of selected component (if applicable): 4.12


How reproducible: Unclear

Steps to Reproduce:
1. Unclear

Additional info:

diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterpris
index 2e4ddfc..162e44c 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/core/CoreServerServiceImpl.java
@@ -336,6 +336,11 @@ public ConnectAgentResults connectAgent(ConnectAgentRequest request) throws Agen
         String agentName = request.getAgentName();
         AgentVersion agentVersion = request.getAgentVersion();
 
+        if (agentName == null) {
+            String msg = request.getAddress() + ':' + request.getPort() + "] is connecting without a name";
+            throw new AgentNotSupportedException(msg);
+        }
+
         log.info("Agent [" + agentName + "][" + agentVersion + "] would like to connect to this server");
 
         if (!getAgentManager().isAgentVersionSupported(agentVersion)) {

This can't work because there is no way to get the IP/port from this request. IP/port should probably be available for every request, although not clear from an API standpoint how that might work. (I don't think the client should tell what IP it is, the server knows that already.)

--- Additional comment from Elias Ross on 2014-08-05 21:47:30 EDT ---

Okay, what happened was installing a new storage node, the installer tries to install a new agent, though one was already installed on the host in a different location. It blew away the preferences directory for an already installed agent and caused trouble.

Comment 1 Jay Shaughnessy 2014-08-08 21:51:56 UTC
Letting soak in master for a few days, then will cherry-pick if things look good.

Comment 2 Jay Shaughnessy 2014-08-19 14:10:14 UTC
release/jon3.3.x commit 3e4f9571733ea0c7867acf693efc5fc82110b41a
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Tue Aug 19 10:07:21 2014 -0400

    Cherry-pick master: 1106141fb59aefa027602c138f59b33f4347466a

Comment 3 Simeon Pinder 2014-09-03 20:31:46 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=381194

Comment 4 Armine Hovsepyan 2014-09-10 13:14:48 UTC
installed storage node (with agent) on an VM where agent was already installed and running and connected to server. Connected new agent to server with different port, both are running, only the latest one is connected to server. NO 'null' name in server and/or agent logs.

marking as verified


Note You need to log in before you can comment on or make changes to this bug.