Replication progress 0/0

Hi,

We switched from couchDB to couchbase and set up a SQ. Everything seems to work fine until we try to replicate from our Mobile application.

var url = new Uri(“blip://xxxxx:xxxx@10.10.10.18:4984/users”);
var db = new Database(“users”);

    var config = new ReplicatorConfiguration
    (
         db,
         url
    );
  
    var replication = new Replicator(config);
    try
    {
        replication.Start();
    }
    catch (Exception ex)
    {
        var t4 = ex;
    }

It seems to get stuck on the connecting process. Here is the output

08-14 09:37:30.619 I/CouchbaseLite(11705): [1] 2017-8-14 09:37:30.618+02:00 SYNC (Replicator) [1] 2017-08-14T09:37:30.6181060+02:00 Replicator[<> blip://xxxxx:xxxxx@10.10.10.18:4984/users]: Starting
08-14 09:37:30.622 D/Mono    (11705): DllImport searching in: 'LiteCore' ('libLiteCore.so').
08-14 09:37:30.622 D/Mono    (11705): Searching for 'c4repl_getStatus'.
08-14 09:37:30.622 D/Mono    (11705): Probing 'c4repl_getStatus'.
08-14 09:37:30.622 D/Mono    (11705): Found as 'c4repl_getStatus'.
08-14 09:37:30.664 D/Mono    (11705): Assembly Ref addref System.Security.Cryptography.X509Certificates[0xb8de9138] -> mscorlib[0xb7314958]: 63
08-14 09:37:30.686 D/Mono    (11705): DllImport searching in: 'LiteCore' ('libLiteCore.so').
08-14 09:37:30.686 D/Mono    (11705): Searching for 'c4repl_new'.
08-14 09:37:30.686 D/Mono    (11705): Probing 'c4repl_new'.
08-14 09:37:30.687 D/Mono    (11705): Found as 'c4repl_new'.
08-14 09:37:30.688 D/Mono    (11705): DllImport searching in: 'LiteCore' ('libLiteCore.so').
08-14 09:37:30.688 D/Mono    (11705): Searching for 'FLEncoder_New'.
08-14 09:37:30.688 D/Mono    (11705): Probing 'FLEncoder_New'.
08-14 09:37:30.688 D/Mono    (11705): Found as 'FLEncoder_New'.
08-14 09:37:30.692 D/Mono    (11705): DllImport searching in: 'LiteCore' ('libLiteCore.so').
08-14 09:37:30.692 D/Mono    (11705): Searching for 'FLEncoder_WriteNull'.
08-14 09:37:30.692 D/Mono    (11705): Probing 'FLEncoder_WriteNull'.
08-14 09:37:30.692 D/Mono    (11705): Found as 'FLEncoder_WriteNull'.
08-14 09:37:30.707 I/CouchbaseLite(11705): [1] 2017-8-14 09:37:30.706+02:00 DB (DB) [1] 2017-08-14T09:37:30.7060660+02:00 Opening DataFile
08-14 09:37:30.710 I/CouchbaseLite(11705): [1] 2017-8-14 09:37:30.709+02:00 LITECORE (BLIP) [1] 2017-08-14T09:37:30.7093320+02:00 {1}--> ->blip:10.10.10.18:4984/users/_blipsync
08-14 09:37:30.711 I/CouchbaseLite(11705): [1] 2017-8-14 09:37:30.710+02:00 LITECORE (BLIP) [1] 2017-08-14T09:37:30.7104920+02:00 {1} Opening connection...
08-14 09:37:30.713 I/CouchbaseLite(11705): [1] 2017-8-14 09:37:30.712+02:00 LITECORE (Actor) [1] 2017-08-14T09:37:30.7120790+02:00 Starting Scheduler<0xb8e7e5a0> with 4 threads
Thread started:  #7
08-14 09:37:30.774 I/art     (11705): Explicit concurrent mark sweep GC freed 5967(567KB) AllocSpace objects, 2(32KB) LOS objects, 24% free, 23MB/31MB, paused 335us total 26.766ms
08-14 09:37:30.776 D/Mono    (11705): GC_TAR_BRIDGE bridges 27 objects 3109 opaque 851 colors 27 colors-bridged 27 colors-visible 27 xref 1 cache-hit 0 cache-semihit 0 cache-miss 0 setup 0.21ms tarjan 2.72ms scc-setup 0.15ms gather-xref 0.00ms xref-setup 0.00ms cleanup 0.49ms
08-14 09:37:30.776 D/Mono    (11705): GC_BRIDGE: Complete, was running for 30.09ms
08-14 09:37:30.777 D/Mono    (11705): GC_MINOR: (Nursery full) time 17.61ms, stw 18.43ms promoted 298K major size: 1920K in use: 1186K los size: 7168K in use: 5172K
08-14 09:37:30.787 I/CouchbaseLite(11705): [8] 2017-8-14 09:37:30.778+02:00 LITECORE (Actor) [8] 2017-08-14T09:37:30.7776970+02:00 BLIP[->blip:10.10.10.18:4984/users/_blipsync] performNextMessage
Thread started:  #8
08-14 09:37:30.803 I/CouchbaseLite(11705): [9] 2017-8-14 09:37:30.802+02:00 LITECORE (Actor) [9] 2017-08-14T09:37:30.8013200+02:00 Repl->blip:10.10.10.18:4984/users/_blipsync performNextMessage
08-14 09:37:30.808 D/Mono    (11705): DllImport searching in: 'LiteCore' ('libLiteCore.so').
08-14 09:37:30.808 D/Mono    (11705): Searching for 'c4socket_closed'.
08-14 09:37:30.808 D/Mono    (11705): Probing 'c4socket_closed'.
08-14 09:37:30.808 D/Mono    (11705): Found as 'c4socket_closed'.
Thread started:  #9
08-14 09:37:30.819 I/CouchbaseLite(11705): [10] 2017-8-14 09:37:30.819+02:00 LITECORE (Actor) [10] 2017-08-14T09:37:30.8184730+02:00 BLIP[->blip:10.10.10.18:4984/users/_blipsync] performNextMessage
Thread started:  #10
08-14 09:37:30.836 I/CouchbaseLite(11705): [11] 2017-8-14 09:37:30.835+02:00 LITECORE (Actor) [11] 2017-08-14T09:37:30.8350760+02:00 BLIP[->blip:10.10.10.18:4984/users/_blipsync] performNextMessage
08-14 09:37:30.838 I/CouchbaseLite(11705): [11] 2017-8-14 09:37:30.836+02:00 LITECORE (Actor) [11] 2017-08-14T09:37:30.8363580+02:00 BLIP[->blip:10.10.10.18:4984/users/_blipsync] performNextMessage
08-14 09:37:30.840 I/CouchbaseLite(11705): [11] 2017-8-14 09:37:30.839+02:00 LITECORE (Actor) [11] 2017-08-14T09:37:30.8388300+02:00 BLIP[->blip:10.10.10.18:4984/users/_blipsync] performNextMessage
08-14 09:37:30.841 I/CouchbaseLite(11705): [8] 2017-8-14 09:37:30.840+02:00 LITECORE (Actor) [8] 2017-08-14T09:37:30.8401730+02:00 BLIP[->blip:10.10.10.18:4984/users/_blipsync] performNextMessage
08-14 09:37:30.858 D/Mono    (11705): Image addref System.Net.Sockets[0xb851deb8] -> System.Net.Sockets.dll[0xb8845da8]: 2
08-14 09:37:30.859 D/Mono    (11705): Prepared to set up assembly 'System.Net.Sockets' (System.Net.Sockets.dll)
08-14 09:37:30.859 D/Mono    (11705): Assembly System.Net.Sockets[0xb851deb8] added to domain RootDomain, ref_count=1
08-14 09:37:30.861 D/Mono    (11705): AOT: image 'System.Net.Sockets.dll.so' not found: dlopen failed: library "/data/app/SummitMobile.Android-1/lib/arm/libaot-System.Net.Sockets.dll.so" not found
08-14 09:37:30.864 D/Mono    (11705): AOT: image '/usr/local/lib/mono/aot-cache/arm/System.Net.Sockets.dll.so' not found: dlopen failed: library "/data/app/SummitMobile.Android-1/lib/arm/libaot-System.Net.Sockets.dll.so" not found
08-14 09:37:30.864 D/Mono    (11705): Config attempting to parse: 'System.Net.Sockets.dll.config'.
Loaded assembly: System.Net.Sockets.dll [External]
08-14 09:37:30.864 D/Mono    (11705): Config attempting to parse: '/usr/local/etc/mono/assemblies/System.Net.Sockets/System.Net.Sockets.config'.
08-14 09:37:30.864 D/Mono    (11705): Assembly Ref addref Couchbase.Lite[0xb735bb08] -> System.Net.Sockets[0xb851deb8]: 2
08-14 09:37:30.864 D/Mono    (11705): Assembly Ref addref System.Net.Sockets[0xb851deb8] -> System[0xb769a7b8]: 16
08-14 09:37:30.877 I/CouchbaseLite(11705): [1] 2017-8-14 09:37:30.876+02:00 SYNC (Replicator) [1] 2017-08-14T09:37:30.8752100+02:00 Replicator[<> blip://xxxxxx:xxxxxx@10.10.10.18:4984/users] is Connecting, progress 0/0
08-14 09:37:58.546 W/CouchbaseLite(11705): [17] 2017-8-14 09:37:58.543+02:00 TASK SCHEDULING (SerialQueue) [17] 2017-08-14T09:37:58.4253090+02:00 Exception during DispatchAsync: System.EntryPointNotFoundException: mono_get_runtime_build_info
08-14 09:37:58.546 W/CouchbaseLite(11705):   at (wrapper managed-to-native) System.Runtime.InteropServices.RuntimeInformation:mono_get_runtime_build_info ()
08-14 09:37:58.546 W/CouchbaseLite(11705):   at System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription () [0x00000] in <c8e4a6279d7c4826a84d4ea5ac784d3a>:0 
08-14 09:37:58.546 W/CouchbaseLite(11705):   at Couchbase.Lite.Sync.HTTPLogic.UserAgent () [0x00059] in <1fdcb221f3514be5b2280c7f0f73264b>:0 
08-14 09:37:58.546 W/CouchbaseLite(11705):   at Couchbase.Lite.Sync.HTTPLogic.HTTPRequestData () [0x0002d] in <1fdcb221f3514be5b2280c7f0f73264b>:0 
08-14 09:37:58.546 W/CouchbaseLite(11705):   at Couchbase.Lite.Sync.WebSocketWrapper.OnSocketReady () [0x00000] in <1fdcb221f3514be5b2280c7f0f73264b>:0 
08-14 09:37:58.546 W/CouchbaseLite(11705):   at Couchbase.Lite.Sync.WebSocketWrapper.StartInternal () [0x001c3] in <1fdcb221f3514be5b2280c7f0f73264b>:0 
08-14 09:37:58.546 W/CouchbaseLite(11705):   at Couchbase.Lite.Support.SerialQueue.ProcessAsync () [0x0002f] in <1fdcb221f3514be5b2280c7f0f73264b>:0 

There is no abnormal log information from the sync gateway or the couchbase server. Anyone able to read the output info and hand me some tools from here on?

thanks

System.EntryPointNotFoundException: mono_get_runtime_build_info

This looks like some kind of Mono code-loading exception. I’m not very familiar with .NET, but @borrrden should be able to help you with this.

BTW, it’s helpful if you describe what platform/version of Couchbase Lite you’re using, and on what OS.

1 Like

Yes +1 to what Jens said, although this looks like Xamarin Android. What version are you using because this looks like an API mismatch between Xamarin and the Mono runtime (which is a Xamarin issue). I recommend asking on their forums as well. Basically they call into a runtime method (mono_get_runtime_build_info) that doesn’t exist for whatever reason as part of a standard .NET call to FrameworkDescription. Could you uninstall, clean your project etc too while you are at it?

2 Likes

Another question: What are your linker settings? Apparently Full Linking is associated with this problem sometimes.

1 Like

Hi guys,

thank you for your replies. We had a Holiday yesterday. I will update Xamarin but also SG and CBL to the latest (preview) versions and will report back.

UPDATE:

linker: set to none
versions:
SG 1.5-494
CBL 2.0.0-db013
Couchbase Server 5.0.0-3217

still the same error
08-16 16:00:28.182 W/CouchbaseLite(21413): [18] 2017-8-16 04:00:28.180+02:00 TASK SCHEDULING (SerialQueue) [18] 2017-08-16T16:00:28.1186800+02:00 Exception during DispatchAsync: System.EntryPointNotFoundException: mono_get_runtime_build_info
08-16 16:00:28.182 W/CouchbaseLite(21413): at (wrapper managed-to-native) System.Runtime.InteropServices.RuntimeInformation:mono_get_runtime_build_info ()
08-16 16:00:28.182 W/CouchbaseLite(21413): at System.Runtime.InteropServices.RuntimeInformation.get_FrameworkDescription () [0x00000] in :0
08-16 16:00:28.182 W/CouchbaseLite(21413): at Couchbase.Lite.Sync.HTTPLogic.UserAgent () [0x0003f] in C:\Users\jenkins\workspace\couchbase-lite-net\src\Couchbase.Lite\Sync\HTTPLogic.cs:111
08-16 16:00:28.182 W/CouchbaseLite(21413): at Couchbase.Lite.Sync.HTTPLogic.HTTPRequestData () [0x0002d] in C:\Users\jenkins\workspace\couchbase-lite-net\src\Couchbase.Lite\Sync\HTTPLogic.cs:119
08-16 16:00:28.182 W/CouchbaseLite(21413): at Couchbase.Lite.Sync.WebSocketWrapper.OnSocketReady () [0x00000] in C:\Users\jenkins\workspace\couchbase-lite-net\src\Couchbase.Lite\Sync\WebSocketWrapper.cs:277
08-16 16:00:28.182 W/CouchbaseLite(21413): at Couchbase.Lite.Sync.WebSocketWrapper.StartInternal () [0x001c3] in C:\Users\jenkins\workspace\couchbase-lite-net\src\Couchbase.Lite\Sync\WebSocketWrapper.cs:419
08-16 16:00:28.182 W/CouchbaseLite(21413): at Couchbase.Lite.Support.SerialQueue.ProcessAsync () [0x0002f] in C:\Users\jenkins\workspace\couchbase-lite-net\src\Couchbase.Lite\Support\SerialQueue.cs:178

I’ll post on Xamarin.Forms as well… .

Ok guys, very weird. I updated to Visual Studio 15.3 and everything works fine now!

Thanks for your help

Thomas

Xamarin android is really finicky especially with shared runtime settings. My best guess would be that the shared mono libs ok the device were still the older version that didn’t have that call.