java.rmi.ConnectException: Connection refused to host: 127.0.1.1;

前端 未结 14 2632
攒了一身酷
攒了一身酷 2020-11-27 15:08
    java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
    java.net.ConnectException: Connection refused
    at sun.rmi.transport         


        
14条回答
  •  借酒劲吻你
    2020-11-27 15:22

    I had the same exact problem and my issue was that I had 2 IP addresses from 2 different networks configured in the etc/hosts as below.

    10.xxx.x.xxx    localhost
    192.xxx.x.xxx   localhost
    

    This should be because there was a conflict as to which IP to be used for the other devices to reach the rmiregistry over the network.

    Once I removed the extra-record that is not required, I was able to solve the issue.

    So my etc/hosts file had only the following record.

    10.xxx.x.xxx    localhost
    

提交回复
热议问题