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

HTTP detection no longer working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.2
    • Fix Version/s: 3.6.4, 3.7.3
    • Component/s: Networking
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6
    • Steps To Reproduce:
      Hide
      • Run MongoDB 3.6 from
      • Access localhost:27017 with a web browser or curl

      In Docker:

      # docker run --rm --name mongotest mongo:3.6
      

      Next console:

      # docker exec -ti mongotest bash
      # apt-get update
      # apt-get install curl
      # curl localhost:27017
      

      Actual results:

      curl: (56) Recv failure: Connection reset by peer

      Expected:

      It looks like you are trying to access MongoDB over HTTP on the native driver port.

      Show
      Run MongoDB 3.6 from Access localhost:27017 with a web browser or curl In Docker: # docker run --rm --name mongotest mongo:3.6 Next console: # docker exec -ti mongotest bash # apt-get update # apt-get install curl # curl localhost:27017 Actual results: curl: (56) Recv failure: Connection reset by peer Expected: It looks like you are trying to access MongoDB over HTTP on the native driver port.
    • Sprint:
      Platforms 2018-03-12

      Description

      When accessing MongoDB over HTTP, it returns a simple HTTP response stating that it does not server HTTP:

      It looks like you are trying to access MongoDB over HTTP on the native driver port.

      This is a nice feature in order to check for principal MongoDB liveness, and we use it, for example, to check whether MongoDB has come up yet in automated experiments running in a Kubernetes cluster (https://github.com/timn/docker-robotics/blob/master/rcll-sim/scripts/run-component#L32).
      This used to work with MongoDB 3.4, but does not work anymore with MongoDB 3.6 (using . The server log for each connection request contains something like this:

      Error receiving request from client: SSLHandshakeFailed: SSLHandshakeFailed. Ending connection from 127.0.0.1:45380

      This is done using the current mongo image from Docker hub.

        Attachments

          Activity

            People

            Assignee:
            jonathan.reams Jonathan Reams
            Reporter:
            timn Tim Niemueller
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: