I’m working on a Xamaring CrossPlateform App. We are working on a team enviornment using GIT ( MS Team Services ). When Setup on App everything works with couchbase Lite. But Sync Gateway Push and Pull Relication isn’t working.
I’m using Sync Gateway v1.4 and Coucbase 4.6 . Below are the Logs from Visual Studio:
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:35.461+05:30 Attempting to start pusher (18b2f301-6a32-46ab-ad14-f934bfdb8712)
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:35.466+05:30 Attempting to start puller (f23d9f40-5adc-4e81-af82-19d3358ffdfd)
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:36.152+05:30 Beginning replication process…
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:36.237+05:30 Pusher 18b2f301-6a32-46ab-ad14-f934bfdb8712 successfully logged in!
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:36.404+05:30 Pusher 18b2f301-6a32-46ab-ad14-f934bfdb8712 no local checkpoint, not getting remote one
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:36.448+05:30 Beginning replication process…
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:36.465+05:30 Puller f23d9f40-5adc-4e81-af82-19d3358ffdfd successfully logged in!
[0:] INFO) SYNC (Replication): [7] 2017-7-28 01:33:36.469+05:30 Puller f23d9f40-5adc-4e81-af82-19d3358ffdfd no local checkpoint, not getting remote one
[0:] INFO) SYNC (Puller): [7] 2017-7-28 01:33:36.479+05:30 Puller f23d9f40-5adc-4e81-af82-19d3358ffdfd will use MaxOpenHttpConnections(8), MaxRevsToGetInBulk(50)
[0:] WARN) SYNC (RemoteSession): [5] 2017-7-28 01:33:37.998+05:30 Http Message failed to send, or got error response, passing to callback… http://{HOSTNAME REPLACE FOR SECURITY REASONS}/_revs_diff, :
System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> Couchbase.Lite.HttpResponseException: Exception of type ‘Couchbase.Lite.HttpResponseException’ was thrown.
at Couchbase.Lite.Util.TransientErrorRetryHandler.HandleTransientErrors (System.Threading.Tasks.Task1[TResult] request, System.Object state) [0x0017d] in <bb3bb8c4fbb54f939fa09402030f6081>:0 at Couchbase.Lite.Util.TransientErrorRetryHandler+<ResendHandler>c__AnonStorey0.<>m__0 (System.Threading.Tasks.Task
1[TResult] t) <0x98fb6a80 + 0x0003b> in :0
at System.Threading.Tasks.ContinuationResultTaskFromResultTask2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Net.Http.HttpClient+d__49.MoveNext () [0x000ca] in :0
— End of inner exception stack trace —
at Couchbase.Lite.CouchbaseLiteHttpClient+c__AnonStorey2.<>m__1 (System.Threading.Tasks.Task1[TResult] t) [0x00000] in /Volumes/Data/jenkins/workspace/couchbase-lite-net-build@2/1.4/Android/couchbase-lite-net/src/Couchbase.Lite.Shared/Replication/ChangeTracker.cs:70 at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0
— End of inner exception stack trace —
—> (Inner Exception #0) System.AggregateException: One or more errors occurred. —> Couchbase.Lite.HttpResponseException: Exception of type ‘Couchbase.Lite.HttpResponseException’ was thrown.
at Couchbase.Lite.Util.TransientErrorRetryHandler.HandleTransientErrors (System.Threading.Tasks.Task1[TResult] request, System.Object state) [0x0017d] in <bb3bb8c4fbb54f939fa09402030f6081>:0 at Couchbase.Lite.Util.TransientErrorRetryHandler+<ResendHandler>c__AnonStorey0.<>m__0 (System.Threading.Tasks.Task
1[TResult] t) <0x98fb6a80 + 0x0003b> in :0
at System.Threading.Tasks.ContinuationResultTaskFromResultTask2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Net.Http.HttpClient+d__49.MoveNext () [0x000ca] in :0
— End of inner exception stack trace —
at Couchbase.Lite.CouchbaseLiteHttpClient+c__AnonStorey2.<>m__1 (System.Threading.Tasks.Task1[TResult] t) [0x00000] in /Volumes/Data/jenkins/workspace/couchbase-lite-net-build@2/1.4/Android/couchbase-lite-net/src/Couchbase.Lite.Shared/Replication/ChangeTracker.cs:70 at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0
—> (Inner Exception #0) [HttpResponseException: StatusCode = NotFound]<—
<—
[0:] WARN) SYNC (RemoteSession): [5] 2017-7-28 01:33:38.018+05:30 Failed content:
[0:] INFO) CHANGE TRACKER (SocketChangeTracker): [5] 2017-7-28 01:33:38.025+05:30 SocketChangeTracker[/] cannot recover, stopping…
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:33:38.030+05:30 Error set during replication (application may continue):
[HttpResponseException: StatusCode = NotFound]
Thread finished: #8
[0:] INFO) CHANGE TRACKER (SocketChangeTracker): [5] 2017-7-28 01:33:38.039+05:30 Stopping SocketChangeTracker[/]…
[0:] INFO) SYNC (Puller): [5] 2017-7-28 01:33:38.049+05:30 Change tracker for f23d9f40-5adc-4e81-af82-19d3358ffdfd stopped; error=[HttpResponseException: StatusCode = NotFound]
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:33:38.053+05:30 Error set during replication (application may continue):
[HttpResponseException: StatusCode = NotFound]
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:33:38.086+05:30 f23d9f40-5adc-4e81-af82-19d3358ffdfd: Stop Graceful…
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:33:38.130+05:30 Puller f23d9f40-5adc-4e81-af82-19d3358ffdfd Stopping
The thread ‘Unknown’ (0x8) has exited with code 0 (0x0).
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:33:38.160+05:30 Puller f23d9f40-5adc-4e81-af82-19d3358ffdfd checkpointing sequence=0
[0:] WARN) SYNC (RemoteSession): [5] 2017-7-28 01:33:38.676+05:30 Http Message failed to send, or got error response, passing to callback… http://{HOSTNAME REPLACE FOR SECURITY REASONS}/_local/9a50d2a79d6ceab29e693b77cfd7f45a73c5a5b4, :
System.AggregateException: One or more errors occurred. —> System.AggregateException: One or more errors occurred. —> Couchbase.Lite.HttpResponseException: Exception of type ‘Couchbase.Lite.HttpResponseException’ was thrown.
at Couchbase.Lite.Util.TransientErrorRetryHandler.HandleTransientErrors (System.Threading.Tasks.Task1[TResult] request, System.Object state) [0x0017d] in <bb3bb8c4fbb54f939fa09402030f6081>:0 at Couchbase.Lite.Util.TransientErrorRetryHandler+<ResendHandler>c__AnonStorey0.<>m__0 (System.Threading.Tasks.Task
1[TResult] t) <0x98fb6a80 + 0x0003b> in :0
at System.Threading.Tasks.ContinuationResultTaskFromResultTask2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Net.Http.HttpClient+d__49.MoveNext () [0x000ca] in :0
— End of inner exception stack trace —
at Couchbase.Lite.CouchbaseLiteHttpClient+c__AnonStorey2.<>m__1 (System.Threading.Tasks.Task1[TResult] t) [0x00000] in /Volumes/Data/jenkins/workspace/couchbase-lite-net-build@2/1.4/Android/couchbase-lite-net/src/Couchbase.Lite.Shared/Replication/ChangeTracker.cs:70 at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0
— End of inner exception stack trace —
—> (Inner Exception #0) System.AggregateException: One or more errors occurred. —> Couchbase.Lite.HttpResponseException: Exception of type ‘Couchbase.Lite.HttpResponseException’ was thrown.
at Couchbase.Lite.Util.TransientErrorRetryHandler.HandleTransientErrors (System.Threading.Tasks.Task1[TResult] request, System.Object state) [0x0017d] in <bb3bb8c4fbb54f939fa09402030f6081>:0 at Couchbase.Lite.Util.TransientErrorRetryHandler+<ResendHandler>c__AnonStorey0.<>m__0 (System.Threading.Tasks.Task
1[TResult] t) <0x98fb6a80 + 0x0003b> in :0
at System.Threading.Tasks.ContinuationResultTaskFromResultTask2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <3fd174ff54b146228c505f23cf75ce71>:0 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable
1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Net.Http.HttpClient+d__49.MoveNext () [0x000ca] in :0
— End of inner exception stack trace —
at Couchbase.Lite.CouchbaseLiteHttpClient+c__AnonStorey2.<>m__1 (System.Threading.Tasks.Task1[TResult] t) [0x00000] in /Volumes/Data/jenkins/workspace/couchbase-lite-net-build@2/1.4/Android/couchbase-lite-net/src/Couchbase.Lite.Shared/Replication/ChangeTracker.cs:70 at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <3fd174ff54b146228c505f23cf75ce71>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <3fd174ff54b146228c505f23cf75ce71>:0
—> (Inner Exception #0) [HttpResponseException: StatusCode = NotFound]<—
<—
[0:] WARN) SYNC (RemoteSession): [5] 2017-7-28 01:33:38.709+05:30 Failed content:
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:33:38.716+05:30 Got 404 from _local, ignoring…
[0:] INFO) SYNC (Replication): [6] 2017-7-28 01:33:38.747+05:30 Puller f23d9f40-5adc-4e81-af82-19d3358ffdfd stopped. Elapsed time 2.280 sec
07-28 13:34:15.902 D/Mono ( 3902): [0x9b1bf930] worker finishing
Thread finished: #5
The thread ‘Unknown’ (0x5) has exited with code 0 (0x0).
Thread finished: #2
Thread started: #10
The thread ‘Unknown’ (0x2) has exited with code 0 (0x0).
07-28 13:34:38.070 D/Mono ( 3902): [0x9b36d930] hill climbing, change max number of threads 2
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:34:38.076+05:30 RETRYING, to transfer missed revisions…
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:34:38.112+05:30 Error set during replication (application may continue)
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:34:38.119+05:30 Error set during replication (application may continue):
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:34:38.132+05:30 Pusher 18b2f301-6a32-46ab-ad14-f934bfdb8712 successfully logged in!
[0:] INFO) SYNC (Replication): [5] 2017-7-28 01:34:38.136+05:30 Pusher 18b2f301-6a32-46ab-ad14-f934bfdb8712 no local checkpoint, not getting remote one
My Code for C# is as below for Replication:
Log.Debug(TAG, "Entering method StartReplicationWithAuth");
pull = db.CreatePullReplication(CreateSyncUri(host, port));
push = db.CreatePushReplication(CreateSyncUri(host, port));
var authenticator = AuthenticatorFactory.CreateBasicAuthenticator(Constant.DB_USER, Constant.DB_PASS);
pull.Authenticator = authenticator;
push.Authenticator = authenticator;
pull.Continuous = true;
push.Continuous = true;
push.Changed += (sender, e) =>
{
// Will be called when the push replication status changes
};
pull.Changed += (sender, e) =>
{
// Will be called when the pull replication status changes
};
pull.Start();
push.Start();
Log.Debug(TAG, "Exiting method StartReplicationWithAuth");