[SPY-111] Assertion/NPE Exception when trying to use auth and failover. Created: 28/Jan/13  Updated: 01/Feb/13  Resolved: 01/Feb/13

Status: Resolved
Project: Spymemcached Java Client
Component/s: library
Affects Version/s: None
Fix Version/s: None
Security Level: Public

Type: Bug Priority: Major
Reporter: Michael Nitschinger Assignee: Michael Nitschinger
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File readd_29_jan.txt     Text File readd_31_jan.txt    
Issue Links:
Duplicate
duplicates JCBC-70 Client fails to reconnect to server o... Resolved

 Description   
When running the failover integration tests, it is possible that a node is removed from the cluster, but operations try to go towards the node. This results either in Assertion Exceptions or NPEs down the stack when trying to authenticate (but its not anymore part of the cluster).

For example:
69.15 SDKD: Jan 25, 2013 6:40:23 AM com.couchbase.client.CouchbaseConnection reconfigure
69.15 SDKD: INFO: Scheduling Node localhost-27.local/10.3.121.207:11210for shutdown.

leads into:
75.15 SDKD: Exception in thread "Memcached IO over {MemcachedConnection to localhost-34.local/10.3.121.212:11210 localhost-30.local/10.3.121.208:11210 localhost-31.local/10.3.121.209:11210 localhost-27.local/10.3.121.207:11210}" java.lang.AssertionError: Couldn't find node connected to localhost-27.local/10.3.121.207:11210
75.15 SDKD: at net.spy.memcached.MemcachedClient.findNode(MemcachedClient.java:2117)
75.15 SDKD: at net.spy.memcached.MemcachedClient.connectionEstablished(MemcachedClient.java:2106)
75.15 SDKD: at net.spy.memcached.MemcachedConnection.connected(MemcachedConnection.java:352)
75.15 SDKD: at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:428)
75.15 SDKD: at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:247)
75.15 SDKD: at com.couchbase.client.CouchbaseConnection.run(CouchbaseConnection.java:266)

 Comments   
Comment by Michael Nitschinger [ 28/Jan/13 ]
http://review.couchbase.org/#/c/24230
Comment by Deepti Dawar [ 29/Jan/13 ]
Alright !

Thanks for letting me know about the restriction policy.

Let me explain regarding the commit. I did not update the commit from git as my public key is not added at the remote VM so it was giving error of permission denied.
Hence, I just explicitly added your change in the MemcachedClient file.
And after which only I have re-run and published the results.
Please have a look.
Comment by Deepti Dawar [ 31/Jan/13 ]
Please find the attached log with changes taken from the commit http://review.couchbase.org/#/c/24230/

Still the same errors persist.
Generated at Sat Aug 23 00:39:19 CDT 2014 using JIRA 5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9.