Cannot connect to docker-hosted couchbase locally

I was getting authentication errors when trying to connect to my couchbase server thats running via docker so created a smaller test case where i was just trying to use cbstats from the cli but I just cannot seem to get it working…

Running couchbase via

docker run -d --name db -p 8091-8096:8091-8096 -p 11210-11211:11210-11211 couchbase/server:6.6.0

Then setting up a new cluster when it loads using username/password admin/password and then loading in one of the sample buckets…

cbstats localhost -u admin -p password -a timings

gives Authentication error for user:admin bucket:default

I know its valid because I can log in via web which shows that the port mapping for 8091 is working and also using the same command via docker exec -t <container> cbstats... also returns the timings as you’d expect

I presume its an issue with using the 11210 port but I’m running out of ideas on how to fix…

(Using Docker for Windows)

Managed to have some success by running and mapping the 11210 port to something else locally since it appeared that the 11210 port was already in use on windows by memached.exe

docker run -d --name db -p 8091-8096:8091-8096 -p 8101-8102:11210-11211 couchbase/server:6.6.0

Not really ideal but it’ll do i guess…