Problem in Connecting to Couchbase server using Couchbase Client

Hello,

I am trying to connect to Couchbase server which is running in AWS. While doing this, connection effort is resulting into error in Couchbase client-

Could somebody please help me identify the root cause and resolve issue? Here is a stacktrace-

========================
2016-02-10 07:59:31.709 WARN net.spy.memcached.auth.AuthThread: SASL List Mecha
nisms took 415ms on {QA sa=/:11210, #Rops=0, #Wops=0, #iq=0, topRop=
null, topWop=null, toWrite=0, interested=0}
2016-02-10 07:59:32.242 WARN net.spy.memcached.auth.AuthThread: SASL Step took
530ms on {QA sa=/:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWo
p=null, toWrite=0, interested=0}
2016-02-10 07:59:32.643 INFO net.spy.memcached.auth.AuthThread: Authenticated t
o /:11210
2016-02-10 07:59:32.746 WARN net.spy.memcached.auth.AuthThread: SASL Step took
501ms on {QA sa=/:11210, #Rops=1, #Wops=0, #iq=0, topRop=Cmd: -75 Op
aque: 0, topWop=null, toWrite=0, interested=1}
2016-02-10 07:59:33.557 INFO com.couchbase.client.vbucket.provider.BucketConfigu
rationProvider: Could bootstrap through carrier publication.
2016-02-10 07:59:33.558 INFO com.couchbase.client.CouchbaseConnection: Added {Q
A sa=ec2-.us-west-2.compute.amazonaws.com/:11210, #Rops=
0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connect
queue
2016-02-10 07:59:33.559 INFO com.couchbase.client.CouchbaseClient: CouchbaseCon
nectionFactory{bucket=‘omnibazaar’, nodes=[http://:8091/pools], orde
r=RANDOM, opTimeout=2500, opQueue=16384, opQueueBlockTime=10000, obsPollInt=10,
obsPollMax=500, obsTimeout=5000, viewConns=10, viewTimeout=75000, viewWorkers=1,
configCheck=10, reconnectInt=1100, failureMode=Redistribute, hashAlgo=NATIVE_HA
SH, authWaitTime=2500}
Exception in thread “AWT-EventQueue-0” java.lang.NoSuchMethodError: org/apache/h
ttp/protocol/RequestUserAgent.(Ljava/lang/String;)V
at com.couchbase.client.ViewConnection.(Unknown Source)
at com.couchbase.client.CouchbaseConnectionFactory.createViewConnection(
Unknown Source)
at com.couchbase.client.CouchbaseClient.(Unknown Source)
at com.couchbase.client.CouchbaseClient.(Unknown Source)
at com.omnibazaar.ds.CouchbaseNode.search(Unknown Source)
at com.omnibazaar.ds.SearchEngine.search(Unknown Source)
at omnibazaar.OmniBazaar$77.actionPerformed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at omnibazaar.OmniBazaar$36$3.actionPerformed(Unknown Source)
at javax.swing.JTextField.fireActionPerformed(Unknown Source)
at javax.swing.JTextField.postActionEvent(Unknown Source)
at javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.(Unknown Source)
at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)

    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Sour

ce)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Sour
ce)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$500(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
2016-02-10 07:59:34.347 WARN net.spy.memcached.auth.AuthThread: SASL List Mecha
nisms took 396ms on {QA sa=ec2-54-68-20-231.us-west-2.compute.amazonaws.com/54.6
8.20.231:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, in
terested=0}
2016-02-10 07:59:34.856 WARN net.spy.memcached.auth.AuthThread: SASL Step took
505ms on {QA sa=ec2-54-68-20-231.us-west-2.compute.amazonaws.com/54.68.20.231:11
210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}

2016-02-10 07:59:35.247 INFO net.spy.memcached.auth.AuthThread: Authenticated t
o ec2-54-68-20-231.us-west-2.compute.amazonaws.com/54.68.20.231:11210
2016-02-10 07:59:35.348 WARN net.spy.memcached.auth.AuthThread: SASL Step took
491ms on {QA sa=ec2-54-68-20-231.us-west-2.compute.amazonaws.com/54.68.20.231:11
210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}

========================

Thanks and Regards,
Prafulla

Those appear to be WARNING and INFO level logs, not errors. The warnings are indicating high latency. Are you using AWS micro instances or the like? That could cause higher latencies. Is your app server and your DB cluster in the same region/zone? Typically they should be in the same region, so that could cause high latencies too.