Connecting to Couchbase 2.0 cluster via libcouchbase fails, when a single node is down -


i experiencing weird behavior when connection couchbase cluster consisting of several nodes. due redundancy set connection multiple ips described in documentation. track down problem tried connect single node this:

$cb = new couchbase("<valid ip>", "<username>", "<password>", "<bucket>"); 

this works entirely fine. when replacing single ip array of ip - in order achieve redundancy. following output in error log:

php warning: failed establish libcouchbase connection server: connection failure in ... php warning: there no active connection couchbase in ...

the code connecting follows:

$hosts = array(<invalid ip>, <valid ip>); $cb = new couchbase($hosts, "<username>", "<password>", "<bucket>"); 

in case above warning , libcouchbase not connect @ all. according documentation couchbase should try provided nodes , should not die on first "dead node".

did wrong? have ideas work-around?

thanks bunch! chris

perhaps version specific, when connect, don't use array of ips. use semi-colon delimited list. e.g.

$cb = new couchbase("192.168.2.1;192.168.2.2", $user, $password, $bucket); 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -