Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1465

[org.jgroups.protocols.TCP] failed sending message to NJ-WKST-2CF6D2X-62641 (91 bytes): java.lang.NullPointerException, cause: null

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.0.11, 3.1
    • 3.0.10
    • None
    • Hide

      two nodes, config with TCP + MPING.
      start nodeA firstly, then start nodeB, debug code TCP's line 63 (start()) to hold on initialize ct. and also break line 55 (send(...)), then you will find line 55's ct is null.

      following is a thread dump at this time:
      "ReceiverThread" daemon prio=6 tid=0x17264800 nid=0x18f4 at breakpoint[0x1775f000]
      java.lang.Thread.State: RUNNABLE
      at org.jgroups.protocols.TCP.send(TCP.java:55)
      at org.jgroups.protocols.BasicTCP.sendUnicast(BasicTCP.java:89)
      at org.jgroups.protocols.TP.sendToSingleMember(TP.java:1309)
      at org.jgroups.protocols.TP.doSend(TP.java:1282)
      at org.jgroups.protocols.TP.send(TP.java:1268)
      at org.jgroups.protocols.TP.down(TP.java:1126)
      at org.jgroups.protocols.Discovery.sendDiscoveryResponse(Discovery.java:626)
      at org.jgroups.protocols.Discovery.up(Discovery.java:426)
      at org.jgroups.protocols.MPING.up(MPING.java:179)
      at org.jgroups.protocols.MPING.run(MPING.java:330)
      at java.lang.Thread.run(Thread.java:619)
      "main" prio=6 tid=0x00847c00 nid=0x266c at breakpoint[0x0091f000]
      java.lang.Thread.State: RUNNABLE
      at org.jgroups.protocols.TCP.start(TCP.java:63)
      at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:959)
      at org.jgroups.JChannel.startStack(JChannel.java:840)
      at org.jgroups.JChannel.connect(JChannel.java:278)

      • locked <0x07f21c10> (a org.jgroups.JChannel)
        at org.jgroups.JChannel.connect(JChannel.java:262)
      • locked <0x07f21c10> (a org.jgroups.JChannel)
        at JGroupJDBCPingTest.main(JGroupJDBCPingTest.java:34)
      Show
      two nodes, config with TCP + MPING. start nodeA firstly, then start nodeB, debug code TCP's line 63 (start()) to hold on initialize ct. and also break line 55 (send(...)), then you will find line 55's ct is null. following is a thread dump at this time: "ReceiverThread" daemon prio=6 tid=0x17264800 nid=0x18f4 at breakpoint [0x1775f000] java.lang.Thread.State: RUNNABLE at org.jgroups.protocols.TCP.send(TCP.java:55) at org.jgroups.protocols.BasicTCP.sendUnicast(BasicTCP.java:89) at org.jgroups.protocols.TP.sendToSingleMember(TP.java:1309) at org.jgroups.protocols.TP.doSend(TP.java:1282) at org.jgroups.protocols.TP.send(TP.java:1268) at org.jgroups.protocols.TP.down(TP.java:1126) at org.jgroups.protocols.Discovery.sendDiscoveryResponse(Discovery.java:626) at org.jgroups.protocols.Discovery.up(Discovery.java:426) at org.jgroups.protocols.MPING.up(MPING.java:179) at org.jgroups.protocols.MPING.run(MPING.java:330) at java.lang.Thread.run(Thread.java:619) "main" prio=6 tid=0x00847c00 nid=0x266c at breakpoint [0x0091f000] java.lang.Thread.State: RUNNABLE at org.jgroups.protocols.TCP.start(TCP.java:63) at org.jgroups.stack.ProtocolStack.startStack(ProtocolStack.java:959) at org.jgroups.JChannel.startStack(JChannel.java:840) at org.jgroups.JChannel.connect(JChannel.java:278) locked <0x07f21c10> (a org.jgroups.JChannel) at org.jgroups.JChannel.connect(JChannel.java:262) locked <0x07f21c10> (a org.jgroups.JChannel) at JGroupJDBCPingTest.main(JGroupJDBCPingTest.java:34)

      using TCP + MPING, on connect a channel, throws following error:
      ------------
      2012-05-16 12:20:16,604 ERROR [org.jgroups.protocols.TCP] failed sending message to NJ-WKST-2CF6D2X-62641 (91 bytes): java.lang.NullPointerException, cause: null
      ------------

      using debug to get the exception detail as below:
      2012-05-16 16:05:39,690 ERROR [STDERR] java.lang.NullPointerException
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.TCP.send(TCP.java:56)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.BasicTCP.sendUnicast(BasicTCP.java:95)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.TP.sendToSingleMember(TP.java:1214)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.TP.doSend(TP.java:1198)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.TP.send(TP.java:1184)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.TP.down(TP.java:1041)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.Discovery.sendDiscoveryResponse(Discovery.java:512)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.Discovery.up(Discovery.java:347)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.PING.up(PING.java:69)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.MPING.up(MPING.java:176)
      2012-05-16 16:05:39,690 ERROR [STDERR] at org.jgroups.protocols.MPING.run(MPING.java:327)
      2012-05-16 16:05:39,690 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)

      and it should caused by MPING received a message, but the jchannel initialize doesn't done at this time. (TCPConnectionMap(ct) doesn't initialized in TCP).

      I guess this error should be harmless, but I think MPING should receive message after jchannel initialze done.

              rhn-engineering-bban Bela Ban
              freeliuade freeliuade freeliuade (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: