replication never times out when trying to contact remote server

26 views
Skip to first unread message

Christoph Berlin

unread,
Dec 1, 2014, 11:49:20 PM12/1/14
to mobile-c...@googlegroups.com
Hi,

We are currently testing corner cases in our QA cycle and ran into an issue with the kCBLReplicationStatus. We are using a one-off replication scenario against a non-existing target to verify whether our app throws the correct error. However when using a remote target the timeout never happens.

Scenario:
Non-existing target: http://127.0.0.1:8888 => replication stops after a ~10sec timeout
Non-existing target: http://dev.server.com:8888 ==> replication never stops but shows kCBLReplicationStatusOffline status

The same issue occurs with any other remote server such as http://www.google.com (don't tell them we tried that).

Is there anything we are missing with regards to how the replication is suppose to timeout when a remote server is not available?

We are using Couchbase Mobile 1.0.3.1

Thanks

Jens Alfke

unread,
Dec 2, 2014, 12:37:50 AM12/2/14
to mobile-c...@googlegroups.com

On Dec 1, 2014, at 8:49 PM, Christoph Berlin <hoptoawe...@gmail.com> wrote:

We are currently testing corner cases in our QA cycle and ran into an issue with the kCBLReplicationStatus. We are using a one-off replication scenario against a non-existing target to verify whether our app throws the correct error. However when using a remote target the timeout never happens.

Interesting. By "one-off" you mean not continuous, right? And this is on iOS?

It sounds like this is related to reachability testing, which Pasin is about to rewrite anyway for other reasons, so this problem is likely to go away too :)

—Jens

Christoph Berlin

unread,
Dec 2, 2014, 1:00:16 AM12/2/14
to mobile-c...@googlegroups.com
That is correct - non continuous and on iOS. It took us a few hours to get to the bottom of this. We initially prototyped with 127.0.0.1 and it worked great and then this...

Do you want a bug report on Github?

Thanks Christoph

Jens Alfke

unread,
Dec 2, 2014, 11:40:38 AM12/2/14
to mobile-c...@googlegroups.com
Yes, a bug report would be good so we can ensure the upcoming changes fix it.

The problem is probably that when the host isn't reachable the replicator stays in 'offline' mode instead of giving up immediately. The upcoming changes will stop pre-checking the reachability of the host, because the SystemConfiguration reachability API isn't always accurate and sometimes returns false negatives.

—Jens

Christoph Berlin

unread,
Dec 3, 2014, 7:11:43 PM12/3/14
to mobile-c...@googlegroups.com
Agreed - that seems to be the issue.


Let me know if you need anything else.

Thanks Christoph
Reply all
Reply to author
Forward
0 new messages