Cannot pull documents using couchbase lite in a docker image

Hi, I have a dotnet app built using .net 4.5 and mono, the app just pulls documents to read some data and updates another document with a push. when I run it in my dev machine it works fine.
Once I place the app in a docker image and run it the app starts the pull, its status is active, but the Changed pull callback never gets called.
I tried to curl the host uri from the running docker image and I get a couchbase welcome response so it seems that I can connect out of the docker image and receive
I am new to couchbase lite so I am having problems finding out what can I do to get more information on what is going on, some error message or warning, I check LastError but seems to be null.
Thank you.

I’m not familiar with running .NET apps in a docker container. Can you explain what you wish to do? Also, it would help if you could share the docker image itself, maybe through docker hub.


Hi James,

Thank you for answering, let me explain what we are trying to do.
The team I am working for has a mobile game that uses couchbase lite that connects to a couchbase server, we also use sync gateway, this is all running in kubernetes using docker containers.
We are adding events for the players to participate by joining a team, if the team wins the player in the team will get rewards, each time a player plays a round (we call them “runs”) of the game their results are saved in the couchbase DB.
During the event (which can be a weekend to a month) we need to calculate the progress of each team, to do that I created a dotnet app (using mono) that uses couchbase lite to pull players documents that contain the “runs” data which I use to update an “event totals” doc that is pushed to the couchbase DB, this “event totals” doc is pulled by users and the current event results are displayed.
The app works fine when run directly from my computers in both xos and ubuntu, but when I create a docker image ( using ubuntu ) the app runs, I start the replications but they never call the Changed callback or the DB callback when a document changes. there are no errors, the pull replication stays in active status. Basically the app runs but nothing is getting pulled.

Now I am trying to understand what is blocking couchbase lite from replicating? can it be some configuration issue?, I dont get errors or exceptions from the replication, or anything. Where can I find more detailed information on how replication works and how it connects?. Unfortunately I cannot share the image since it connects to our testing servers and the authentication information is in the image files.

Thank you for your time


A good start would be to look in the log files. All log output is written to Trace (which would usually output to the console), so if you redirect trace to a file (example -> then you will have the log output to a file. Or perhaps you already see the log output along with your app’s log output?

Hi I got the Traces into a file and the log end with this where the app gets stuck waiting:

ERROR) SYNC (Replication): [Threadpool worker] 2016-12-13 11:29:47.357+07:00 State machine error:
System.NotImplementedException: The requested feature is not implemented.
at System.Net.WebRequest.CreateHttp (System.String requestUriString) [0x00000] in :0
at Couchbase.Lite.NetworkReachabilityManager.CanReach (System.String remoteUri, TimeSpan timeout) [0x00000] in :0
at Couchbase.Lite.Replication.StartInternal () [0x00000] in :0
at Couchbase.Lite.Replication.m__6 (Stateless.Transition transition) [0x00000] in :0
at Stateless.StateMachine2+StateConfiguration+<>c__DisplayClass11_0[Couchbase.Lite.Replicator.ReplicationState,Couchbase.Lite.Replicator.ReplicationTrigger].<OnEntry>b__0 (Stateless.Transition t, System.Object[] args) [0x00000] in <filename unknown>:0 at Stateless.StateMachine2+StateRepresentation[Couchbase.Lite.Replicator.ReplicationState,Couchbase.Lite.Replicator.ReplicationTrigger].ExecuteEntryActions (Stateless.Transition transition, System.Object[] entryArgs) [0x00000] in :0
at Stateless.StateMachine2+StateRepresentation[Couchbase.Lite.Replicator.ReplicationState,Couchbase.Lite.Replicator.ReplicationTrigger].Enter (Stateless.Transition transition, System.Object[] entryArgs) [0x00000] in <filename unknown>:0 at Stateless.StateMachine2[Couchbase.Lite.Replicator.ReplicationState,Couchbase.Lite.Replicator.ReplicationTrigger].InternalFire (ReplicationTrigger trigger, System.Object[] args) [0x00000] in :0
at Stateless.StateMachine`2[Couchbase.Lite.Replicator.ReplicationState,Couchbase.Lite.Replicator.ReplicationTrigger].Fire (ReplicationTrigger trigger) [0x00000] in :0
at Couchbase.Lite.Replication+c__AnonStorey0.<>m__0 () [0x00000] in :0
INFO) DATABASE (Database): [Threadpool worker] 2016-12-13 11:29:50.113+07:00 No pending doc expirations

I was looking at older posts that had issues with mono net https and replication, So to let you know I am trying to connect to a https uri using mono net45 in ubuntu, I said it worked fine in ubuntu before (at least I though It did create a ubuntu instance in gcloud where I ran the app) but in my local computer using ubuntu I have the same issue as the docker image, so I don’t think its related to docker.

Thank you

Do both of the machines have the same version of mono installed? That error indicates something off in the runtime itself.

Thats it I got the incorrect mono setup in one machine, some versions don’t work with https unless you install some extra package. Got is all working.

Thank you for your answers.


@lars.ricaldi this is a really interesting use case. Would someone on your team be interested in writing a blog post about it? Connect with me at hod at couchbase and we can go over what could be involved. Thanks!