An established connection was aborted by the software in your host machine

Hi!

I have a problem in my project when I execute the Couchbase method (.NET) Get<> and try to obtain a Document by its ID.

I receive this error:
An established connection was aborted by the software in your host machine

Tested in…
OS: Windows Server 2012 R2 Standard
Visual Studio: 2015 or 2017 (Debugging / Compiled)
Couchbase: 4.6.2

Somebody know this error.

NOTE: If I compiled from VS 2015 works perfectly ¬¬ . But doesn’t in debug mode.

Hi @josue.navarro,

Would you mind posting some sample code showing, especially around connecting to the Couchbase cluster and opening a bucket?

Connection to CB:

private void ConnectCouchbase(String CouchBaseServers)
 {
   CouchBaseServers = CouchBaseServers.Replace("\n","");
   CouchBaseServers = CouchBaseServers.Replace("\r","");

   String[] servers = CouchBaseServers.Split(',');
   couchbaseClientConfig.Servers.Clear ();

   foreach (String server in servers)
   {	
      couchbaseClientConfig.Servers.Add(new Uri("http://" + server + ":8091/pools"));
   }

   couchbaseClientConfig.DefaultOperationLifespan = 300;
   couchbaseClientConfig.ViewRequestTimeout = 300;
   couchbaseClientConfig.ObserveTimeout = 300;
   couchbaseClientConfig.QueryRequestTimeout = 300;

   couchbaseCluster = new Cluster(couchbaseClientConfig);
}

Opening a bucket:

public void ConnectCouchbase_config()
{
   couchbaseBucket_config = couchbaseCluster.OpenBucket("bucket_config");
}

Thanks in advance @matthew.groves

Solved!

I updated the CouchBase .NET Client and… works!

Thanks!

1 Like

Hi @josue.navarro

Please can you let us know what client version you were using?

Sure @MikeGoldsmith

CouchBase .NET Client 2.2.8