I followed this blog entry https://blog.couchbase.com/couchbase-using-docker-compose/ to set up my local couchbase instance, however when I run my local java service to connect to my bucket, the connection times out.
I can connect to the cluster using localhost/127.0.0.1 but when my java client connects to “/pools/nodes”, the “couchApiBase”:“http://172.18.0.2:8092/” points the client to attempt to connect to that IP address which is not accessible from outside the container. is there something I’m missing from my docker-compose file to tunnel this IP address?
Even I am having a similar kind of issue, have already dig the whole of internet but no solutions seem to work out,
Please anyone can help me out? I am really very much pissed already.
Thanks in advance Regards.
No responses from anyone unfortunately. What we had to do was create our own custom couchbase client manager so we can deal with local docker environments to override the response when bootstrapping the cluster, we ended looping through the nodes and replacing the returned node address with the cluster URL instead (we use localhost for local development). It’s a horrible hack, but there’s no help from couchbase team.
Sorry to hear you’ve had no help. Although I’m no expert on Docker the answer is to simply add a route for 17.18.0.0/16 (you’ll need to exec onto the container and find out what the actual prefix is, this is just a guess!) via your docker bridge interface. e.g.
ip route add 17.18.0.0/16 dev docker0