java org.jgroups.protocols.UDP - 向 null 发送消息失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/372771/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
org.jgroups.protocols.UDP - failed sending message to null
提问by Nik
[hannel,192.168.0.46:40014] 15:08:03,642 - ERROR - org.jgroups.protocols.UDP - failed sending message to null (61 bytes)
java.lang.Exception: dest=/225.1.2.46:30446 (64 bytes)
at org.jgroups.protocols.UDP._send(UDP.java:333)
at org.jgroups.protocols.UDP.sendToAllMembers(UDP.java:283)
at org.jgroups.protocols.TP.doSend(TP.java:1327)
at org.jgroups.protocols.TP.send(TP.java:1317)
at org.jgroups.protocols.TP.down(TP.java:1038)
at org.jgroups.protocols.PING.sendMcastDiscoveryRequest(PING.java:220)
at org.jgroups.protocols.PING.sendGetMembersRequest(PING.java:214)
at org.jgroups.protocols.Discovery$PingSenderTask.run(Discovery.java:385)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access1(ScheduledThreadPoolExecutor.java:65)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.InterruptedIOException: operation interrupted
at java.net.PlainDatagramSocketImpl.send(Native Method)
at java.net.DatagramSocket.send(DatagramSocket.java:612)
at org.jgroups.protocols.UDP._send(UDP.java:324)
... 16 more
This is happening during load testing on the server. Should I worry about it. Aside from getting that message in the log, everything seem to work OK.
这是在服务器上进行负载测试期间发生的。我应该担心吗。除了在日志中收到该消息之外,一切似乎都正常。
采纳答案by Eddie
In response to matt b, the "failed sending message to null" message is misleading. The true problem is the InterruptedIOException. This means that someone called interrupt() on the Thread that was sending UDP. Most likely, the interrupt is generated within JGroups. (Unless you started, and then stopped the JGroups channel.)
响应 matt b,“向空发送消息失败”消息具有误导性。真正的问题是 InterruptedIOException。这意味着有人在发送 UDP 的线程上调用了 interrupt()。最有可能的是,中断是在 JGroups 中产生的。(除非您启动,然后停止 JGroups 频道。)
Looking at the stack trace, the interrupted I/O was from a Discovery protocol. It was trying to discover other cluster members. Thus, no message of yours was lost from this Exception.
查看堆栈跟踪,中断的 I/O 来自 Discovery 协议。它试图发现其他集群成员。因此,您的任何消息都不会因此异常而丢失。
We would have to know more to really figure this one out.
我们必须了解更多才能真正弄清楚这一点。
回答by Bela Ban
Sending to "null" means sending to the entire cluster, versus sending a message to a single member. I agree, this is a bit misleading, so I changed this in later version: IIRC "null" was replaced to with "cluster" or "group".
发送到“null”意味着发送到整个集群,而不是向单个成员发送消息。我同意,这有点误导,所以我在以后的版本中改变了这一点:IIRC“null”被替换为“cluster”或“group”。
"null" here referred to the destination: a null destination address means send to the entire cluster.
“空”在这里指的是目的地:一个空的目的地地址意味着发送到整个集群。
The InterruptedIOException comes from the sender thread being stopped by JGroups; this happens for example when we already have enough responses in the discovery phase to return, and so the send task is stopped (ie., interrupted).
InterruptedIOException 来自被 JGroups 停止的发送者线程;例如,当我们在发现阶段已经有足够的响应返回时,就会发生这种情况,因此发送任务停止(即中断)。
This was also fixed in later versions of JGroups. Bela
这也在更高版本的 JGroups 中得到修复。贝拉
回答by matt b
Is it possible you are getting an error because you are sending a message to "null"?
是否有可能因为您向“null”发送消息而收到错误消息?
ERROR - org.jgroups.protocols.UDP - failed sending message to null
错误 - org.jgroups.protocols.UDP - 向 null 发送消息失败
Otherwise this is probably pretty hard for anyone else to help you out with without code samples, information on your network, the specific situation where your problem occurs, etc.
否则,如果没有代码示例、网络信息、问题发生的具体情况等,其他人可能很难帮助您解决问题。

