Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-3092

Cannot connect to Mongo on UNIX socket

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.13.2
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Detailed steps to reproduce the problem?

      Previous go driver versions were able to connect via UNIX sockets formatted like this:
      mongodb://%2Ftmp%2Fmongodb-27017.sock/database?connectTimeoutMS=1000&directConnection=true&serverSelectionTimeoutMS=1000

      Recently, this seems to be broken and now gives this error:
      parse "mongodb://%2Ftmp%2Fmongodb-27017.sock/database?connectTimeoutMS=1000&directConnection=true&serverSelectionTimeoutMS=1000": invalid URL escape "%2F"

      I think it could be related to the URL parsing that was added in this commit https://github.com/mongodb/mongo-go-driver/pull/1373/files#diff-f8f709cd4fe1c51ef99b7a9731b69373e4e4119ebfdeca319763200b30e8dec4

      Definition of done: what must be done to consider the task complete?

      Clients can be connected successfully via UNIX sockets

      The exact Go version used, with patch level:

      $ go version

      The exact version of the Go driver used:

      $ go list -m go.mongodb.org/mongo-driver

      Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.

      The operating system and version (e.g. Windows 7, OSX 10.8, ...)

      Security Vulnerabilities

      If you’ve identified a security vulnerability in a driver or any other MongoDB project, please report it according to the instructions here

            Assignee:
            qingyang.hu@mongodb.com Qingyang Hu
            Reporter:
            michaelsokoko@gmail.com Michael Okoko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: