.NET SDK connecting to Azure Cluster

We are trying to test the connection to our Azure Cluster from a .NET and we are having trouble. The Couchbase cluster was setup using the Azure marketplace and it setup 3 nodes, a sync gateway, etc…

At this point, I’m just trying to run the simplest of connections, getting a bucket and getting a document. We are very new to Couchbase, so I’m sure I’ve missed a configuration step somewhere.

        var cluster = await Cluster.ConnectAsync("vm0.server-myazuresrvr.eastus.cloudapp.azure.com", "myuser", "mypassword");

This exception occurs and of course I cannot get the bucket after.

$exception	{System.Net.Sockets.SocketException (60): Operation timed out    at Couchbase.Core.IO.Connections.ConnectionFactory.CreateAndConnectAsync(IPEndPoint endPoint, HostEndpoint hostEndpoint, CancellationToken cancellationToken)    at Couchbase.Core.IO.Connections.ConnectionPoolBase.CreateConnectionAsync(CancellationToken cancellationToken)    at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.<>c__DisplayClass29_0.<<AddConnectionsAsync>g__StartConnection|0>d.MoveNext() --- End of stack trace from previous location ---    at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.AddConnectionsAsync(Int32 count, CancellationToken cancellationToken)    at Couchbase.Core.IO.Connections.DataFlow.DataFlowConnectionPool.InitializeAsync(CancellationToken cancellationToken)    at Couchbase.Core.ClusterNode.InitializeAsync()    at Couchbase.Core.DI.ClusterNodeFactory.CreateAndConnectAsync(HostEndpoint endPoint, BucketType bucketType, NodeAdapter nodeAdapter, CancellationToken can…	System.Net.Sockets.SocketException

Any thoughts.

Thanks in advance.

Hi @flboy77 thanks for reaching out and welcome to the forums

first and foremost, connection to Couchbase Cloud is via secure connection only i.e TLS,
find steps for secure authentication here -Authenticating against Couchbase Server | Couchbase Docs

you can find more information on connection and debugging here.

Thank you for the response. I am not using Couchbase Cloud, I am using Couchbase Server Enterprise that is hosted on 3 MS Azure nodes created by Azure Marketplace. Will the same troubleshooting techniques still apply?

Thanks again for the links. It looks promising.