Running couchbase .net client under linux/mono

I have a .net app that uses couchbase 3.0, and I am trying to get it running under linux/mono. I am having problem with something in couchbase-net-client. Cannot quiet figure out what. Does official .net client work in linux via mono? I would appreciate any suggestions. What are my options to get it running?

Here is the output:

Unhandled Exception:
System.TypeLoadException: Could not load type '' from assembly ''.
  at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
  at System.Type.GetType (System.String typeName, Boolean throwOnError) <0x7f819cccc2b0 + 0x0002e> in <filename unknown>:0 
  at Couchbase.Core.Serialization.SerializerFactory.GetSerializer (Couchbase.Configuration.Client.ClientConfiguration config, Couchbase.Configuration.Client.Providers.SerializerElement element) <0x41eacb70 + 0x00054> in <filename unknown>:0 
  at Couchbase.Configuration.Client.ClientConfiguration..ctor (Couchbase.Configuration.Client.Providers.CouchbaseClientSection section) <0x41ea89f0 + 0x0069b> in <filename unknown>:0 
  at Couchbase.Cluster..ctor (System.String configurationSectionName) <0x41e6d710 + 0x0005f> in <filename unknown>:0 
  at <StartupCode$test>.$Test.main@ () <0x41e6cd50 + 0x0003f> in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: Could not load type '' from assembly ''.
  at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
  at System.Type.GetType (System.String typeName, Boolean throwOnError) <0x7f819cccc2b0 + 0x0002e> in <filename unknown>:0 
  at Couchbase.Core.Serialization.SerializerFactory.GetSerializer (Couchbase.Configuration.Client.ClientConfiguration config, Couchbase.Configuration.Client.Providers.SerializerElement element) <0x41eacb70 + 0x00054> in <filename unknown>:0 
  at Couchbase.Configuration.Client.ClientConfiguration..ctor (Couchbase.Configuration.Client.Providers.CouchbaseClientSection section) <0x41ea89f0 + 0x0069b> in <filename unknown>:0 
  at Couchbase.Cluster..ctor (System.String configurationSectionName) <0x41e6d710 + 0x0005f> in <filename unknown>:0 
  at <StartupCode$test>.$Test.main@ () <0x41e6cd50 + 0x0003f> in <filename unknown>:0

@enko

I’m can’t personally speak to Mono and Linux compatibility for the .Net client. However, based on the stack trace it appears your error is happening here:

I’d look at your serializer configuration in your .config file, perhaps something isn’t right there? Seems like it can’t creat the type because the type that’s defined is blank. Of course, the problems reading the .config could be an artifact of Mono, but it’s the first place I’d look.

@enko, @btburnett3

The current 2.2.X branch is probably not Mono compliant atm, however if you work through the errors you can probably get it to work.

Note we are planning on having a DNX/Core CLR branch sooner than later in Gthub and this will be a work-in-progress to make the SDK platform agnostic. Once I get the branch up, you may want to pull it down and help test and bug fix until it’s its stable enough for a release or just simple pull it and check on the progress. Let me know how i can help!

Thanks,

Jeff

Thank you! I’ve dug into it a bit further, did the same configuration in code, and it appears to be attempting to connect now, although failing with 401 (unauthorised) and a huge stack trace that might be outside of my expertise to figure out.

Oddly, this app.config works on windows.

Posting it here just for reference.

    Unhandled Exception:
    System.AggregateException: Could not bootstrap - check inner exceptions for details. ---> System.AggregateException:  One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---

  --- End of inner exception stack trace ---
  at <StartupCode$test>.$Test.main@ () <0x40ba0d50 + 0x00273> in <filename unknown>:0 
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---
<---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) <0x40c2dbb0 + 0x00323> in <filename unknown>:0 
  at System.Net.WebClient.DownloadString (System.Uri address) <0x40c2d9a0 + 0x0004f> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownLoadConfig[T] (System.Uri uri) <0x40c2d800 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x0019b> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x007b3> in <filename unknown>:0 
  at System.Linq.Enumerable.Any[TSource] (IEnumerable`1 source, System.Func`2 predicate) <0x40c2cce0 + 0x00090> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.Initialize () <0x40c2cb10 + 0x000cf> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.StartProvider (System.String username, System.String password) <0x40c2c480 + 0x000aa> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig (System.String bucketName, System.String password) <0x40c2bf10 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 <---

[ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: Could not bootstrap - check inner exceptions for details. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---

  --- End of inner exception stack trace ---
  at <StartupCode$test>.$Test.main@ () <0x40ba0d50 + 0x00273> in <filename unknown>:0 
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---
<---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) <0x40c2dbb0 + 0x00323> in <filename unknown>:0 
  at System.Net.WebClient.DownloadString (System.Uri address) <0x40c2d9a0 + 0x0004f> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownLoadConfig[T] (System.Uri uri) <0x40c2d800 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x0019b> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x007b3> in <filename unknown>:0 
  at System.Linq.Enumerable.Any[TSource] (IEnumerable`1 source, System.Func`2 predicate) <0x40c2cce0 + 0x00090> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.Initialize () <0x40c2cb10 + 0x000cf> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.StartProvider (System.String username, System.String password) <0x40c2c480 + 0x000aa> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig (System.String bucketName, System.String password) <0x40c2bf10 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 <---

I’d be happy to test it! I’ve recompiled the client on linux, and its an identical result in terms of exceptions. I’ll wait for core based client. Thank you.

Here is the code I am using to connect:

open System
open Couchbase
open Couchbase.Configuration.Client

[<EntryPoint>]
let main argv = 

    let cfg = new ClientConfiguration()
    cfg.Servers.Add(new Uri("http://mycouchbaseserver.com:8091/pools"))
    let bucketcfg = new BucketConfiguration()
    bucketcfg.BucketName = "bucketname" |> ignore
    bucketcfg.Username = "bucketname" |> ignore
    bucketcfg.Password = "!" |> ignore 
    bucketcfg.UseSsl = false |> ignore
    cfg.BucketConfigs.Add("test",bucketcfg)
    

    let c = new Cluster(cfg);
    
    let bucket =
        try
            c.OpenBucket("bucketname")
        with
            e -> raise e

    printfn "%A" argv
    0 // return an integer exit code

and this is the exception:

    Unhandled Exception:
    System.AggregateException: Could not bootstrap - check inner exceptions for details. ---> System.AggregateException:  One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---

  --- End of inner exception stack trace ---
  at <StartupCode$test>.$Test.main@ () <0x40ba0d50 + 0x00273> in <filename unknown>:0 
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---
<---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) <0x40c2dbb0 + 0x00323> in <filename unknown>:0 
  at System.Net.WebClient.DownloadString (System.Uri address) <0x40c2d9a0 + 0x0004f> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownLoadConfig[T] (System.Uri uri) <0x40c2d800 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x0019b> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x007b3> in <filename unknown>:0 
  at System.Linq.Enumerable.Any[TSource] (IEnumerable`1 source, System.Func`2 predicate) <0x40c2cce0 + 0x00090> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.Initialize () <0x40c2cb10 + 0x000cf> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.StartProvider (System.String username, System.String password) <0x40c2c480 + 0x000aa> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig (System.String bucketName, System.String password) <0x40c2bf10 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 <---

[ERROR] FATAL UNHANDLED EXCEPTION: System.AggregateException: Could not bootstrap - check inner exceptions for details. ---> System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---

  --- End of inner exception stack trace ---
  at <StartupCode$test>.$Test.main@ () <0x40ba0d50 + 0x00273> in <filename unknown>:0 
---> (Inner Exception #0) System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x01463> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 
---> (Inner Exception #0) System.Net.Sockets.SocketException: Connection timed out
  at Couchbase.IO.DefaultConnectionFactory.<GetGeneric`1>m__0[T] (IConnectionPool`1 p, IByteConverter c, Couchbase.IO.BufferAllocator b) <0x40c18ae0 + 0x0015f> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Acquire () <0x40c1c570 + 0x002e0> in <filename unknown>:0 
  at Couchbase.IO.ConnectionPool`1[T].Couchbase.IO.IConnectionPool.Acquire () <0x40c1c550 + 0x0000f> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x0008c> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig (System.String bucketName, System.String password) <0x40c10ef0 + 0x008a4> in <filename unknown>:0 <---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast
  at Couchbase.IO.Strategies.DefaultIOStrategy.Authenticate (IConnection connection) <0x40c28240 + 0x00203> in <filename unknown>:0 
  at Couchbase.IO.Strategies.DefaultIOStrategy.Execute[T] (IOperation`1 operation) <0x40c1d670 + 0x000c3> in <filename unknown>:0 <---
<---

---> (Inner Exception #1) System.Security.Authentication.AuthenticationException: scorebeast ---> System.Net.WebException: The remote server returned an error: (401) Unauthorized.
  at System.Net.WebClient.DownloadDataInternal (System.Uri address, System.Net.WebRequest& request) <0x40c2dbb0 + 0x00323> in <filename unknown>:0 
  at System.Net.WebClient.DownloadString (System.Uri address) <0x40c2d9a0 + 0x0004f> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownLoadConfig[T] (System.Uri uri) <0x40c2d800 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x0019b> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs (System.Uri server) <0x40c2cf00 + 0x007b3> in <filename unknown>:0 
  at System.Linq.Enumerable.Any[TSource] (IEnumerable`1 source, System.Func`2 predicate) <0x40c2cce0 + 0x00090> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.Initialize () <0x40c2cb10 + 0x000cf> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.StartProvider (System.String username, System.String password) <0x40c2c480 + 0x000aa> in <filename unknown>:0 
  at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig (System.String bucketName, System.String password) <0x40c2bf10 + 0x000d3> in <filename unknown>:0 
  at Couchbase.Core.ClusterController.CreateBucket (System.String bucketName, System.String password) <0x40c10000 + 0x00361> in <filename unknown>:0 <---

Looks like you are missing a library for the serializer. I have seen posts where you can use your own serializer library.

Keith

@envitraux, thank you! Yeah its not seeing a bunch of stuff. Even though the library is there, and referenced during compile. I’ll run the app on windows ec2 for now. Looks like the driver dev is working on making it portable.

@jmorris, my longer replies get blocked here, but I would really appreciate it and help you test it. Would love to get off windows completely. I got it to attempt to connect eventually by programmatically defining the config, but its still failing with something else related to unknown files (maybe further down the .dll config chain).

Thank you for your work! Running on ec2 win server without problems, i’ll stick with it for now.

@btburnett3 you’re right!

Was this ever something that was resolved with the dotnet core version of the SDK? I am on 2.5.4 of the CouchbaseNetClient and it still throws this error on Mono.

1 Like

@enko - I am not sure, we only support and test .NET Full and .NET Core. Which specific error are you running into?

Here’s the error:

 at (wrapper managed-to-native) System.Type:internal_from_name (string,bool,bool)
  at System.Type.GetType (System.String typeName, System.Boolean throwOnError) [0x0000e] in <4fdc5ed61a074cafb49fa42deb20d521>:0 
  at Couchbase.Core.Serialization.SerializerFactory.GetSerializer (System.String typeName) [0x00007] in <9ff4f24302034456bc9fae118d3df519>:0 
  at Couchbase.Configuration.Client.ClientConfiguration..ctor (Couchbase.Configuration.Client.ICouchbaseClientDefinition definition) [0x00232] in <9ff4f24302034456bc9fae118d3df519>:0 
  at Couchbase.Configuration.Client.ClientConfiguration..ctor (Couchbase.Configuration.Client.Providers.CouchbaseClientSection section) [0x00000] in <9ff4f24302034456bc9fae118d3df519>:0 
  at Couchbase.ClusterHelper.Initialize (System.String configurationSectionName) [0x00013] in <9ff4f24302034456bc9fae118d3df519>:0

System.TypeLoadException: Could not load type ‘’ from assembly ‘’.

Seems strange that the assemble and type information is missing. Note that the SerializerElement class is conditional compiled only for .NET Full, so I am somewhat surprised that Mono is using the full framework version of the .DLL vs the Core version (both are included in the NuGet package - the version is selected by the framework version of the project).

Have you tried using programmatic configuration instead of an app.config?

I will give that a shot and report back. Not sure how important it is, but I am not setting a custom serializer, do I don’t think anything is getting pulled for that from app.config?

@rmendoza -

The SerializerElement has the type definition for the serializer: https://github.com/couchbase/couchbase-net-client/blob/master/Src/Couchbase/Configuration/Client/Providers/SerializerElement.cs#L16