2015年5月19日星期二

EAP_022:HQ224033: Failed to broadcast connector configs问题的解决

环境:MAC OS X 10.10.3 + JBoss EAP 6.4

在MAC下使用JBoss EAP 6.4做集群实验,启动Host Controller时,报告如下错误:

14:09:07,317 ERROR [org.hornetq.core.server] (Thread-0 (HornetQ-scheduled-threads-2144051991)) HQ224033: Failed to broadcast connector configs: java.io.IOException: Can't assign requested address
[Server:server-two]     at java.net.PlainDatagramSocketImpl.send(Native Method) [rt.jar:1.7.0_75]
[Server:server-two]     at java.net.DatagramSocket.send(DatagramSocket.java:697) [rt.jar:1.7.0_75]
[Server:server-two]     at org.hornetq.api.core.UDPBroadcastGroupConfiguration$UDPBroadcastEndpoint.broadcast(UDPBroadcastGroupConfiguration.java:136) [hornetq-core-client-2.3.25.Final-redhat-1.jar:2.3.25.Final-redhat-1]
[Server:server-two]     at org.hornetq.core.server.cluster.impl.BroadcastGroupImpl.broadcastConnectors(BroadcastGroupImpl.java:216) [hornetq-server-2.3.25.Final-redhat-1.jar:2.3.25.Final-redhat-1]
[Server:server-two]     at org.hornetq.core.server.cluster.impl.BroadcastGroupImpl.run(BroadcastGroupImpl.java:228) [hornetq-server-2.3.25.Final-redhat-1.jar:2.3.25.Final-redhat-1]
[Server:server-two]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_75]
[Server:server-two]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [rt.jar:1.7.0_75]
[Server:server-two]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [rt.jar:1.7.0_75]
[Server:server-two]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [rt.jar:1.7.0_75]
[Server:server-two]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
[Server:server-two]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
[Server:server-two]     at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]

原因是在MAC OS X 下,hornetq的multicast出现了问题。
解决办法是增加一个路由:sudo route add 224.0.0.0 127.0.0.1 -netmask 240.0.0.0

参考文献:
1. http://blog.kenthua.com/2015_05_01_archive.html

没有评论: