Details
-
Improvement
-
Resolution: Incomplete
-
Minor
-
None
-
None
-
None
-
Security Level: Public
-
None
Description
If I connect to couchbase using public IP, but couchbase configured with some internal name I got error like this:
uncaughtException happen Error: CouchbaseError: DNS/Hostname lookup failed
In my case couchbase configured with internal hostnames like couch1.local, couch2.local etc.
But when I connect from my mac to couch, I use a public hostname, and no error given...
Example:
var couchbase = require('couchbase');
var cluster = new couchbase.Cluster('couchbase://somepublichostname.com');
var bucket = cluster.openBucket('my-bucket', 'my password', function(e){
//there is no errors because I can connect using public host name
if(e) throw new Error(e);
//but this will throw error, because it tries to connect over internal ip like couch1.local
//even if this block in try catch I can`t catch it.
bucket.insert('foo',
, function(e, d)
{ if(e) throw new Error(e); console.log(d); });
});