Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't connect to Couchbase instance running in Docker on Mac OS #91

Open
sadolit opened this issue Nov 2, 2020 · 6 comments
Open

Can't connect to Couchbase instance running in Docker on Mac OS #91

sadolit opened this issue Nov 2, 2020 · 6 comments

Comments

@sadolit
Copy link

sadolit commented Nov 2, 2020

Hi, I've setup a single-node Couchbase 5.0.1 cluster in Docker on Mac OS X. Cluster is setup in Docker so http://127.0.0.1:8091/pools/default gives me the following hostname 172.25.0.2:8091. This hostname is not accessible from Mac OS, which is why as I suspect couchbase-rs can't connect to it.

Here is a sample program:

use couchbase::*;
use futures::executor::block_on;

pub fn main() {
    env_logger::init();
    let cluster = Cluster::connect("http://localhost:8091", "Administrator", "password");
    let bucket = cluster.bucket("test");
    let collection = bucket.default_collection();
    match block_on(collection.get("airline_10123", GetOptions::default())) {
        Ok(r) => println!("get result: {:?}", r),
        Err(e) => println!("get failed! {}", e),
    };
}

Here is the log:

[2020-11-02T08:18:41Z ERROR couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,) Could not get configuration: LCB_ERR_TIMEOUT (201)
[2020-11-02T08:18:41Z ERROR couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,) Could not get configuration: LCB_ERR_TIMEOUT (201)
[2020-11-02T08:18:42Z ERROR couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fab6d504c40,IX=0) Connection attempt failed. Received LCB_ERR_TIMEOUT (201) from libcouchbase, received 0 from operating system
[2020-11-02T08:18:42Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:11210> (SOCK=dafe81bddf0f90f0) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-02T08:18:44Z ERROR couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fab6d704600,bc_http) HTTP Provider timed out waiting for I/O
[2020-11-02T08:18:44Z ERROR couchbase::io::lcb::callbacks] Failed to bootstrap client=0x7fab6d604120. Error=LCB_ERR_TIMEOUT (201) (Last=LCB_ERR_TIMEOUT (201)), Message=Failed to bootstrap in time
[2020-11-02T08:18:46Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=b9d34d3f4605b9b7) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-02T08:18:46Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)
[2020-11-02T08:18:49Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=73c25fffb3feb6e2) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-02T08:18:49Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)
[2020-11-02T08:18:52Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=a3026ab9c9c24947) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-02T08:18:52Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)

At the same time, both Java and Python clients can connect to the cluster without any troubles.

@daschl
Copy link
Contributor

daschl commented Nov 3, 2020

@sadolit did you do it as described here? https://docs.couchbase.com/server/current/install/getting-started-docker.html#section_jvt_zvj_42b It is important that the ports are correctly exposed. Also your connection string is likely wrong, it should be couchbase://localhost, or for simplicity just localhost.

@sadolit
Copy link
Author

sadolit commented Nov 4, 2020

@daschl Yes, all ports are open and I can access this cluster from the web UI, Java, and Python clients.
Regarding connections strings: I tried couchbase://localhost, http://localhost:8091, and couchbase://127.0.0.1, confirming each time that it works in Python, but not in Rust.

@daschl
Copy link
Contributor

daschl commented Nov 4, 2020

@sadolit can you please enable more logging so we can debug? Something like RUST_LOG=couchbase=trace cargo run should do.

@sadolit
Copy link
Author

sadolit commented Nov 4, 2020

@daschl Sure! I changed the connection string to localhost just to make sure. I've let it run for some time as it gets into infinite loop.

[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb] Using libcouchbase IO transport
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] Version=3.0.3, Changeset=0xdeadbeef
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] Effective connection string: localhost. Bucket=(null)
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] DNS SRV lookup failed: LCB_ERR_UNKNOWN_HOST (1049). Ignore this if not relying on DNS SRV records
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] Adding host localhost:8091 to initial HTTP bootstrap list
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] Adding host localhost:11210 to initial CCCP bootstrap list
[2020-11-04T05:24:27Z TRACE couchbase::io::lcb::callbacks] Bootstrap hosts loaded (cccp:1, http:1)
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] Requested network configuration: heuristic
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] Preparing providers (this may be called multiple times)
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] Provider CCCP is ENABLED
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] Provider HTTP is ENABLED
[2020-11-04T05:24:27Z TRACE couchbase::io::lcb::callbacks] Refreshing current cluster map (bucket: (null))
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] Requesting connection to node localhost:11210 for CCCP configuration
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (HE=0x7fd8e6d086c0) Creating new connection because none are available in the pool
[2020-11-04T05:24:27Z TRACE couchbase::io::lcb::callbacks] <localhost:11210> (HE=0x7fd8e6d086c0) New pool entry: I=0x7fd8e6d08930
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] <localhost:11210> (SOCK=d3ee7787990dd591) Starting. Timeout=2000000us
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (SOCK=d3ee7787990dd591) Created new socket with FD=4
[2020-11-04T05:24:27Z TRACE couchbase::io::lcb::callbacks] <localhost:11210> (SOCK=d3ee7787990dd591) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:27Z TRACE couchbase::io::lcb::callbacks] Attempting to retrieve cluster map via CCCP
[2020-11-04T05:24:27Z INFO  couchbase::io::lcb::callbacks] <localhost:11210> (SOCK=d3ee7787990dd591) Connected established
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (SOCK=d3ee7787990dd591) Successfully set TCP_NODELAY
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (SOCK=d3ee7787990dd591) Successfully set TCP_KEEPALIVE
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (HE=0x7fd8e6d086c0) Received result for I=0x7fd8e6d08930,C=0x0; E=0x0
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (HE=0x7fd8e6d086c0) Assigning R=0x7fd8e6d08830 SOCKET=0x7fd8e6c04270
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6c048c0,unknown) Pairing with SOCK=d3ee7787990dd591
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6c048c0,sasl,SASLREQ=0x7fd8e6c04760) HELO identificator: {"a":"libcouchbase/3.0.3 (Darwin-19.6.0; x86_64; Clang 12.0.0.12000032)","i":"e1af0b4e71ab234e/d3ee7787990dd591"}, features: 0x02 (TLS), 0x06 (XATTR), 0x0b (JSON), 0x08 (Select bucket), 0x07 (XERROR), 0x03 (TCP nodelay), 0x0a (Snappy), 0x04 (Mutation seqno), 0x0f (Tracing), 0x12 (Collections), 0x0e (Unordered execution)
[2020-11-04T05:24:27Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6c048c0,sasl,SASLREQ=0x7fd8e6c04760) Server supports features: 0x06 (XATTR), 0x08 (Select bucket), 0x07 (XERROR), 0x03 (TCP nodelay), 0x04 (Mutation seqno)
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6c048c0,sasl) Destroying context. Pending Writes=0, Entered=true, Socket Refcount=1
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6d06070,unknown) Pairing with SOCK=d3ee7787990dd591
[2020-11-04T05:24:28Z WARN  couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6d06070,bc_cccp) CCCP Packet responded with 0x8; nkey=0, nbytes=0, cmd=0xb5, seq=0xf00d
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (CTX=0x7fd8e6d06070,bc_cccp) Destroying context. Pending Writes=0, Entered=true, Socket Refcount=1
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (HE=0x7fd8e6d086c0) Placing socket back into the pool. I=0x7fd8e6d08930,C=0x7fd8e6c04270
[2020-11-04T05:24:28Z INFO  couchbase::io::lcb::callbacks] Provider 'CCCP' failed: LCB_ERR_UNSUPPORTED_OPERATION (214)
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] Will try next provider in 0us
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] Attempting to retrieve cluster map via HTTP
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] Starting HTTP Configuration Provider 0x7fd8e6d06ca0
[2020-11-04T05:24:28Z INFO  couchbase::io::lcb::callbacks] <localhost:8091> (SOCK=9e25fcec8c46dc5b) Starting. Timeout=2000000us
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:8091> (SOCK=9e25fcec8c46dc5b) Created new socket with FD=6
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] <localhost:8091> (SOCK=9e25fcec8c46dc5b) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:28Z INFO  couchbase::io::lcb::callbacks] <localhost:8091> (SOCK=9e25fcec8c46dc5b) Connected established
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:8091> (SOCK=9e25fcec8c46dc5b) Successfully set TCP_NODELAY
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:8091> (SOCK=9e25fcec8c46dc5b) Successfully set TCP_KEEPALIVE
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] Successfuly connected to REST API localhost:8091
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fd8e6d08f10,unknown) Pairing with SOCK=9e25fcec8c46dc5b
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fd8e6d08f10,bc_http) Received 395 bytes on HTTP stream
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fd8e6d08f10,bc_http) Received 4096 bytes on HTTP stream
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fd8e6d08f10,bc_http) Generation 0 -> 1
[2020-11-04T05:24:28Z INFO  couchbase::io::lcb::callbacks] Setting new configuration. Received via HTTP
[2020-11-04T05:24:28Z INFO  couchbase::io::lcb::callbacks] Selected network configuration: "default"
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::instance] Starting bucket bind for test
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] Preparing providers (this may be called multiple times)
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] Provider CCCP is ENABLED
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] Provider HTTP is ENABLED
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] Refreshing current cluster map (bucket: test)
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] Re-Issuing CCCP Command on server struct 0x7fd8e6d09780 (172.25.0.2:11210)
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:11210> (HE=0x7fd8e6d0a140) Creating new connection because none are available in the pool
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:11210> (HE=0x7fd8e6d0a140) New pool entry: I=0x7fd8e6d0a3b0
[2020-11-04T05:24:28Z INFO  couchbase::io::lcb::callbacks] <172.25.0.2:11210> (SOCK=5baf8370359ed175) Starting. Timeout=2500000us
[2020-11-04T05:24:28Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:11210> (SOCK=5baf8370359ed175) Created new socket with FD=7
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:11210> (SOCK=5baf8370359ed175) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:28Z TRACE couchbase::io::lcb::callbacks] Attempting to retrieve cluster map via CCCP
[2020-11-04T05:24:30Z ERROR couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,) Could not get configuration: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:30Z INFO  couchbase::io::lcb::callbacks] Provider 'CCCP' failed: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:30Z DEBUG couchbase::io::lcb::callbacks] Will try next provider in 100000us
[2020-11-04T05:24:30Z WARN  couchbase::io::lcb::callbacks] Failing command with error LCB_ERR_TIMEOUT (201): {"b":"test","r":"172.25.0.2:11210","s":"kv:select_bucket","t":2000000}
[2020-11-04T05:24:30Z WARN  couchbase::io::lcb::callbacks] Failing command with error LCB_ERR_TIMEOUT (201): {"b":"test","r":"172.25.0.2:11210","s":"kv:get_cluster_config","t":2000000}
[2020-11-04T05:24:30Z ERROR couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,) Could not get configuration: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:30Z INFO  couchbase::io::lcb::callbacks] Provider 'CCCP' failed: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:30Z TRACE couchbase::io::lcb::callbacks] Ignoring failure. Current=0x7fd8e6d06ca0 (HTTP)
[2020-11-04T05:24:30Z DEBUG couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Server timed out. Some commands have failed
[2020-11-04T05:24:30Z TRACE couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Scheduling next timeout for 2500 ms. This is not an error
[2020-11-04T05:24:30Z TRACE couchbase::io::lcb::callbacks] Attempting to retrieve cluster map via HTTP
[2020-11-04T05:24:30Z ERROR couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Connection attempt failed. Received LCB_ERR_TIMEOUT (201) from libcouchbase, received 0 from operating system
[2020-11-04T05:24:30Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:11210> (SOCK=5baf8370359ed175) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-04T05:24:30Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:11210> (HE=0x7fd8e6d0a140) Received result for I=0x7fd8e6d0a3b0,C=0x0; E=0xc9
[2020-11-04T05:24:32Z ERROR couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fd8e6d08f10,bc_http) HTTP Provider timed out waiting for I/O
[2020-11-04T05:24:32Z DEBUG couchbase::io::lcb::callbacks] <localhost:8091> (CTX=0x7fd8e6d08f10,bc_http) Destroying context. Pending Writes=0, Entered=false, Socket Refcount=1
[2020-11-04T05:24:32Z INFO  couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ac06110d8bd675c0) Starting. Timeout=2000000us
[2020-11-04T05:24:32Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ac06110d8bd675c0) Created new socket with FD=6
[2020-11-04T05:24:32Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ac06110d8bd675c0) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:32Z TRACE couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Scheduling next timeout for 2500 ms. This is not an error
[2020-11-04T05:24:33Z ERROR couchbase::io::lcb::callbacks] Failed to bootstrap client=0x7fd8e6e04910. Error=LCB_ERR_TIMEOUT (201) (Last=LCB_ERR_TIMEOUT (201)), Message=Failed to bootstrap in time
[2020-11-04T05:24:33Z DEBUG couchbase::io::lcb::callbacks] Libcouchbase notified of completed bucket open attempt for bucket Some("test") (status: 0xc9)
[2020-11-04T05:24:33Z DEBUG couchbase::io::lcb::instance] Finished bucket bind for test
[2020-11-04T05:24:33Z WARN  couchbase::io::lcb::encode] Sending now
[2020-11-04T05:24:34Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ac06110d8bd675c0) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-04T05:24:34Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)
[2020-11-04T05:24:34Z INFO  couchbase::io::lcb::callbacks] Provider 'HTTP' failed: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:34Z TRACE couchbase::io::lcb::callbacks] Maximum provider reached. Resetting index
[2020-11-04T05:24:34Z INFO  couchbase::io::lcb::callbacks] HTTP node list finished. Trying to obtain connection from first node in list
[2020-11-04T05:24:35Z TRACE couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Scheduling next timeout for 2500 ms. This is not an error
[2020-11-04T05:24:35Z TRACE couchbase::io::lcb::callbacks] Starting HTTP Configuration Provider 0x7fd8e6d06ca0
[2020-11-04T05:24:35Z INFO  couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ccdc8d38ffaacea2) Starting. Timeout=2000000us
[2020-11-04T05:24:35Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ccdc8d38ffaacea2) Created new socket with FD=6
[2020-11-04T05:24:35Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ccdc8d38ffaacea2) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:37Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=ccdc8d38ffaacea2) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-04T05:24:37Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)
[2020-11-04T05:24:37Z INFO  couchbase::io::lcb::callbacks] Provider 'HTTP' failed: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:37Z TRACE couchbase::io::lcb::callbacks] Ignoring failure. Current=0x7fd8e6d06b60 (CCCP)
[2020-11-04T05:24:37Z INFO  couchbase::io::lcb::callbacks] HTTP node list finished. Trying to obtain connection from first node in list
[2020-11-04T05:24:37Z TRACE couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Scheduling next timeout for 2500 ms. This is not an error
[2020-11-04T05:24:38Z DEBUG couchbase::io::lcb::callbacks] <localhost:11210> (HE=0x7fd8e6d086c0) Idle connection expired
[2020-11-04T05:24:38Z TRACE couchbase::io::lcb::callbacks] Starting HTTP Configuration Provider 0x7fd8e6d06ca0
[2020-11-04T05:24:38Z INFO  couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=b60d7ae225a96336) Starting. Timeout=2000000us
[2020-11-04T05:24:38Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=b60d7ae225a96336) Created new socket with FD=4
[2020-11-04T05:24:38Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=b60d7ae225a96336) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:40Z TRACE couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Scheduling next timeout for 2500 ms. This is not an error
[2020-11-04T05:24:40Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=b60d7ae225a96336) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-04T05:24:40Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)
[2020-11-04T05:24:40Z INFO  couchbase::io::lcb::callbacks] Provider 'HTTP' failed: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:40Z TRACE couchbase::io::lcb::callbacks] Ignoring failure. Current=0x7fd8e6d06b60 (CCCP)
[2020-11-04T05:24:40Z INFO  couchbase::io::lcb::callbacks] HTTP node list finished. Trying to obtain connection from first node in list
[2020-11-04T05:24:41Z TRACE couchbase::io::lcb::callbacks] Starting HTTP Configuration Provider 0x7fd8e6d06ca0
[2020-11-04T05:24:41Z INFO  couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=395713a5d1134d80) Starting. Timeout=2000000us
[2020-11-04T05:24:41Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=395713a5d1134d80) Created new socket with FD=4
[2020-11-04T05:24:41Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=395713a5d1134d80) Scheduling I/O watcher for asynchronous connection completion.
[2020-11-04T05:24:42Z TRACE couchbase::io::lcb::callbacks] <NOHOST:NOPORT> (CTX=0x0,,SRV=0x7fd8e6d09780,IX=0) Scheduling next timeout for 2500 ms. This is not an error
[2020-11-04T05:24:43Z ERROR couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=395713a5d1134d80) Failed to establish connection: LCB_ERR_TIMEOUT (201), os errno=0
[2020-11-04T05:24:43Z ERROR couchbase::io::lcb::callbacks] Connection to REST API failed with LCB_ERR_TIMEOUT (201) (os errno = 0)
[2020-11-04T05:24:43Z INFO  couchbase::io::lcb::callbacks] Provider 'HTTP' failed: LCB_ERR_TIMEOUT (201)
[2020-11-04T05:24:43Z TRACE couchbase::io::lcb::callbacks] Ignoring failure. Current=0x7fd8e6d06b60 (CCCP)
[2020-11-04T05:24:43Z INFO  couchbase::io::lcb::callbacks] HTTP node list finished. Trying to obtain connection from first node in list
[2020-11-04T05:24:44Z TRACE couchbase::io::lcb::callbacks] Starting HTTP Configuration Provider 0x7fd8e6d06ca0
[2020-11-04T05:24:44Z INFO  couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=50ca24338e1f38ed) Starting. Timeout=2000000us
[2020-11-04T05:24:44Z DEBUG couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=50ca24338e1f38ed) Created new socket with FD=4
[2020-11-04T05:24:44Z TRACE couchbase::io::lcb::callbacks] <172.25.0.2:8091> (SOCK=50ca24338e1f38ed) Scheduling I/O watcher for asynchronous connection completion.

Here is a sample Python script that runs fine:

from couchbase.cluster import Cluster, ClusterOptions
from couchbase_core.cluster import PasswordAuthenticator
cluster = Cluster("couchbase://localhost", ClusterOptions( PasswordAuthenticator("Administrator", "password")))
g = cluster.bucket("test").get("test", quiet=True)
print(g)'

Output:

ValueResult<rc=0x12D[LCB_ERR_DOCUMENT_NOT_FOUND (301)], key='test', value=None, cas=0x0, flags=0x0, tracing_context=0, tracing_output={'s': 'kv:Unknown', 'c': 'a52c1bb6b0f46723/52b017f7be00fdbc', 'i': 2322031628865647233, 'b': 'test', 'l': '127.0.0.1:62521', 'r': 'localhost:11210', 't': 2500000}>

Here is also docker port output:

$ docker port couchbase
11210/tcp -> 0.0.0.0:11210
11211/tcp -> 0.0.0.0:11211
8091/tcp -> 0.0.0.0:8091

@daschl
Copy link
Contributor

daschl commented Nov 4, 2020

@sadolit which python SDK version are you using? this looks like an "sdk 2" api and potentially a very different libcouchbase version

@sadolit
Copy link
Author

sadolit commented Nov 4, 2020

@daschl
Here is both python SDK version and libcouchbase version:

$ pip3 show couchbase
Name: couchbase
Version: 3.0.6
Summary: Python Client for Couchbase
Home-page: https://github.com/couchbase/couchbase-python-client
Author: Couchbase, Inc.
Author-email: [email protected]
License: Apache License 2.0
Location: /usr/local/lib/python3.9/site-packages
Requires: attrs, six, mypy-extensions, wrapt, pyrsistent
Required-by:

$ brew info libcouchbase
libcouchbase: stable 3.0.6 (bottled), HEAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants