简体   繁体   English

org.jgroups.protocols.UDP - 将消息发送到null失败

[英]org.jgroups.protocols.UDP - failed sending message to null

[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$1.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.access$101(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. 除了在日志中获取该消息之外,一切似乎都正常。

In response to matt b, the "failed sending message to null" message is misleading. 为响应matt b,“将消息发送到null失败”消息具有误导性。 The true problem is the InterruptedIOException. 真正的问题是InterruptedIOException。 This means that someone called interrupt() on the Thread that was sending UDP. 这意味着有人在正在发送UDP的线程上调用了interrupt()。 Most likely, the interrupt is generated within JGroups. 最有可能的是,中断是在JGroups中生成的。 (Unless you started, and then stopped the JGroups channel.) (除非你开始,然后停止了JGroups频道。)

Looking at the stack trace, the interrupted I/O was from a Discovery protocol. 查看堆栈跟踪,中断的I / O来自Discovery协议。 It was trying to discover other cluster members. 它试图发现其他集群成员。 Thus, no message of yours was lost from this Exception. 因此,此异常中没有丢失您的消息。

We would have to know more to really figure this one out. 我们必须知道更多才能真正理解这一点。

Sending to "null" means sending to the entire cluster, versus sending a message to a single member. 发送到“null”表示发送到整个群集,而不是向单个成员发送消息。 I agree, this is a bit misleading, so I changed this in later version: IIRC "null" was replaced to with "cluster" or "group". 我同意,这有点误导,所以我在以后的版本中更改了这个:IIRC“null”被替换为“cluster”或“group”。

"null" here referred to the destination: a null destination address means send to the entire cluster. “null”在这里指的是目的地:空目的地地址意味着发送到整个集群。

The InterruptedIOException comes from the sender thread being stopped by JGroups; InterruptedIOException来自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). 例如,当我们在发现阶段已经有足够的响应返回时,就会发生这种情况,因此停止发送任务(即中断)。

This was also fixed in later versions of JGroups. 这也在JGroups的更高版本中得到修复。 Bela 贝拉

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. 否则,对于其他任何人来说,如果没有代码示例,网络上的信息,发生问题的具体情况等等,这可能很难帮助您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM