JConsole Connection Failed

It is very annoying when you see JConsole failed to attach to a runtime with simply tells you “The connection to pid did not succeed. Would you like to try again?”. This is a completely useless message.

How to troubleshooting JConsole connection failure? You can start it with option

jconsole -J-Djava.util.logging.config.file="e:\\logging.properties"

And the logging.properties file should look like

//Log level is the level of java.util.logging.Level
//It can be SEVERE, WARNING, INFO, CONFIG, FINE, FINER or FINEST
handlers = java.util.logging.ConsoleHandler
.level = INFO
java.util.logging.ConsoleHandler.level = FINEST
java.util.logging.ConsoleHandler.formatter = \
java.util.logging.SimpleFormatter
javax.management.level = FINEST
javax.management.remote.level = FINER

With this, you will see a separated log dialog popped out when you start Jconsole and it will print out more information about the failure.

Advertisements
This entry was posted in Tool and Debug and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s