Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15259

camel-couchbase seems outdated or broken

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.5.0
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The couchbase component seem outdated or broken

      So far we used docker image couchbase:community-3.1.3 which is quite outdated and does not run on Docker Desktop for MacOS. A recent version of the community server (e.g. couchbase:community-6.5.1) runs fine and I can do a setup like this ...

      Run the community couchbase server image

      docker run --detach \
      	--name couchbase \
      	-p 8091:8091 \
      	-p 8092:8092 \
      	-p 8093:8093 \
      	-p 8094:8094 \
      	-p 11210:11210 \
      	couchbase:community-6.5.1
      

      Setup a new cluster
      https://docs.couchbase.com/server/current/cli/cbcli/couchbase-cli-cluster-init.html

      docker exec couchbase \
      	couchbase-cli cluster-init -c 127.0.0.1 --cluster-username Administrator --cluster-password password \
      	--cluster-name default --cluster-ramsize 1024 \
      	--services data,index,query
      

      Load the beer sample data
      https://docs.couchbase.com/server/current/cli/cbdocloader-tool.html

      docker exec couchbase \
      	cbdocloader -c couchbase://127.0.0.1 -u Administrator -p password \
      	-v -m 1024 -b beer-sample -d /opt/couchbase/samples/beer-sample.zip
      

      The camel component also uses an outdated client (1.4.13), which I cannot get to work with any of the later community servers that I tried. Simple code like this (which is used by the couchbase endpoint) fails with 401

      List<URI> hosts = Arrays.asList(new URI("http://127.0.0.1:8091/pools"));
      String username = "Administrator";
      String password = "password";
      String bucket = "beer-sample";
      
      CouchbaseConnectionFactoryBuilder cfb = new CouchbaseConnectionFactoryBuilder();
      CouchbaseClient client = new CouchbaseClient(cfb.buildCouchbaseConnection(hosts, bucket, username, password));
      

      There seems to be a change of how username is handled by recent couchbase server versions. I didn't try a more recent java client because this would likely imply changes to the couchbase component.

        Attachments

          Activity

            People

            • Assignee:
              tdiesler Thomas Diesler
              Reporter:
              tdiesler Thomas Diesler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: