auto-failover can't work
Mon, 10/31/2011 - 22:17
I have 2 node cluster on membase-server-community_x86_64_1.7.1.1, client use spymemcached-2.7.3,membase enable auto-failover (config through the web console),timeout 30s.
on one node,I stop membase server,the client throw exception,But another node didn't auto failover, instant I restart the client also eror, unless in the webconsole failover manual.
Exception in thread "main" net.spy.memcached.OperationTimeoutException: Timeout waiting for value
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1185)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1200)
at com.jd.memcached.test.MembaseClusterTest.main(MembaseClusterTest.java:25)
Caused by: net.spy.memcached.internal.CheckedOperationTimeoutException: Timed out waiting for operation - failing node: 10.10.224.193/10.10.224.193:11210
at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:73)
at net.spy.memcached.internal.GetFuture.get(GetFuture.java:38)
at net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1178)
... 2 more
2011-11-01 13:07:22.368 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@a4e743
2011-11-01 13:07:22.369 INFO net.spy.memcached.MemcachedConnection: Reconnecting due to failure to connect to {QA sa=10.10.224.193/10.10.224.193:11210, #Rops=0, #Wops=1, #iq=0, topRop=null, topWop=Cmd: 0 Opaque: 1 Key: key2, toWrite=0, interested=0}
java.net.ConnectException: Connection timed out: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:407)
at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:275)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:2030)
2011-11-01 13:07:22.370 WARN net.spy.memcached.MemcachedConnection: Closing, and reopening {QA sa=10.10.224.193/10.10.224.193:11210, #Rops=0, #Wops=1, #iq=0, topRop=null, topWop=Cmd: 0 Opaque: 1 Key: key2, toWrite=0, interested=0}, attempt 1.Any advice?
Wed, 11/16/2011 - 04:22
As far as I understand, Membase doesn't support failover for cluster of less than 3 nodes. In logs you'll see such a message:
'Could not auto-failover node ('ns_1@10.50.3.156'). Cluster was too small, you need at least 2 other nodes'.
You can check Failover Best Practices for more information.
no advice?