Impact of java.lang.IllegalStateException: Got empty SASL auth mech list

Hi,

I am finding the following error in my log file when I try to connect to couchbase server from my client code.

2015-08-13 17:52:53 NIOServerCnxn [ERROR] Thread Thread[Thread-22,5,main] died
java.lang.IllegalStateException: Got empty SASL auth mech list.
at net.spy.memcached.auth.AuthThread.run(AuthThread.java:149)
2015-08-13 17:52:53 NIOServerCnxn [ERROR] Thread Thread[Thread-24,5,main] died
java.lang.IllegalStateException: Got empty SASL auth mech list.
at net.spy.memcached.auth.AuthThread.run(AuthThread.java:149)

My environment details is as follows:
Couchbase version: Version: 2.1.1 community edition (build-764)
couchbase-client-1.4.2.jar
spymemcached-2.11.3.jar

Cluster details:
3 node couchbase cluster

I noticed that there is a ticket like this already created:
https://issues.couchbase.com/browse/SPY-136

I would like to know the impact of this exception on my application code. Should my client application do anything to handle this exception? Would error handling be automatically triggered by spymemcached code in the background?

Thanks,
Richards Peter.

hmm @simonbasle could you advise?

Hi, how similar is the issue you linked? (just the exception / exception and same restart scenario / same exception and same root cause, a null passed to a method upstack?)

Generally speaking an exception being thrown means the user code has to deal with it.

If the root cause / server side scenario is different from SPY-136, don’t hesitate to open a new ticket!

Ps: also pinging @daschl on this

Hi all,

May I first thank you all for your help.

I am not sure whether the issue is related to SPY-136.

I am trying to understand how this exception can be caught. Could you please tell me whether this exception is coming from a different thread, that is spawned by spymemcached, than the one in which my client code create connections to couchbase. Since the stack trace shows that a thread is getting killed, I am not sure whether the exception would propagate to my client class. Also the stack trace shows that the exception is getting printed in NIOServerCnxn class. May be the exception is getting suppressed.

Richards Peter.

Hi,

Would anyone like to share his/her thought about this issue? I would also like to know whether there will be any impact because of this exception. Will a reconnect be automatically triggered by the client in this case?

Looking at the logs I felt that the client will get reconnected. I would like to know whether there are any other problems that could arise due to this error.

Thanks,
Richards Peter.

Hi,

When this error happens, the thread that is killed is the one that tracks the authentication 3 steps process. The 1.4.x SDK should re-initialize an authentication dance, and it should automatically retry and connect.

The error can be triggered by high latency outliers during the authentication phase. Do you know if your network link can exhibit such high latencies?

Note that the version of the SDK you’re using (an outdated one by the way) is using the default op timeout for authentication phase, which maybe you have tuned and is now too low? I think there was a fix in 1.4.10 relating to a similar issue, so maybe you should try to upgrade to SDK 1.4.10 see if it behaves better.

Hi Simon,

Thank you for your reply.

I will confirm about the latency part in sometime. I do not expect high latency in the network where couchbase is used in our application.

With the older version of SDK, we were using a OP TIMEOUT of 100 seconds. The following values are used in our application:

OP_TIMEOUT 100
TIMEOUT_EXCEPTION_THRESHOLD 998
READ_BUF_SIZE 16384
SHOULD_OPTIMIZE false
MAX_RECONNECT_DELAY 30
OBS_POLL_INTERVAL 10
OBS_TIMEOUT 5
VIEW_WORKER_SIZE 1
VIEW_TIMEOUT 300
VIEW_CONNS_PER_NODE 100

I will try to upgrade the client jar and see how it behaves.

Thanks,
Richards Peter.

I’m facing exact same issue. Even larger timeout doesn’t help. My environment details
Couchbase version: Version: 2.2.0
couchbase-client-1.4.2
spymemcached-2.11.3
This happens randomly on few nodes.

@richards_peter
were you able to resolve this for your environment. I’m using the same environment as yours except couchbase server version which 2.2.0

Thanks,
Bharat

@thakararbharat can you please upgrade to the Java SDK 2.3.x? That should help get rid of those issues :slight_smile: