DNS/Hostname look up failed when I'm trying to access to Server on VM on google cloud using node.js sdk

Hi Guys!

I have an error CouchbaseError: DNS/Hostname look up failed when I’m trying to access to a server on vm on gcp from my local using nodejs sdk.

Where to check so far:

  1. I can open a console UI at :8091
  2. I can open a bucket using sdk. I 've checked that out.

Here’s a part of my code.

import couchbase from 'couchbase'

const cluster = new couchbase.Cluster(`couchbase://<server-ip>/`);
cluster.authenticate('username', 'password')
...
...
... // get bucket
bucket.get('my-document', (err, result) => {
...//blah blah
}

but it failed with dns/hostname lookup failed

I already searched for other topics but nothing works to me.

Anyone helps me out?

Any time you’re having connectivity issues, it’d be good to diagnostically check for lower level details with SDK doctor. Maybe try running it in that env? It may not find anything, but it will validate that common connectivity problems aren’t there.

You’ll find pre-built binaries on the release page.

Usually the summary at the end is pretty easy to interpret. If you need help with interpretation, please feel free to post it or a link to it here.