Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1435

NoServerAvailable message should include seed list and current server addresses

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 2.7.0.rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Currently NoServerAvailable exception message includes various details of the server selector (besides primary) but doesn't include any information about either the seeds or the current cluster. This generally makes it difficult to identify why the driver could not find a server, because any of the following may have taken place:

      1. Driver failed to connect to any of the servers, for example because the hostname/IP was misspelled.
      2. Driver failed to connect to any of the servers because it tried to connecting to a temporary development port and that mongod instance was shut down.
      3. Driver failed to select a server because it is trying to connect to a cluster with no server addresses in it.
      4. Driver failed to select a server because the cluster makeup changed at some point in the past and then the cluster was reset to its original configuration, but driver keeps trying to connect to the changed configuration.

      Many of these cases would be immediately obvious if only the exception message stated what the seed list was and what the current cluster server addresses are.

      Note that as far as I know we don't currently save the seed list, thus part of the work in this ticket is to save the seed list in the client somewhere. Possibly even the SRV address.

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: