Getting `Can't assign requested address` java.net.SocketException using Ehcache multicast

前端 未结 4 731
长情又很酷
长情又很酷 2020-12-23 19:53

Getting java.net.SocketException when trying to start a multicast provider:

2013-09-11 11:45:44,204 [main] ERROR net.sf.ehcache.distribution.Mul         


        
4条回答
  •  臣服心动
    2020-12-23 20:24

    A slight variation on the accepted answer: You can also add the following line of code to your java code:

    System.setProperty("java.net.preferIPv4Stack", "true");
    

提交回复
热议问题