3

I am trying to run a simple code, which opens a bucket on remote Couchbase 5.1 server using Java SDK 2.6.2 and inserts a document.

        Cluster cluster = CouchbaseCluster.create("192.168.111.10");

    cluster.authenticate("user", "password");

    Bucket bucket = cluster.openBucket("alex-tests");

    System.out.println("Opened bucket " + bucket);

    JsonDocument jsonDocument = JsonDocument.create("123", JsonObject.create()
            .put("id", "123")
            .put("first_name", "alex")
            .put("city", "amsterdam"));
    bucket.insert(jsonDocument);

    System.out.println("Inserted");

It looks like the bucket is opened, but then the client is printing connection errors to a localhost while it was configured to a remote machine.

The log is available here

Alex
  • 133
  • 3
  • 12
  • 2
    Seems like the Couchbase server is broadcasting its address as `0.0.0.0`. What does your server config look like in the admin console? – dnault Sep 15 '18 at 02:55
  • 1
    @dnault thanks for your reply. The servers tab contains 0.0.0.0 server name. I uploaded a screenshot here https://ibb.co/i621Ge – Alex Sep 15 '18 at 20:17
  • 1
    @dnault thanks. it was the problem – Alex Sep 16 '18 at 19:46

1 Answers1

3

As @dnault mentioned the 0.0.0.0 was configured as a server in the config of the remote cluster.

Alex
  • 133
  • 3
  • 12