roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

Client never connects with small timeout (auth problem) #321

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We're using Couchbase client 1.4.9 with Spymemcached 2.11.7 to connect to 
Couchbase 2.5.1 production cluster. We specify quite a small operations timeout 
(10 ms) overriding net.spy.memcached.ConnectionFactory.getOperationTimeout() to 
comply with production requirements.

The problem is that initial auth operation issued in 
AuthThread.listSupportedSASLMechanisms() fails with timeout in 
net.spy.memcached.protocol.BaseOperationImpl.isTimedOut() and 
listSupportedSASLMechanisms() returns null, making AuthThread.run() to throw 
throw new IllegalStateException("Got empty SASL auth mech list."). As the 
result, the thread exits and the node will forever stay unauthenticated so no 
single request will ever be processed.

Log output:
2015.07.14 23:56:32.564 [Memcached IO over Couchbase connection to bucket XXX] 
WARNING n.s.m.a.AuthThread.receivedStatus - Received non-success response for 
SASL mechs: {OperationStatus success=false:  timed out} 

Stdout:
Exception in thread "Thread-108" java.lang.IllegalStateException: Got empty 
SASL auth mech list.
    at net.spy.memcached.auth.AuthThread.run(AuthThread.java:149)

Original issue reported on code.google.com by ksafo...@rutarget.ru on 15 Jul 2015 at 6:11