Debugging JConsole Connection Failed

后端 未结 8 1147
臣服心动
臣服心动 2020-12-29 04:34

I have a web application deployed to a remote resin server, and it has JMX turned on.

I can telnet to the remote server i.e

franz@see:/tmp$ telnet &l         


        
8条回答
  •  隐瞒了意图╮
    2020-12-29 05:03

    Make sure you are running your application with following java properties set

    -Dcom.sun.management.jmxremote.port=9005
    -Dcom.sun.management.jmxremote.authenticate=false
    -Dcom.sun.management.jmxremote.ssl=false
    

    Try to connect now. If you want to debug this ,you can run the jconsole with following command

    jconsole -J-Djava.util.logging.config.file=path_to_logging.properties_for_jconsole
    

    Below is the content of logging.properties file

    Logging.properties
    
    handlers = java.util.logging.ConsoleHandler
    
    
    .level = INFO
    
    java.util.logging.ConsoleHandler.level = FINEST
    
    java.util.logging.ConsoleHandler.formatter = \
    
    java.util.logging.SimpleFormatter
    
    // Use FINER or FINEST for javax.management.remote.level - FINEST is
    
    // very verbose...
    
    javax.management.level = FINEST
    
    javax.management.remote.level = FINER
    

    Once you run jconsole a separate window will pop up displaying logs.

提交回复
热议问题