JConsole 命令行凭据
通过命令行启动 JConsole 时是否可以将受监视资源的凭据传递给 JConsole。我现在已经收到这样的命令了。
${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.runtime
有谁知道这是否可能以及这些凭据应该放置在哪里。
谢谢。
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.runtime
Does anyone know if that's possible and where should those credentials be placed.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
JConsole 不可能做到这一点。允许您从命令行传递用户名/密码的替代 JMX 控制台是 jmxterm。
它可以在这里找到: http://wiki.cyclopsgroup.org/jmxterm
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
我认为没有命令行访问选项可以执行此操作。这是一种明智的方法,因为它会揭示流程签名中的凭据,而其他人可能会看到这些凭据。
但是,您可以使用系统属性com.sun.management.jmxremote.password.file指定密码文件。
这些选项记录在此处。
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.
据我所知,你不能。从您的示例来看,您似乎只是尝试在本地连接到 JMX 进程。在这种情况下,您可以简单地禁用 JMX 进程中的身份验证(并确保它仅通过本地主机侦听 JMX)。然后您不需要传递凭据,它将与 jconsole 一起使用。不过,对于真正的远程连接(其中您肯定需要身份验证,以及加密等其他功能),我认为您必须尝试许多其他 jmx 类型客户端之一。
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.