启用JMX的Java应用程序似乎在JMX客户端连接时打开随机高位端口 [英] JMX enabled Java application appears to open a random high order port when JMX client connects

查看:431
本文介绍了启用JMX的Java应用程序似乎在JMX客户端连接时打开随机高位端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经成功配置了启用helloworld JMX的程序,我可以连接到它使用来自远程位置的jconsole JMX客户端。

I have successfully configured a helloworld JMX enabled program, and I can connect to it using jconsole JMX client from a remote location.

当我尝试打开iptables时,我注意到当客户端登录时会建立一个随机的高阶端口。最后我会喜欢监控防火墙隔离网段中的Java应用程序。我们可以控制随机端口打开的范围吗?

When I attempt to turn on iptables I noticed that a random high order port is established when a client logs in. Eventually I would like to monitor Java applications in firewall segregated network segments. Can we control the range the random port opens in?

如果建议,我会将此问题移至serverfault.com。

I'll move this question to serverfault.com if suggested.

推荐答案

可以控制RMI使用的端口。请参阅: http://olegz.wordpress.com/ 2009/03/23 / jmx-connectivity-through-the firewall /

It's possible to control the port used by RMI. See: http://olegz.wordpress.com/2009/03/23/jmx-connectivity-through-the-firewall/

这需要代码和命令行参数。我没有办法在没有代码的情况下做到这一点(尽管代码显然可以打包在不同的jar中)。

This requires code and a command-line parameter. There's no way that I know of to do this without code (though the code can obviously be packaged in a different jar).

这篇关于启用JMX的Java应用程序似乎在JMX客户端连接时打开随机高位端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆