Uploaded image for project: 'Spymemcached Java Client'
  1. Spymemcached Java Client
  2. SPY-136

Exception in net.spy.memcached.auth.AuthThread - java.lang.IllegalStateException: Got empty SASL auth mech list.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.10.1
    • Fix Version/s: 2.10.3
    • Component/s: library
    • Security Level: Public
    • Environment:
      Red Hat Enterprise Linux Server release 6.3 (Santiago).
      Java 7

      Description

      I'm studying the following scenario: while get/set operations to Couchbase I shutting down node(power off on virtual machine). After that, I power on the machine and waiting for Couchbase node recovery. When node's status changing to "healthy" I expect that client reconnect and get/set operations continues. But sometimes reconnection of client occurs immediately, sometime doesn't occur within a few minutes.

      I found that client stops trying to establish connection after this exception:

      Exception in thread "Thread-122" java.lang.IllegalStateException: Got empty SASL auth mech list. 11:59:25,731 ERROR [stderr] (Thread-122) at net.spy.memcached.auth.AuthThread.listSupportedSASLMechanisms(AuthThread.java:99) 11:59:25,731 ERROR [stderr] (Thread-122) at net.spy.memcached.auth.AuthThread.run(AuthThread.java:112).

      I went even deeper and found, that cause of exception is NULL, that return after supportedMechs.get() at AuthThread.listSupportedSASLMechanisms method on string №97 "String supported = supportedMechs.get();"

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          daschl Michael Nitschinger added a comment -

          Hi, that's an interesting observation.

          Which server version are you running?

          Show
          daschl Michael Nitschinger added a comment - Hi, that's an interesting observation. Which server version are you running?
          Hide
          vakoroteev Vladislav Koroteev added a comment - - edited

          Couchbase Server 2.2

          Addition:
          When I hardcoded value of "supported" variable to "CRAM-MD5 PLAIN" all works fine.Can it change in sources leads to something bad?

          Show
          vakoroteev Vladislav Koroteev added a comment - - edited Couchbase Server 2.2 Addition: When I hardcoded value of "supported" variable to "CRAM-MD5 PLAIN" all works fine.Can it change in sources leads to something bad?
          Hide
          daschl Michael Nitschinger added a comment -

          No that's good. In 1.2 client we changed the code to pick it up on the fly, so it looks like the server at some point just doesnt respond with the right values (or an empty list).

          Thanks for tracking this down, I'll work with the server folks to figure out where the issue is. Thanks!

          Show
          daschl Michael Nitschinger added a comment - No that's good. In 1.2 client we changed the code to pick it up on the fly, so it looks like the server at some point just doesnt respond with the right values (or an empty list). Thanks for tracking this down, I'll work with the server folks to figure out where the issue is. Thanks!
          Hide
          daschl Michael Nitschinger added a comment -

          oh I can see what happens, maybe.. the code just waits 10 secs for a mech list and in your case a restart takes much longer.. then we throw an exception.

          I'll see how we deal with that case (and if you pass in a fixed mech list this code part will basically be skipped)

          Show
          daschl Michael Nitschinger added a comment - oh I can see what happens, maybe.. the code just waits 10 secs for a mech list and in your case a restart takes much longer.. then we throw an exception. I'll see how we deal with that case (and if you pass in a fixed mech list this code part will basically be skipped)
          Hide
          vakoroteev Vladislav Koroteev added a comment -

          Thanks for the fast response. I would like to be notified about fix of this problem. I want to test it in my environment.

          Show
          vakoroteev Vladislav Koroteev added a comment - Thanks for the fast response. I would like to be notified about fix of this problem. I want to test it in my environment.
          Show
          daschl Michael Nitschinger added a comment - http://review.couchbase.com/#/c/29657/

            People

            Assignee:
            daschl Michael Nitschinger
            Reporter:
            vakoroteev Vladislav Koroteev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes

                  PagerDuty