jconsole connection failed

Posted on 2005-05-01
Last Modified: 2009-11-16
I got jconsole working with the server if I have authentication and ssl disabled. But, when I try to enable authentication it fails.

I've created a certificate and it's in the keystore.

Here are the extra parameters I added to the server: -Djava.rmi.server.hostname=""

I added passwords to the jxmremote.password file for "monitorRole" and "controlRole".

I then tried to log into the server using jconsole with the username "controlRole" and it just says "connection failed". I find it odd that a username would have "role" in it, but that seems to be what the jmx ssl setup instructions seem to be telling me.

The frustrating thing is that jconsole just says "connection failed" and never provides any additional information to indicate what's failing.
Question by:HappyEngineer
    LVL 3

    Expert Comment

    Enable the debuging and notice the processing

    Add the line to enable the SSL debug log

    Author Comment

    I did that and it outputs lots of debug info. The relevant part seems to be:
      RMI TCP Connection(24)-, handling exception: no cipher suites in common

    What does that mean? I'm running jconsole from the same PC as the server using the same jdk. Anything available to jconsole should be available to the webapp.

    Author Comment

    I've added a jvm parameter to point it to the keystore, but it still doesn't list any keys added. After "init truststore" it lists a whole bunch of keys which are apparently part of the default java distribution. But, after the "init keystore" it doesn't list any keys.

    setting up default SSLSocketFactory
    use default SunJSSE impl class:
    class is loaded
    keyStore is : J:/jdk/bin/klkeystore
    keyStore type is : jks
    keyStore provider is :
    init keystore
    init keymanager of type SunX509
    trustStore is: J:\j2sdk1.5.0_01\jre\lib\security\cacerts
    trustStore type is : jks
    trustStore provider is :
    init truststore
    adding as trusted cert:
      Subject: CN=Baltimore CyberTrust Code Signing Root, OU=CyberTrust, O=Baltimore, C=IE

    If I list the keystore I get:

    J:\jdk\bin>keytool -list -keystore klkeystore
    Enter keystore password:  yastmork

    Keystore type: jks
    Keystore provider: SUN

    Your keystore contains 1 entry

    klcert, May 1, 2005, trustedCertEntry,
    Certificate fingerprint (MD5): ...
    LVL 3

    Accepted Solution

    Then add ur new key and then try

    keytool -import -file /tmp/certificate.cer  -keystore J:\j2sdk1.5.0_01\jre\lib\security\cacerts -alias  worldcheck

    give the password : changeit

    Do you want to trust it? [no]:  yes

    Author Comment

    Ok, it's in there now and is listed when the webapp starts.

    However, when I try to connect with jconsole it still says (in the webapp logs) that there are no cipher suites in common.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    My project did see openJDK that I installed. What could be the problem 7 62
    bunnyEars challenge 6 45
    countX 22 50
    array11 challenge 16 40
    INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
    Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now