Node.js SDK 'Operation timed out' error

Hello,

I get ‘Operation timed out’ error when running the following function:

db.get(key, value, function (err, result) {
console.log(err);
});
db.set(key, value, function (err, result) {
console.log(err);
});

I can save and read documents from the buckets in the ‘locahost:8091’, but I get the ‘operation timed out’ error from the aws-ec2 server. There is no error from the couchbase.Connection() function.

Any suggestions? Thanks!

Hello,

Probably a network issue between your application and Couchbase cluster. Have you checked that all necessary ports are opened between these 2 components, see:

Check your firewall and EC2 Security constraints.

Regards
Tug
@tgrall

Hello Tug,

Thank you very much for your help. I checked my firewall and EC2 Security constrains, but I still get the same ‘Operation timed out’ error.

I added the following rules to the EC2 Security Group:
8091 127.0.0.1/32 Delete
8092 127.0.0.1/32 Delete
11209 127.0.0.1/32 Delete
11210 127.0.0.1/32 Delete
11211 127.0.0.1/32 Delete
4369 127.0.0.1/32 Delete

I also added following rules to the iptables (both Chain OUTPUT and Chain INPUT):
ACCEPT tcp – anywhere anywhere tcp dpt:8091 flags: FIN,SYN,RST,ACK/SYN
ACCEPT tcp – anywhere anywhere tcp dpt:8092 flags: FIN,SYN,RST,ACK/SYN
ACCEPT tcp – anywhere anywhere tcp dpt:11209 flags: FIN,SYN,RST,ACK/SYN
ACCEPT tcp – anywhere anywhere tcp dpt:11210 flags: FIN,SYN,RST,ACK/SYN
ACCEPT tcp – anywhere anywhere tcp dpt:11211 flags: FIN,SYN,RST,ACK/SYN

Any suggestions? Thanks!

Hello Tug,

I am trying to follow the following method to change the host name from 127.0.0.1 to the IP of EC2 instance.
http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-bestpractice-cloud-ip.html

However, I can’t restart my server.
Error: Failed to restart the server.

So I try the following method, and I still can’t restart my server.
http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-troubleshooting-common-errors.html

Any new suggestions for the ‘Operation timed out’ error? My test app run successfully talking to the local couchbase server and talking to the remote (ec2) couchbase server from OpsWorks. It is just failed talking to the remote (ec2) couchbase server on my local machine.

PS: I use couchbase v2.2.0 and Linux v12.04 on a virtual machine.

Thanks!