Hi,
I’m currently setting up an application that needs to send to an old couchbase server that I do not manage. I am running libcouchbase 2.8.4 and I need to connect to a 2.5.1 couchbase server. After much searching and googling I found that the newer libraries send the HELLO before doing auth and that it can cause older servers to disconnect. So after reading documentation, I saw that it was possible to set LCB_CNTL_SEND_HELLO to false so that it wouldn’t pass the HELLO statement but it does not seem to work at all.
Can someone point me into the right direction?
I set my environmental settings as follows:
set|grep LCB
LCB_CNTL_DETAILED_ERRCODES=1
LCB_CNTL_SEND_HELLO=false
LCB_LOGLEVEL=5
LCB_OPTIONS=detailed_errcodes=1,send_hello=false
I also tried passing it via the connection string:
server = "couchbase://192.168.146.244:8091/pools?send_hello=false"
Here is the detailed output of the connection attempt:
1840ms [I4] {10064} [INFO] (instance - L:144) DNS SRV lookup failed: DNS/Hostname lookup failed. Ignore this if not relying on DNS SRV records
1840ms [I4] {10064} [DEBUG] (instance - L:83) Adding host 192.168.146.244:8091 to initial HTTP bootstrap list
1840ms [I4] {10064} [DEBUG] (instance - L:83) Adding host 192.168.146.244:11210 to initial CCCP bootstrap list
1840ms [I4] {10064} [TRACE] (instance - L:124) Bootstrap hosts loaded (cccp:1, http:1)
1840ms [I4] {10064} [DEBUG] (confmon - L:85) Preparing providers (this may be called multiple times)
1840ms [I4] {10064} [DEBUG] (confmon - L:92) Provider CCCP is ENABLED
1840ms [I4] {10064} [DEBUG] (confmon - L:92) Provider HTTP is ENABLED
1840ms [I4] {10064} [TRACE] (confmon - L:272) Refreshing current cluster map
1840ms [I4] {10064} [TRACE] (confmon - L:259) Attempting to retrieve cluster map via CCCP
1840ms [I4] {10064} [INFO] (cccp - L:151) Requesting connection to node 192.168.146.244:11210 for CCCP configuration
1840ms [I4] {10064} [DEBUG] (lcbio_mgr - L:443) <192.168.146.244:11210> (HE=0x55aec6f7cd70) Creating new connection because none are available in the pool
1840ms [I4] {10064} [TRACE] (lcbio_mgr - L:354) <192.168.146.244:11210> (HE=0x55aec6f7cd70) New pool entry: I=0x55aec6f7dff0
1840ms [I4] {10064} [INFO] (connection - L:467) <192.168.146.244:11210> (SOCK=0x55aec6f7e1b0) Starting. Timeout=2000000us
1840ms [I4] {10064} [DEBUG] (connection - L:232) <192.168.146.244:11210> (SOCK=0x55aec6f7e1b0) Created new socket with FD=7
1840ms [I4] {10064} [TRACE] (connection - L:333) <192.168.146.244:11210> (SOCK=0x55aec6f7e1b0) Scheduling I/O watcher for asynchronous connection completion.
1908ms [I4] {10064} [INFO] (connection - L:141) <192.168.146.244:11210> (SOCK=0x55aec6f7e1b0) Connected established
1908ms [I4] {10064} [DEBUG] (connection - L:100) <192.168.146.244:11210> (SOCK=0x55aec6f7e1b0) Successfully set TCP_NODELAY
1908ms [I4] {10064} [DEBUG] (connection - L:100) <192.168.146.244:11210> (SOCK=0x55aec6f7e1b0) Successfully set TCP_KEEPALIVE
1908ms [I4] {10064} [DEBUG] (lcbio_mgr - L:313) <192.168.146.244:11210> (HE=0x55aec6f7cd70) Received result for I=0x55aec6f7dff0,C=(nil); E=0x0
1908ms [I4] {10064} [DEBUG] (lcbio_mgr - L:273) <192.168.146.244:11210> (HE=0x55aec6f7cd70) Assigning R=0x55aec6f7df50 SOCKET=0x55aec6f7e1b0
1908ms [I4] {10064} [DEBUG] (ioctx - L:101) <192.168.146.244:11210> (CTX=0x55aec6f7e980,unknown) Pairing with SOCK=0x55aec6f7e1b0
1908ms [I4] {10064} [DEBUG] (negotiation - L:393) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) HELLO identificator: "libcouchbase/2.8.4 (Linux-4.14.5-300.fc27.x86_64; x86_64; GNU 4.8.5)"
1908ms [I4] {10064} [DEBUG] (negotiation - L:397) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) Request feature: 0x2 (TLS)
1908ms [I4] {10064} [DEBUG] (negotiation - L:397) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) Request feature: 0x6 (XATTR)
1908ms [I4] {10064} [DEBUG] (negotiation - L:397) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) Request feature: 0x8 (Select bucket)
1908ms [I4] {10064} [DEBUG] (negotiation - L:397) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) Request feature: 0x7 (XERROR)
1908ms [I4] {10064} [DEBUG] (negotiation - L:397) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) Request feature: 0x3 (TCP nodelay)
1976ms [I4] {10064} [ERROR] (negotiation - L:152) <192.168.146.244:11210> (CTX=0x55aec6f7e980,sasl,SASLREQ=0x55aec6f7e7a0) Error: 0x2d, IO Error
1976ms [I4] {10064} [ERROR] (cccp - L:165) <NOHOST:NOPORT> (CTX=(nil),) Could not get configuration: LCB_ESOCKSHUTDOWN (0x2D)
1976ms [I4] {10064} [INFO] (confmon - L:182) Provider 'CCCP' failed
Any help would be greatly appreciated.
-Mike