An unknown N1QL error occured. This is usually related to an out-of-memory condition. CouchbaseError: DNS/Hostname lookup failed


#1

Hi guys! I know there have been other topics on the subject. I’ve read them but none helped me.

My context:
nodejs 6.10.0 LTS running on macOS Sierra 10.12.3 connecting to a AWS hosted Couchbase CE 4.5.0-ubuntu14.04_amd64 running on a Ubuntu 14.04.5 LTS.
AWS security groups configured on “All traffic allowed from my ip”.

I’ve created the bucket (restful-sample) and an index (CREATE PRIMARY INDEX ON restful-sample USING GSI;) , but when I just start the app and the model asks for getAll I get this error:

Error: An unknown N1QL error occured. This is usually related to an out-of-memory condition.

My mac’s firewall is turned off.
My config.json looks like this:

{
“couchbase”: {
“server”:"<my_aws_hosts_public_ip_address>:8091",
“bucket”:“restful-sample”
}
}

Also, when I want to save a document, I get:
CouchbaseError: DNS/Hostname lookup failed

Any help greatly appreciated!

Update: after creating a VM running on my MacOS using VirtualBox (same versions as those on AWS Couchbase CE 4.5.0-ubuntu14.04_amd64 running on a Ubuntu 14.04.5 LTS.) and connecting from my Nodejs using my VM ip, so 192.168.100.8:8091, it all worked. So it has something to do with the AWS…just don’t know what yet…


#2

Copying @prasad and @anil.


#3

This error keeps coming back and there is no solution for it. Unable to resolve it. Feels like i need to switch from Couchbase to Mongo.


#4

@raja.himanath,

can you share your environment, version you’re using, your stack and exact error?

/cc @anil, @prasad


#5

I already uploaded the logs twice from the log section. using couchbase 4.6.2 version. We are evaluating the enterprise edition and we could not get evaluate as this error keeps coming. Todd Greenstein has looked at the error logs.


#6

Hi Raja,
the error is coming from the Node.js SDK, not N1QL itself, although the SDK should have received some sort of error from N1QL.
There should be the original N1QL response body attached to the error, could you attach it?
It will give us a clue.

@brett19 is this anything you can help with?


#7

Note by setting the envvar LCB_LOGLEVEL=5, as indicated in the docs, you’ll get debug level log information and can see the request/response on behalf of your node.js app.

One quick question, @raja.himanath: does it match the message in this topic exactly -> “An unknown N1QL error occurred. This is usually related to an out-of-memory condition. CouchbaseError: DNS/Hostname lookup failed” ?


#8

Error: An unknown N1QL error occured. This is usually related to an out-of-memory condition.
at /Users/ngata/Github/primetract-server/node_modules/couchbase/lib/bucket.js:693:15 responseBody: ‘’ }


#9

The response document from the N1QL server has been truncated - most of it is missing, the only thing that is there is the closing brace.
Is there anything in between your node.js application and the N1QL service that might be corrupting the response?