Skip to content

Connecting to External URI #28

@Trajanson

Description

@Trajanson
mongoURI = "127.0.0.1"
pipe <- connect (host mongoURI)

works fine, but if I replace mongoURI with a URI provided by mongoDBAtlas, then I receive an error

the URIs suggested by MongoDBAtlas are: "mongodb+srv://" ++ mongoUsername ++ ":" ++ mongoPassword ++ "@databaseName.azure.mongodb.net/test"

or "mongodb://" ++ mongoUsername ++ ":" ++ mongoPassword ++ "@databaseName-shard-00-00-qxoqe.azure.mongodb.net:27017,databaseName-shard-00-01-qxoqe.azure.mongodb.net:27017,databaseName-shard-00-02-qxoqe.azure.mongodb.net:27017/test?ssl=true&replicaSet=databaseName-shard-0&authSource=admin"

this results in the following error:

*** Exception: Network.Socket.getAddrInfo (called with preferred socket type/protocol: AddrInfo {addrFlags = [AI_ADDRCONFIG], addrFamily = AF_UNSPEC, addrSocketType = Stream, addrProtocol = 6, addrAddress = <assumed tobe undefined>, addrCanonName = <assumed to be undefined>}, host name: Just "mongodb+srv://mongoUsernameIsHere:[email protected]/test", service name: Just "27017"): does not exist (nodename nor servname provided, or not known)

port is 27017 in line with default

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions