以前用jgroups以及mantaray都碰到過這樣的問題蹩腳的做法禁止IPv協議今天學到的一招解決網絡編程IPv帶來的問題!設置一個屬性就可以了 preferIPvStack=true 以後用jgroups可以設置一下就可以了查閱sun官方文檔解釋如下
preferIPvStack (default: false) If IPv is available on the operating system the underlying native socket will be an IPv socket This allows Java(tm) applications to connect too and accept connections from both IPv and IPv hosts If an application has a preference to only use IPv sockets then this property can be set to true The
From:http://tw.wingwit.com/Article/program/Java/hx/201311/27026.html