aws fargate-从本地无法连接到运行在aws fargate上的java应用程序的jmx端口

xfyts7mz  于 2021-06-29  发布在  Java
关注(0)|答案(1)|浏览(553)

这就是我目前所做的:

1. I have deployed a java 11 application on aws fargate and it is up and running.
2. Task definition is correctly configured for tcp port mapping to application port 
   and jmx port (3939).
3. There is VPC configuration which allows communication between my network and aws.
4. Application is started with these additional system properties for 
   remote jmx connections:

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

5. From my local machine I am successfully able to telnet to private IP of fargate task 
   and jmx port 3939.

但是当我尝试使用jvisualvm或jdk任务控制连接到jmx时,它无法连接。我是不是漏了什么?

6yjfywim

6yjfywim1#

最后,我添加了下面提到的属性,强制rmi端口与jmx端口相同,而不是打开一个未从安全组打开的随机端口。

-Dcom.sun.management.jmxremote.rmi.port=3939

感谢这些stackoverflow岗位:
为什么配置jmx时java会打开3个端口?
用visualvm和jmx进行远程监控

相关问题