JGROUP常见问题总结

1.[14/05/16 09:47:07.940][Timer-3,DYVCENTER_CLUSTER_100.0.6.173_5432,PC-16220]
[org.jgroups.protocols.UDP:1051] failed sending message to cluster (128 bytes):
java.lang.Exception: dest=/ff0e:0:0:0:0:8:8:8:45588 (131 bytes), cause: java.net
.BindException: Cannot assign requested address: Datagram send failed
Exception in thread "Timer-67,DYVCENTER_CLUSTER_100.0.6.173_5432,PC-22679" j
ava.lang.NullPointerException
        at org.jgroups.logging.Log4JLogImpl.error(Log4JLogImpl.java:64)
        at org.jgroups.util.TimeScheduler2$Entry.execute(TimeScheduler2.java:432
)
        at org.jgroups.util.TimeScheduler2$1.run(TimeScheduler2.java:295)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:662)

在win7环境下,因为对IPV6支持的不太好,需要启动tomcat时,加上启动参数-Djava.net.preferIPv4Stack=true

2.Exception in thread "OOB-171,DYVCENTER_CLUSTER_100.0.6.173_5432,PC-39112" ja
va.lang.NullPointerException
        at org.apache.log4j.spi.LocationInfo.<init>(LocationInfo.java:112)
        at org.apache.log4j.spi.LoggingEvent.getLocationInformation(LoggingEvent
.java:247)
        at org.apache.log4j.helpers.PatternParser$LocationPatternConverter.conve
rt(PatternParser.java:483)
        at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.jav
a:65)
        at org.apache.log4j.PatternLayout.format(PatternLayout.java:502)
        at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:302)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
        at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)

        at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders
(AppenderAttachableImpl.java:66)
        at org.apache.log4j.Category.callAppenders(Category.java:206)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.jgroups.logging.Log4JLogImpl.error(Log4JLogImpl.java:64)
        at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1652)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:662)

需要启动tomcat时,加上启动参数,绑定一个具体的IP地址 -Djgroups.bind_addr=100.0.6.144

相关推荐