[ 
https://issues.apache.org/jira/browse/KARAF-6954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248447#comment-17248447
 ] 

Martin Lichtin commented on KARAF-6954:
---------------------------------------

Unfortunately the error still occurs even after removing 
{{-Dcom.sun.management.jmxremote}}

Something more minor, these logger.info's:
{noformat}
            if (keyStore != null && keyInstance == null) {
                logger.info( "Keystore {} not found", keyStore );
            } else if (keyStore != null && keyInstance.isKeystoreLocked()) {
                logger.info( "Keystore {} locked", keyStore );
            } else if (keyStore != null && keyAlias != null && 
keyInstance.isKeyLocked(keyAlias)) {
                logger.info( "Keystore's key {} locked", keyAlias );
            } else if (trustStore != null && trustInstance == null) {
                logger.info( "Truststore {} not found", trustStore );
            } else if (trustStore != null && trustInstance.isKeystoreLocked()) {
                logger.info( "Truststore {} locked", keyStore ); {noformat}
should perhaps be reviewed. From my point of view, it would be better if the 
"not found" cases were logger.debug, and the "locked" cases might better be 
logger.warn, as I believe these two cases are real issues, not just a timing 
situation.

> JMXRMI - error 'Can't re-init JMXConnectorServer with SSL enabled when 
> register a keystore:connector:name=rmi' when trying to enable SSL
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-6954
>                 URL: https://issues.apache.org/jira/browse/KARAF-6954
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.9
>            Reporter: Martin Lichtin
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>
> {noformat}
> ERROR | activator-1-thread-1 | Activator | .management.internal.Activator$2 
> 195 | 38
> org.apache.karaf.management.server - 4.2.9 | Can't re-init JMXConnectorServer 
> with SSL enabled when register a keystore:connector:name=rmi
> {noformat}
> occurs.
> The keystore is instantiated using this code:
> {noformat}
> ResourceKeystoreInstance keyStoreInstance = new ResourceKeystoreInstance();
> keyStoreInstance.setName("jmx");
> keyStoreInstance.setPath("file:jmx.jks");
> keyStoreInstance.setRank(1);
> keyStoreInstance.setKeystorePassword("mypass");
> keyStoreInstance.setKeyPasswords("karaf=mypass");
> bundleContext.registerService(KeystoreInstance.class, keyStoreInstance, null);
> {noformat}
> and {{org.apache.karaf.management.cfg}} with settings:
> {noformat}
> secured = true
> secureAlgorithm = default
> secureProtocol = TLS
> keyStore = jmx
> keyAlias = karaf
> trustStore = jmx
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to