SDK Doctor

      +
      SDK doctor helps diagnose application-server-side connectivity issues with your Couchbase Cluster (among other things).

      SDK doctor is a tool to diagnose application-server-side connectivity issues with your Couchbase Cluster. It makes the same connections to the Couchbase Server cluster that Couchbase SDKs make during bootstrapping, and then reports on the state of the connections made — giving diagnostic information that can help to solve puzzling network issues.

      Couchbase SDKs work best when on the same local area network as your Couchbase Server cluster. Developing locally, against a remote cluster — particularly a Cloud-hosted one — can lead to timeout problems. SDK doctor is particularly useful for diagnosing such network problems.

      Installation

      Binaries can be found on the Releases page. The latest release is 1.0.8.

      Whether you use the binary from a local directory, or place somewhere in your $PATH, do not forget to adjust permissions to make it runnable:

      $ chmod u+x sdk-doctor-linux

      Use

      Run SDK doctor with your credentials, and the cluster and bucket:

      $ ./sdk-doctor-macos diagnose couchbases://e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com/travel-sample -u username -p password

      You should see results like there (truncated here):

      $ ./sdk-doctor-macos diagnose couchbases://e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com/travel-sample -u username -p 2KZZb3pap89£$$%\*
      |====================================================================|
      |          ___ ___  _  __   ___   ___   ___ _____ ___  ___           |
      |         / __|   \| |/ /__|   \ / _ \ / __|_   _/ _ \| _ \          |
      |         \__ \ |) | ' <___| |) | (_) | (__  | || (_) |   /          |
      |         |___/___/|_|\_\  |___/ \___/ \___| |_| \___/|_|_\          |
      |                                                                    |
      |====================================================================|
      
      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.
      
      10:45:51.828 INFO ▶ Parsing connection string `couchbases://e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com/travel-sample`
      10:45:51.829 INFO ▶ Connection string was parsed as a potential DNS SRV record
      10:45:51.857 INFO ▶ Connection string specifies to use secured connections
      10:45:51.857 INFO ▶ Connection string identifies the following CCCP endpoints:
      10:45:51.858 INFO ▶   1. cb-0000.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com:11207
      10:45:51.858 INFO ▶   2. cb-0002.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com:11207
      10:45:51.858 INFO ▶   3. cb-0001.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com:11207
      10:45:51.858 INFO ▶ Connection string identifies the following HTTP endpoints:
      10:45:51.858 INFO ▶ Connection string specifies bucket `travel-sample`
      10:45:51.858 WARN ▶ No certificate authority file specified (--tls-ca), skipping server certificate verification for this run.
      10:45:51.867 INFO ▶ Performing DNS lookup for host `cb-0002.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com`
      10:45:51.875 INFO ▶ Bootstrap host `cb-0002.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` refers to a server with the address `34.248.242.207`
      10:45:51.877 INFO ▶ Performing DNS lookup for host `cb-0001.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com`
      10:45:51.885 INFO ▶ Bootstrap host `cb-0001.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` refers to a server with the address `52.211.9.199`
      10:45:51.888 INFO ▶ Performing DNS lookup for host `cb-0000.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com`
      10:45:51.899 INFO ▶ Bootstrap host `cb-0000.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` refers to a server with the address `52.208.188.68`
      10:45:51.901 INFO ▶ Attempting to connect to cluster via CCCP
      
      …
      
      [WARN] No certificate authority file specified (--tls-ca), skipping server certificate verification for this run.
      [WARN] Bootstrap host `cb-0000.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` is not using the canonical node hostname of `cb-0000.cb.e9718149-af24-4bc4-b496-53149cdb7966.svc`.  This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
      [WARN] Bootstrap host `cb-0002.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` is not using the canonical node hostname of `cb-0002.cb.e9718149-af24-4bc4-b496-53149cdb7966.svc`.  This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
      [WARN] Bootstrap host `cb-0001.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` is not using the canonical node hostname of `cb-0001.cb.e9718149-af24-4bc4-b496-53149cdb7966.svc`.  This is not neccessarily an error, but has been known to result in strange and challenging to diagnose errors when DNS entries are reconfigured.
      [WARN] Could not test Search service on `cb-0000.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` as it was not in the config
      [WARN] Could not test Analytics service on `cb-0000.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` as it was not in the config
      [WARN] Could not test Search service on `cb-0001.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` as it was not in the config
      [WARN] Could not test Analytics service on `cb-0001.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` as it was not in the config
      [WARN] Could not test Search service on `cb-0002.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` as it was not in the config
      [WARN] Could not test Analytics service on `cb-0002.e9718149-af24-4bc4-b496-53149cdb7966.dp.cloud.couchbase.com` as it was not in the config
      
      …
      
      Found multiple issues, see listing above.

      A full example can be found on our Troubleshooting Cloud Connections page.

      Limitations

      Warnings about canonical node hostnames may appear if the system under test is using Alternate Addresses (as Couchbase Capella does), and are safe to ignore.