This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 864952 - Cannot connect to secured remote-jmx tomcat connection
Cannot connect to secured remote-jmx tomcat connection
Status: CLOSED NOTABUG
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- Tomcat (Show other bugs)
JON 3.1.1
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Charles Crouch
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-10 09:20 EDT by Jan Martiska
Modified: 2015-02-01 18:28 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: ? Consequence: When a remote-jmx connection to Tomcat 6 without authentication (com.sun.management.jmxremote.authenticate=false) is set up and the correct credentials are supplied in the JBoss Operations Network (JON) interface, the JMX connection fails and the following error appears: Fix: None Result: None Workaround: The workaround for this problem is to use jconsole to connect to the Tomcat instance using remote JMX.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-25 04:14:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jan Martiska 2012-10-10 09:20:22 EDT
I set up a remote-jmx connection to tomcat6 (from JBoss EWS 2.0.0.CR1). If it is unprotected (com.sun.management.jmxremote.authenticate=false), then it works fine. If it is password protected, and I specify wrong credentials in JON, this happens:

javax.security.auth.login.FailedLoginException: Invalid username or password

which is fine. However, if I specify correct credentials, this happens (I turned on agent debugging):

2012-10-10 09:10:19,019 DEBUG [InventoryManager.discovery-1] (rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler)- Call to [org.rhq.plugins.jmx.JMXServerComponent.start()] with args [[org.rhq.core.pluginapi.inventory.ResourceContext@b9c7bfc]] failed.
java.util.concurrent.ExecutionException: org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Failed to authenticate to managed JVM - principal and/or credentials connection properties are not set correctly.
	at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:262)
	at java.util.concurrent.FutureTask.get(FutureTask.java:119)
	at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invokeInNewThreadWithLock(ResourceContainer.java:554)
	at org.rhq.core.pc.inventory.ResourceContainer$ResourceComponentInvocationHandler.invoke(ResourceContainer.java:542)
	at $Proxy42.start(Unknown Source)
	at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:1733)
	at org.rhq.core.pc.inventory.InventoryManager.refreshResourceComponentState(InventoryManager.java:3012)
	at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:2757)
	at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:2763)
	at org.rhq.core.pc.inventory.InventoryManager.processSyncInfo(InventoryManager.java:2763)
	at org.rhq.core.pc.inventory.InventoryManager.synchInventory(InventoryManager.java:1105)
	at org.rhq.core.pc.inventory.InventoryManager.handleReport(InventoryManager.java:1079)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.call(RuntimeDiscoveryExecutor.java:126)
	at org.rhq.core.pc.inventory.RuntimeDiscoveryExecutor.call(RuntimeDiscoveryExecutor.java:61)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:165)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:679)
Caused by: org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Failed to authenticate to managed JVM - principal and/or credentials connection properties are not set correctly.
	at org.rhq.plugins.jmx.JMXServerComponent.start(JMXServerComponent.java:74)
	at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:634)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	... 3 more

and the JMX connection does not work. By other means, like jconsole, I can connect to that tomcat instance using remote jmx without problems.
Comment 1 Jan Martiska 2012-10-25 04:14:06 EDT
ok I finally found out that it works - the problem was you have to specify the same credentials on two places, which is really unintuitive.. but whatever, closing this one, this is not a bug.
Comment 2 Misha H. Ali 2012-10-25 04:25:30 EDT
Removed from Known Issues for JON.

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