Bug 911692 - [JBoss AS] Discovery fails to determine JNP URL if data directory is not located at ${jboss.server.home.dir}/data
[JBoss AS] Discovery fails to determine JNP URL if data directory is not loca...
Status: CLOSED CURRENTRELEASE
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 4, Plugin -- JBoss EAP 5 (Show other bugs)
JON 3.0.0
All All
urgent Severity high
: ER01
: JON 3.2.0
Assigned To: John Mazzitelli
Mike Foley
:
Depends On: 699893
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-15 11:30 EST by Larry O'Leary
Modified: 2014-01-02 15:37 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 699893
Environment:
Last Closed: 2014-01-02 15:37:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Legacy) 54752 None None None Never

  None (edit)
Description Larry O'Leary 2013-02-15 11:30:12 EST
+++ This bug was initially created as a clone of upstream Bug #699893 +++

Description of problem:
If a JBoss AS instance has had its data directory relocated or renamed, the JBoss AS plug-in fails to determine a valid Naming Provider URL (JNP URL) for the plug-in configuration for the newly imported resource. 

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

How reproducible:
Always

Steps to Reproduce:
1. Install a fresh EAP server
2. Start it an alternate location for its data directory:
   ./run.sh -c default -b 0.0.0.0 -Djboss.server.data.dir=/tmp/data/eap/default
3. Discover and import the new EAP instance
  
Actual results:
The AS resource is imported but it is marked DOWN and the JNP URL is not set under <resource> -> Inventory >> Connection. The agent also logs the following warning:
WARN  [ResourceDiscoveryComponent.invoker.daemon-847] (org.rhq.plugins.jbossas5.ApplicationServerDiscoveryComponent)- Failed to read JNP URL from '/opt/jboss/eap/jboss-eap-5.1/jboss-as/server/default/data/jnp-service.url'.

Expected results:
The AS resource is imported and the JNP URL is correct. The value should be read from /tmp/data/eap/default/jnp-service.url

Additional info:
This issue is cause by the assumption that the data directory is fixed or the presence is required by AS. Instead, this value is determined based on configuration of the AS instance itself and if not explicitly set, will default to ${jboss.server.home.dir}/data. The plug-in should not assume the default and instead use the value provided by the system property ${jboss.server.data.dir} and if not set, fall-back to the current behavior.

--- Additional comment from  on 2013-02-15 09:12:59 EST ---

Can this be fixed for JON 3.2 release?
Comment 2 John Mazzitelli 2013-05-10 21:31:00 EDT
I committed a fix to this in master: 8130e34 

I see the JNP URL is discovered now (I see it in the plugin config in the UI) but my initial test showed the server is still DOWN. I don't know if this is because some other part of the plugin code expects the data directory to be in the default location or if it was a local problem on my box only (I was having port conflicts and the problem might be due to that). I'm still testing.
Comment 3 John Mazzitelli 2013-05-13 13:26:54 EDT
I corrected my runtime issue (it was a local problem) and I tested the fix for this BZ. It looks good.
Comment 4 Larry O'Leary 2013-09-06 10:30:00 EDT
As this is MODIFIED or ON_QA, setting milestone to ER1.
Comment 5 Sunil Kondkar 2013-10-04 08:27:14 EDT
Verified on JBoss ON Version: 3.2.0.ER2 Build Number: 9bf6f76:371eac0

Folowed the steps and started EAP5.1 an alternate location. After importing, the EAP server was UP and the correct JNP URL is displayed in 'Inventory->Connection Settings' tab.

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