geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kirk Lund <>
Subject Loner changes its membership port when starting an acceptor
Date Tue, 15 Jan 2019 00:45:20 GMT
So I was stepping through some WAN tests in IJ debugger (on develop with no
changes) and discovered that any MXBeans that are created before starting a
server port (either using CacheServer or GatewayReceiver) are broken and
fail to be updated after that -- the ObjectNames include the
DistributedMember.getName(). Turns out some JMX code is eating an NPE
that's caused because the LonerDistributionManager changes its membership
port when an acceptor endpoint is started up.

Below is the method in LonerDistributionManager (with some other issues as
well) that does this updating. We either need to make a lot of changes to
the JMX code to fix this or we need to make one small change to
LonerDistributionManager (ie, to delete this method). Question: do we
really need the DistributedMember of a Loner to change its getName() which
includes the membership port that changed?

   * update the loner port with an integer that may be more unique than the
default port (zero).
   * This updates the ID in place and establishes new default settings for
the manufacture of new
   * IDs.
   * @param newPort the new port to use
  public void updateLonerPort(int newPort) {
        String.format("Updating membership port.  Port changed from %s to
%s.  ID is now %s",
            new Object[] {this.lonerPort, newPort, getId()}));
    this.lonerPort = newPort;

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message