Hello,
I am currently developing a multi-node Couchbase cluster on a single host using Docker Compose. While everything works well with a single node, I’m encountering connectivity issues when I increase the number of nodes. The Python SDK can connect from both my local machine and the server, but while it can run queries without any issues from the server, it cannot run any queries from my local machine.
After some troubleshooting with Wireshark, I discovered that the Python SDK is attempting to send requests to the internal IP addresses of the Docker containers.
I also ran the sdk-doctor
tool to diagnose the issue, but the output wasn’t very helpful:
Note: Diagnostics can only provide accurate results when your cluster
is in a stable state. Active rebalancing and other cluster configuration
changes can cause the output of the doctor to be inconsistent or in the
worst cases, completely incorrect.
11:31:39.461 INFO ▶ Parsing connection string `couchbase://131.104.25.17/BCDM`
11:31:39.461 INFO ▶ Connection string identifies the following CCCP endpoints:
11:31:39.461 INFO ▶ 1. 131.104.25.17:11210
11:31:39.461 INFO ▶ Connection string identifies the following HTTP endpoints:
11:31:39.461 INFO ▶ 1. 131.104.25.17:8091
11:31:39.461 INFO ▶ Connection string specifies bucket `BCDM`
11:31:39.461 WARN ▶ Your connection string specifies only a single host. You should consider adding additional static nodes from your cluster to this list to improve your application's fault-tolerance
11:31:39.461 INFO ▶ Performing DNS lookup for host `131.104.25.17`
11:31:39.461 INFO ▶ Attempting to connect to cluster via CCCP
11:31:39.461 INFO ▶ Attempting to fetch config via cccp from `131.104.25.17:11210`
11:31:39.483 WARN ▶ Bootstrap host `131.104.25.17` is not using the canonical node hostname of `172.29.0.4`. This is not necessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
11:31:39.483 INFO ▶ Attempting to connect to cluster via HTTP (Terse)
11:31:39.483 INFO ▶ Attempting to fetch terse config via http from `131.104.25.17:8091`
11:31:39.497 WARN ▶ Bootstrap host `131.104.25.17` is not using the canonical node hostname of `172.29.0.4`. This is not necessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
11:31:39.497 INFO ▶ Attempting to connect to cluster via HTTP (Full)
11:31:39.497 INFO ▶ Failed to connect via HTTP (Full), as it is not yet supported by the doctor
11:31:39.497 INFO ▶ Selected the following network type: external
11:31:39.497 ERRO ▶ All endpoints specified by your connection string were unreachable, further cluster diagnostics are not possible
11:31:39.497 INFO ▶ Diagnostics completed
Summary:
[WARN] Your connection string specifies only a single host. You should consider adding additional static nodes from your cluster to this list to improve your application's fault-tolerance
[WARN] Bootstrap host `131.104.25.17` is not using the canonical node hostname of `172.29.0.4`. This is not necessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
[WARN] Bootstrap host `131.104.25.17` is not using the canonical node hostname of `172.29.0.4`. This is not necessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
[ERRO] All endpoints specified by your connection string were unreachable, further cluster diagnostics are not possible
Found multiple issues, see listing above.
I tried to set up alternate addresses for the containers as suggested in the documentation. However, since I only have one IP for my server, I am unsure how to configure the hostname and which value to use for it.
Any guidance on resolving this issue would be greatly appreciated. Thank you!