Bug 753264 - AS5 plugin: value of namingUrl connection prop is not correctly discovered for an EAP 5.1.1 instance
AS5 plugin: value of namingUrl connection prop is not correctly discovered fo...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.2
Unspecified Unspecified
high Severity high (vote)
: ---
: RHQ 4.3.0
Assigned To: Charles Crouch
Mike Foley
:
Depends On:
Blocks: jon30-sprint8
  Show dependency treegraph
 
Reported: 2011-11-11 13:22 EST by Ian Springer
Modified: 2015-02-01 18:27 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-31 06:09:36 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2011-11-11 13:22:28 EST
Here's the error that occurs when I try to start/activate the Resource:

org.rhq.core.clientapi.agent.PluginContainerException: Failed to start component for resource Resource[id=10700, type=JBossAS Server, key=/home/ips/Applications/jboss-eap-5.1.1/jboss-as/server/all, name=127.0.0.51 all, parent=jetengine, version=EAP 5.1.1].
	at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:1601)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:202)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:238)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:127)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:55)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: Naming URL 'jnp://jboss:service=Naming
            Port:***CHANGE_ME***' is not valid: Illegal character in authority at index 6: jnp://jboss:service=Naming
            Port:***CHANGE_ME***
	at org.rhq.plugins.jbossas5.ApplicationServerComponent.validateNamingURL(ApplicationServerComponent.java:435)
	at org.rhq.plugins.jbossas5.ApplicationServerComponent.connectToProfileService(ApplicationServerComponent.java:357)
	at org.rhq.plugins.jbossas5.ApplicationServerComponent.start(ApplicationServerComponent.java:180)
	at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:552)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	... 3 more
Comment 1 Ian Springer 2011-11-11 14:59:51 EST
(02:44:14 PM) ips: to discover the jnp url, we first look for the jnp.url file that eap writes out 
(02:44:56 PM) ips: if we can't find that or fail to parse it, we fallback to parsing config files to try to find it (conf/service-config.xml, etc.)
(02:45:16 PM) ips: that config parsing code was most likely snarfed from the as4 plugin
(02:45:48 PM) ips: but the format of how the naming service is declared in jboss-service.xml has changed in 5.x
(02:46:00 PM) ips: so our parser was returning junk 
(02:46:59 PM) ips: however, it's a pretty rare case that we would fail to find that jnp.url file. that file is created by the server the first time it starts up, but toward the end of startup
(02:47:45 PM) ips: so the user would have to run an agent server scan within 20 seconds or so of starting the eap 5.x instance for the first time
(02:48:01 PM) ips: (which is what i did)
(02:48:18 PM) ips: the other edge case would be if the user manually deleted the jnp.url file
(02:49:18 PM) ips: in any case, i fixed the parser code so it returns null rather than junk for the jnp address and port if it can't find it using the old 4.x style
Comment 2 Ian Springer 2011-11-11 15:31:24 EST
Fixed in master - commit ab9b8b0:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commitdiff;h=ab9b8b0
Comment 3 Ian Springer 2011-11-14 12:17:07 EST
QE, please test this in master, so we can decide if we want to cherry pick the fix into the jon3 branch.
Comment 4 Jay Shaughnessy 2013-02-26 17:09:39 EST
Moving to verified.  master fixed.
Comment 7 Heiko W. Rupp 2013-08-31 06:09:36 EDT
Bulk close of old bugs in VERIFIED state.

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