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

GossipRouter NPE on startup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.4, 5.3.8
    • 5.3.7
    • None

      The GossipRouter can throw a NPE on startup as the DiagnosticHandler#print_headers Function calls GossipRouter#localAddress which requires the server var to have been initialized.

      Output:

      Jun 12, 2024 1:31:52 PM org.jgroups.stack.DiagnosticsHandler runTCP
      SEVERE: failed processing TCP client request from /10.129.2.2:39086: java.lang.NullPointerException: Cannot invoke "org.jgroups.blocks.cs.BaseServer.localAddress()" because "this.server" is null
      
      GossipRouter started in 2194 ms listening on 0.0.0.0:7900 (TLSv1.3/SunJSSE version 21)
      added _test-default-tls-load-balancer-with-port-xsite1-0-11249 (10.129.2.34:59875) to group xsite
      added _test-default-tls-load-balancer-with-port-xsite2-0-4686 (10.128.2.41:43628) to group xsite
      added _test-default-tls-load-balancer-with-port-xsite2-0-4686 (10.128.2.41:43628) to group xsite
      

      To prevent this we must ensure that the DiagnosticHandler is started after the server var has been initialized.

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: