Failed to initialize pool.

Hi, I'm trying out Couchbase for our company, and I'm not having much luck connecting using the .net SDK.

Connecting to http.//<server ip>:8091/pools/<bucket name> via a browser works fine, so the server is available, but when trying from our asp service I get "unable to locate node" as the response message when doing an ExecuteStore.

The trimmed code looks like this:

var config = new CouchbaseClientConfiguration ();
config.Bucket = "bucket_name";
config.BucketPassword = "bucket_password";
config.Urls.Add (new Uri ("http://<server ip>:8091/pools"));
cbc = new CouchbaseClient (config);
 
var result = _cbc.ExecuteStore (StoreMode.Set, "object_key", object);

Pretty standard stuff. I've also tried running the asp.net app on the Couchbase machine using 127.0.0.1 and localhost in the uri with the same results. I'm using the newest stable version of everything on MS Server 2012.

Log shows this:

2014-05-26 13:22:02.7238|WARN|Enyim.Caching.MemcachedClient|Creating new client. CID: c7c59dc7-0f52-46bd-a2c4-8ed889926cf6 CouchbaseClient
2014-05-26 13:22:02.7497|WARN|Couchbase.CouchbasePool|Starting Couchbase.CouchbasePool
2014-05-26 13:22:02.7674|WARN|Couchbase.MessageStreamListener|Started working.
2014-05-26 13:22:02.7674|WARN|Couchbase.MessageStreamListener|Starting the listener. Queue=True
2014-05-26 13:22:02.7770|WARN|Couchbase.MessageStreamListener|Looking for the first working node.
2014-05-26 13:22:03.2293|WARN|Couchbase.MessageStreamListener|Resolved pool url http://130.226.142.100:8091/pools/ to http://130.226.142.100:8091/pools/default/bucketsStreaming/our_bucket_name?bucket_uuid=88ecde59b0e41d255e7a845583d3c2c8
2014-05-26 13:22:03.2293|WARN|Couchbase.MessageStreamListener|Start receiving messages.
2014-05-26 13:22:03.2706|ERROR|Couchbase.CouchbasePool|Failed to initialize the pool.
2014-05-26 13:22:03.2763|WARN|Couchbase.MessageStreamListener|Processing message: {"name":"our_bucket_name","bucketType":"membase","authType":"sasl","saslPassword":"password","proxyPort":0,"replicaIndex":false,"uri":"/pools/default/buckets/our_bucket_name?bucket_uuid=88ecde59b0e41d255e7a845583d3c2c8","streamingUri":"/pools/default/bucketsStreaming/our_bucket_name?bucket_uuid=88ecde59b0e41d255e7a845583d3c2c8","localRandomKeyUri":"/pools/default/buckets/our_bucket_name/localRandomKey","controllers":{"compactAll":"/pools/default/buckets/our_bucket_name/controller/compactBucket","compactDB":"/pools/default/buckets/default/controller/compactDatabases","purgeDeletes":"/pools/default/buckets/our_bucket_name/controller/unsafePurgeBucket","startRecovery":"/pools/default/buckets/our_bucket_name/controller/startRecovery"},"nodes":[{"couchApiBase":"http://0.0.0.0:8092/our_bucket_name","replication":0.0,"clusterMembership":"active","status":"healthy","otpNode":"ns_1@0.0.0.0","thisNode":true,"hostname":"0.0.0.0:8091","clusterCompatibility":131072,"version":"2.2.0-837-rel-community","os":"windows","ports":{"proxy":11211,"direct":11210}}],"stats":{"uri":"/pools/default/buckets/our_bucket_name/stats","directoryURI":"/pools/default/buckets/our_bucket_name/statsDirectory","nodeStatsListURI":"/pools/default/buckets/our_bucket_name/nodes"},"ddocs":{"uri":"/pools/default/buckets/our_bucket_name/ddocs"},"nodeLocator":"vbucket","fastWarmupSettings":false,"autoCompactionSettings":false,"uuid":"88ecde59b0e41d255e7a845583d3c2c8","vBucketServerMap":{"hashAlgorithm":"CRC","numReplicas":1,"serverList":["0.0.0.0:11210"],"vBucketMap":[[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],[0,-1],
<snip>
2014-05-26 13:22:13.2385|WARN|Couchbase.MessageStreamListener|HB: Pinging current node 'http://130.226.142.100:8091/pools/' to check if it's still alive.
2014-05-26 13:22:13.2390|WARN|Couchbase.MessageStreamListener|HB: Trying 'http://130.226.142.100:8091/pools/'
2014-05-26 13:22:13.2811|WARN|Couchbase.MessageStreamListener|HB: Node 'http://130.226.142.100:8091/pools/' is OK

This output is confusing. It seems to find the Couchbase server but not the bucket, yet it's referring to the bucket with the right UUID...

Samal -

What's happening is that the client is bootstrapping, but cannot establish the final streaming connection to the Couchbase server. Usually this happens when you are running an HTTP debugger like fiddler or a firewall is blocking the connection.

Here is a similar issue:
-http://www.couchbase.com/communities/q-and-a/windows-81-machine-will-not...

Check to see if that is what's causing the issue and let me know how it goes!

-Jeff

Hi Jeff, thanks for the answer.

I changed the IP in the code to 127.0.0.1, published my Nancy/Asp.net service and run it on IIS on the same machine as the Couchbase server, and turned off the firewall. There was no anti virus/malware software or debugger like Fiddler to disable. So this should cover about everything I've found in that thread to linked to. Still the same results unfortunately.

I've also tried building/launching from both VS 2012 and 2013 on Win 7, and even Xamarin Studio on Mac OS. No difference.

Then I installed Couchbase on my development machine, and that worked right out of the box. So the issue is on the server machine not the development machine.

So one thing I'm wondering is if it is ok, that the Server Node Name on the server is 0.0.0.0, as I'm seeing this exception in the intelliTrace panel when breaking right after running ExecuteStore():
"IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.""

samal -

This looks suspiciously like a bug; can you create a bug ticket in jira so that we can "officially" track this?

http://www.couchbase.com/issues/browse/NCBC

If you create the ticket, you'll get update emails, so probably the best way to go if you want to know the progress. Feel free to add as much information as possible and keep updating the ticket as needed.

-Jeff

0 Answers

No answers yet