java.io.IOException: The server sockets created using the LocalRMIServerSocketFactory only accept connections from clients runni

Published on 2023-07-12 14:48 in 分类: 随笔 with 狂盗一枝梅
分类: 随笔

SpringBoot程序启动报错:

2023-07-12 14:42:15.311  WARN 19604 --- [MI TCP Accept-0] sun.rmi.transport.tcp                    : RMI TCP Accept-0: accept loop for ServerSocket[addr=0.0.0.0/0.0.0.0,localport=56295] throws

java.io.IOException: The server sockets created using the LocalRMIServerSocketFactory only accept connections from clients running on the host where the RMI remote objects have been exported.
	at sun.management.jmxremote.LocalRMIServerSocketFactory$1.accept(LocalRMIServerSocketFactory.java:114) ~[na:1.8.0_333]
	at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.executeAcceptLoop(TCPTransport.java:405) [na:1.8.0_333]
	at sun.rmi.transport.tcp.TCPTransport$AcceptLoop.run(TCPTransport.java:377) [na:1.8.0_333]
	at java.lang.Thread.run(Thread.java:750) [na:1.8.0_333]

解决方案:

VM options新增启动参数:-Dcom.sun.management.jmxremote.local.only=false


#java
复制 复制成功