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

HTTP detection no longer working

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.4, 3.7.3
    • Affects Version/s: 3.6.2
    • Component/s: Networking
    • None
    • Fully Compatible
    • ALL
    • v3.6
    • Hide
      • Run MongoDB 3.6 from
      • Access localhost:27017 with a web browser or curl

      In Docker:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      # docker run --rm --name mongotest mongo:3.6
      

      Next console:

      Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      # 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: Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml # docker run --rm --name mongotest mongo:3.6 Next console: Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml # 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

      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.

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

              Created:
              Updated:
              Resolved: