question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: No such host is known

See original GitHub issue

When I run this code:

import { MongoClient } from "https://deno.land/x/mongo@v0.21.0/mod.ts";

const client = new MongoClient();
await client.connect("mongodb+srv://admin:ReelmKTm3pr9f9MG@cluster0.vsk29.mongodb.net/test?retryWrites=true&w=majority");

I get the following error:

error: Uncaught (in promise) Error: No such host is known. (os error 11001)
    at processResponse (deno:core/core.js:223:11)
    at Object.jsonOpAsync (deno:core/core.js:240:12)
    at async Object.connect (deno:runtime/rt/30_net.js:224:13)
    at async MongoClient.connect (client.ts:41:14)
    at async mod.ts:4:1

The same host is normally connected with Node.js and the mongodb npm package.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
manyuanrongcommented, Jan 15, 2021

Change mongodb+srv:// to mongodb://

1reaction
manyuanrongcommented, May 19, 2021

closed by #198

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] No Such Host Is Known Error Problem ... - TechinPost
Talking of the causes behind No such host is known error we came across some very common causes of this issue. The first...
Read more >
No such host is known socket connection - Stack Overflow
If you're trying to grab a client hostname from the DNS server within your company's network using: Dns.GetHostEntry(ClientIP) and each time you keep...
Read more >
"No such host is known" error message when you run a load ...
File name File version File size Date Time Plat... Leviewer.exe 10.0.40219.385 118,544 8‑Mar‑12 9:39 x86 Microsoft.teamfoundation.build.client.dll 10.0.40219.385 436,552 6‑Mar‑12 8:03 x86 Microsoft.teamfoundation.build.conTrols.dll 10.0.40219.385 1,365,328 8‑Mar‑12 9:39...
Read more >
Help please {No Such host is known} error - C# Corner
Help please {No Such host is known} error ... Goal to obtain the remote client computer name. ... Server Error in '/' Application....
Read more >
No such host is known Issue - Studio - UiPath Community Forum
... studio with Orchestrator using machine key but this message showns “No such host is known.” and i try login as well but...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found