开发者

JConsole command line credentials

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.home}/bin/jconsole.exe
    -J-Djava.class.path=${jdk.home}/lib/jconsole.jar;
        ${jdk.home}/lib/tools.jar;${weblogic.home}/server/lib/wljmxclient.jar
    -J-Djmx.remote.protocol.provider.pkgs=weblogic.management.remote
    service:jmx:iiop://127.0.0.1:7510/jndi/weblogic.management.mbeanservers.run开发者_Go百科time

Does anyone know if that's possible and where should those credentials be placed.

Thanks.


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


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.


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜