JConsole command line credentials

后端 未结 3 1826
小鲜肉
小鲜肉 2021-01-04 01:28

Is it possible to pass credentials for monitored resource to JConsole while starting it via command line. I\'ve got the command like that right now.

${jdk.ho         


        
相关标签:
3条回答
  • 2021-01-04 02:01

    It is not possible with JConsole. The alternative JMX console that enables you to pass username/password from command line is jmxterm.

    It can be found here: http://wiki.cyclopsgroup.org/jmxterm

    0 讨论(0)
  • 2021-01-04 02:12

    As far as I know, you can't. From your example though it looks like you are only trying to connect locally to a JMX process. In that case you could simply disable authentication in the JMX process (and make sure it listens for JMX only over localhost). Then you don't need to pass credentials and it will work with jconsole. For a true remote connection though (in which you will definitely want authentication, among other things like encryption), I think you have to try out one of the many other jmx type clients.

    0 讨论(0)
  • 2021-01-04 02:13

    I don't think there is a command line access option to do this. It's a sensible approach since it would reveal credentials in the process signature which might be visible to others.

    However, you can specify a password file using the system property com.sun.management.jmxremote.password.file.

    These options are documented here.

    0 讨论(0)
提交回复
热议问题