Bug 1124845 - EAP6 with secured management - confusing error msg when incorrect Truststore Type is set
Summary: EAP6 with secured management - confusing error msg when incorrect Truststore ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6, Usability
Version: JON 3.2.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: post-GA
: One-off release
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: 1088652 1112696 1117854 1125914 1128960
TreeView+ depends on / blocked
 
Reported: 2014-07-30 12:51 UTC by Filip Brychta
Modified: 2014-08-19 14:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1125914 (view as bug list)
Environment:
Last Closed: 2014-08-19 14:31:44 UTC
Type: Bug


Attachments (Terms of Use)

Description Filip Brychta 2014-07-30 12:51:14 UTC
Description of problem:
$Summary

Version-Release number of selected component (if applicable):
Version :	
3.2.0.GA Update 02
Build Number :	
dfe3e4b:cf4474c

jon-plugin-pack-eap-3.2.0.GA-update-01

How reproducible:
Always

Steps to Reproduce:
1. Secure EAP management interface according to EAP Security guide (use jks for truststore/keystore)
2. import this eap6 resource and set correctly all properties in Inventory->Connection Settings
3. set Truststore Type to pkcs12

Actual results:
Resource is correctly marked as down but error msg visible in Message Center is confusing. User has no idea that this error is caused by incorrect Truststore Type

Expected results:
User friendly error msg

Additional info:
Err msg:
org.rhq.core.clientapi.agent.PluginContainerException: Failed to start component for resource Resource[id=10144, uuid=30024866-1b10-43e1-b8ba-0866dcc40ba6, type={JBossAS7}JBossAS7 Standalone Server, key=hostConfig: /home/hudson/jboss-eap6-standalone/standalone/configuration/standalone-full-secured-changed.xml, name=EAP (0.0.0.0:9543), parent=fbr-eap6-sec2.bc.jonqe.lab.eng.bos.redhat.com, version=EAP 6.2.4.GA].
	at org.rhq.core.pc.inventory.InventoryManager.activateResource(InventoryManager.java:1943)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.checkInventory(AvailabilityExecutor.java:361)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.startScan(AvailabilityExecutor.java:195)
	at org.rhq.core.pc.inventory.CustomScanRootAvailabilityExecutor.startScan(CustomScanRootAvailabilityExecutor.java:71)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:152)
	at org.rhq.core.pc.inventory.AvailabilityExecutor.call(AvailabilityExecutor.java:62)
	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$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	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:722)
Caused by: java.lang.RuntimeException: java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
	at org.rhq.modules.plugins.jbossas7.SchemeRegistryBuilder.buildSchemeRegistry(SchemeRegistryBuilder.java:87)
	at org.rhq.modules.plugins.jbossas7.ASConnection.(ASConnection.java:179)
	at org.rhq.modules.plugins.jbossas7.BaseServerComponent.start(BaseServerComponent.java:108)
	at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocation.call(ResourceContainer.java:654)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	... 3 more
Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=109, too big.
	at sun.security.util.DerInputStream.getLength(DerInputStream.java:561)
	at sun.security.util.DerValue.init(DerValue.java:365)
	at sun.security.util.DerValue.(DerValue.java:320)
	at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1220)
	at java.security.KeyStore.load(KeyStore.java:1214)
	at org.rhq.modules.plugins.jbossas7.SchemeRegistryBuilder.loadKeystore(SchemeRegistryBuilder.java:103)
	at org.rhq.modules.plugins.jbossas7.SchemeRegistryBuilder.buildSchemeRegistry(SchemeRegistryBuilder.java:63)
	... 11 more

Comment 1 Thomas Segismont 2014-08-01 10:33:13 UTC
Fixed in master

commit 62986312e18a2f02e7336fe33acdbd535b85016a
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Fri Aug 1 12:28:24 2014 +0200

Now trying to load the truststore/keystore when validating the connection settings and retun correct message in case of failure

Comment 2 Jirka Kremser 2014-08-08 11:51:05 UTC
branch:  release/jon3.2.x
link:    https://github.com/rhq-project/rhq/commit/edb1ac4d9
time:    2014-08-08 13:49:44 +0200
commit:  edb1ac4d9764295142e8174dfc76091a4dd9f3c6
author:  Thomas Segismont - tsegismo@redhat.com
message: Bug 1124845 - EAP6 with secured management - confusing error msg when
         incorrect Truststore Type is set

         Now trying to load the truststore/keystore when validating the 
         connection settings and retun correct message in case of
         failure

         (cherry picked from commit
         62986312e18a2f02e7336fe33acdbd535b85016a) Signed-off-by: Jirka
         Kremser <jkremser@redhat.com>

Comment 4 Filip Brychta 2014-08-12 11:26:19 UTC
Verified on
Version :	
3.2.0.GA Update 02
Build Number :	
dfe3e4b:cf4474c


Following error is now thrown so the user at least knows that the problem is related to truststore.
caused by: org.rhq.core.pluginapi.inventory.InvalidPluginConfigurationException: Cannot read the truststore: DerInputStream.getLength(): lengthTag=109, too big.


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