Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-57466

Swallow connection reset-related errors received during ASIO session establishment

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.2.0, 5.0.7
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • v5.0
    • Service Arch 2021-09-06, Service Arch 2021-09-20, Service Arch 2021-10-04, Service Arch 2021-11-01
    • 25
    • 5

      5.0.0-rc0 clusters (standalone mongod, mongos) running on macOS, I see many errors like this "ctx":"listener","msg":"Can't set socket option","attr":{"optname":"TCP_KEEPALIVE","error":"Invalid argument"}}

      The log is flooded with these errors:

      {"t":{"$date":"2021-06-04T13:16:52.682-07:00"},"s":"E",  "c":"NETWORK",  "id":23206,   "ctx":"listener","msg":"Can't set socket option","attr":{"optname":"TCP_KEEPALIVE","error":"Invalid argument"}}
      {"t":{"$date":"2021-06-04T13:16:52.682-07:00"},"s":"W",  "c":"NETWORK",  "id":23023,   "ctx":"listener","msg":"Error accepting new connection","attr":{"error":{"code":9001,"codeName":"SocketException","errmsg":"remote_endpoint: Invalid argument"}}}
      {"t":{"$date":"2021-06-04T13:16:52.682-07:00"},"s":"I",  "c":"NETWORK",  "id":23018,   "ctx":"listener","msg":"Error accepting new connection on local endpoint","attr":{"localEndpoint":"127.0.0.1:27017","error":"Invalid argument"}}
      

      The connections that error are coming from an otherwise idle load balancer (haproxy). When a driver connects directly to the mongod/s the error does not occur. What does this error mean and why do these errors occur for haproxy connections?

      The load balancer is started and stopped with this run-load-balancer.sh script, like this:

      $  sudo MONGODB_URI='mongodb://localhost:27017,localhost:27018/' .evergreen/run-load-balancer.sh start
      Starting HAProxy...
      Single Mongos LB: mongodb://127.0.0.1:8000/?loadBalanced=true
      Multiple Mongos LB: mongodb://127.0.0.1:8001/?loadBalanced=true
      $ sudo MONGODB_URI='mongodb://localhost:27017,localhost:27018/' .evergreen/run-load-balancer.sh stop
      Stopping HAProxy...
      

            Assignee:
            blake.oler@mongodb.com Blake Oler
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: