搭建springboot+springcloud分布式项目问题集合

在搭建springboot+springcloud分布式项目时遇到了这个问题:

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.

解决问题有两种可能的解决方法:            

 1)修复etc主机

 

2)禁用本地主机检查。              

禁用本地主机检查有两种方法:              

a)系统范围:取消对行的注释            

 #com.sun.management.jmxremote.local.only=false            

 在jre/lib/management/management.properties中            

 b)基于进程:pass-Dcom.sun.management.jmxremote.local.only=false              在java命令行(attachee端)

我的情况属于第(2)种,当我释放了 #com.sun.management.jmxremote.local.only=false 以后再次运行就正常了

奇怪的是,运行完成以后我再次把这行注释掉发现工程仍能正常运行,这个让我觉得很奇怪

 

你可能感兴趣的:(错误处理)