Bug 805028

Summary: [eap6] 2 standalone instances on same host are incorrectly detected
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: AgentAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: high    
Version: 4.3CC: ccrouch, hrupp, theute
Target Milestone: ---   
Target Release: RHQ 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 06:08:27 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 707223    

Description Libor Zoubek 2012-03-20 09:31:33 EDT
Description of problem: I am running 2 standalone instances of EAP6 on same host. They are incorrectly detected in discovery queue and afterwards after import too.

Version-Release number of selected component (if applicable):
Version: 4.4.0-SNAPSHOT
Build Number: e13fc86

How reproducible:always

Steps to Reproduce:

My setup:

 - has serverName="standalone1" in configuration
 - admin console listens on 9990 
 - has serverName="standalone2" in configuration
 - admin console listens on 19990 

1. start both instances on same host
2. run manual discovery 
3. import both instances
Actual results:
In discovery queue, there are 2 EAP6 servers detected, having /eap6-standalone1 and /eap6-standalone2 as 'Resource Key' (AS7_HOME) but are both called standalone1

After importing both servers, they both have 'Connection Settings' configured as standalone1 - i.e. port 19990 is not detected. This also means that standalone1 resource is doubled - once I deploy something one one of them it appears on both.

Expected results: Both servers are correctly detected and are correctly treated 

Additional info:
Comment 2 Mike Foley 2012-03-26 11:50:19 EDT
priority=high, blocks 707223, target release = 3.1  per BZ triage (crouch, asantos, loleary, mfoley)
Comment 3 Heiko W. Rupp 2012-03-26 12:10:41 EDT
What is the command line to start them?
Comment 4 Ian Springer 2012-03-26 13:19:24 EDT
http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=ef0c9d96 may fix this.

Libor, can you give it another try with the latest plugin code?
Comment 5 Libor Zoubek 2012-03-26 15:41:07 EDT
Ian, I am not sure whether your patch fixes this BZ, but I'll definitely try it on tomorrows master build.

I start both EAPs by simply running ./standalone.sh

Key setting in standalone.xml for portshifting is here:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:10000}">

note that 10000 is not default, it is my offset.
Comment 6 Heiko W. Rupp 2012-03-28 07:50:04 EDT
that port-offset=... is a new option that we need to implement. we can detect the default and from command line, but not the fallback
Comment 7 Heiko W. Rupp 2012-03-28 09:32:25 EDT
port-offset attribute was indeed added in 7.1.1 (or after 7.1.CR1B)

master 249e20180843f3d0c6
Comment 8 Libor Zoubek 2012-03-29 03:48:06 EDT
verified on Version: 4.4.0-SNAPSHOT Build Number: 559098b
Comment 9 Heiko W. Rupp 2013-08-31 06:08:27 EDT
Bulk close of old bugs in VERIFIED state.