Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-9880

Cluster with multiple locators in an environment with no host name resolution, leads to null pointer exception

    XMLWordPrintableJSON

Details

    Description

      In our use case we have two locators that are initially configured with IP addresses, but AutoConnectionSourceImpl.UpdateLocatorList() flow keeps on adding their corresponding host names to the locators list, while these host names are not resolvable.

      Later in AutoConnectionSourceImpl.queryLocators(), whenever a client tries to use such non resolvable host name to connect to a locator it tries to establish a connection to socketaddr=0.0.0.0, as written in SocketCreator.connect(). Which seems strange.

      Then, if there is no locator running on the same host, the next locator in the list is contacted, until reaching a locator contact configured with IP address - which succeeds eventually.

      But, when there happens to be a locator listening on the same host, then we have a null pointer exception in the second line below, because inetadd=null

      socket.connect(sockaddr, Math.max(timeout, 0)); // sockaddr=0.0.0.0, connects to a locator listening on the same host
      configureClientSSLSocket(socket, inetadd.getHostName(), timeout); // inetadd = null

       

      As a result, the cluster comes to a failed state, unable to recover.

      Attachments

        Activity

          People

            pjohnson Patrick Johnsn
            tghahramanya Tigran Ghahramanyan
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: