denodrivers / denodrivers/mongo
Connection error
- Dominant language
- TypeScript
- Stars
- 511
- Forks
- 89
- PR merge metrics
- No merged PRs in 30d
Description
I am getting this error when I try to connect:
error: Uncaught (in promise) Error: MongoError: "Connection failed: Invalid hostname: 'cluster0.gpkxo.mongodb.net?retryWrites=true&w=majority'"
throw new MongoError(`Connection failed: ${e.message || e}`);
^
at MongoClient.connect (https://deno.land/x/mongo@v0.22.0/src/client.ts:93:15)
at async MongoDBConnector._makeConnection (https://deno.land/x/denodb@v1.0.38/lib/connectors/mongodb-connector.ts:44:7)
at async MongoDBConnector.query (https://deno.land/x/denodb@v1.0.38/lib/connectors/mongodb-connector.ts:65:5)
at async Database.query (https://deno.land/x/denodb@v1.0.38/lib/database.ts:240:21)
at async Function.createTable (https://deno.land/x/denodb@v1.0.38/lib/model.ts:172:5)
at async Database.sync (https://deno.land/x/denodb@v1.0.38/lib/database.ts:210:7)
I used the code example from the home page:
db: 'todo-app',
tls: true,
servers: [
{
host: 'cluster0.gpkxo.mongodb.net?retryWrites=true&w=majority',
port: 27017,
},
],
credential: {
username: '',
password: '',
db: 'todo-app',
mechanism: 'SCRAM-SHA-1',
},
I also verified that the password was available by resetting and I made sure I had whitelisted my IP address.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.