Relative Content

Tag Archive for .netdockernetworkingcontainerscouchbase

How to connect multinode Couchbase docker container from external .net app?

I have a .NET API app and Couchbase Database. Couchbase Database is running as docker container and with one host multinode configuration. My dotnet app is outside the docker environment and external client of Couchbase Docker Container. Docker-compose configuration is below and I can access web consoles of Couchbase with URLs http://localhost:8091 and http://localhost:8094. I tried to connect from .net app with connection strings couchbase://localhost, couchbase://localhost:8091,localhost:8094, couchbase://172.20.0.2,172.20.0.3, couchbase://172.20.0.2:8094,172.20.0.3:8091, couchbase://192.168.65.0 (Docker Host Default IP Address) etc. but cannot connect. But when I configure Couchbase as single node on single host, I can connect from .net app. It looks like some network configuration is missing, I published ports as mentioned below but nothing changed. Anyone who helps me, I will be appreciated.