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

HTTP detection no longer working

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.6.2
    • 3.6.4, 3.7.3
    • Networking
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • 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.
    • 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

            jonathan.reams@mongodb.com Jonathan Reams
            timn Tim Niemueller
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: