Hello,
I’m trying to connect to Couchbase server version 6.6.0 using latest .net sdk
and see error
System.NullReferenceException: ‘Object reference not set to an instance of an object.’
Server is local on Windows machine.
Example code:
var cluster = await Cluster.ConnectAsync("couchbase://localhost", "User", "123456");
var report = await cluster.PingAsync();
Logs:
There was an error attempting to resolve hosts using DNS-SRV - Non-Existent Domain
Bootstrapping with node localhost
Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01.
Setting TCP Keep-Alives using SocketOptions - enable keep-alives True, time 00:01:00, interval 00:00:01.
Starting connection initialization on server [::1]:11210.
Starting connection initialization on server [::1]:11210.
Executing op Helo on [::1]:11210 with key {"i":"9c04414fbaf8e727/0000000000000001","a":"couchbase-net-sdk/3.1.2.0 (clr/.NET Core 3.1.10) (os/Microsoft Windows 10.0.18363)"} and opaque 4.
Executing op Helo on [::1]:11210 with key {"i":"9c04414fbaf8e727/0000000000000002","a":"couchbase-net-sdk/3.1.2.0 (clr/.NET Core 3.1.10) (os/Microsoft Windows 10.0.18363)"} and opaque 3.
Completed executing op [::1]:11210 on Helo with key {"i":"9c04414fbaf8e727/0000000000000001","a":"couchbase-net-sdk/3.1.2.0 (clr/.NET Core 3.1.10) (os/Microsoft Windows 10.0.18363)"} and opaque 4
Completed executing op [::1]:11210 on Helo with key {"i":"9c04414fbaf8e727/0000000000000002","a":"couchbase-net-sdk/3.1.2.0 (clr/.NET Core 3.1.10) (os/Microsoft Windows 10.0.18363)"} and opaque 3
Executing op GetErrorMap on [::1]:11210 with key and opaque 6.
Executing op GetErrorMap on [::1]:11210 with key and opaque 8.
Completed executing op [::1]:11210 on GetErrorMap with key and opaque 8
Completed executing op [::1]:11210 on GetErrorMap with key and opaque 6
Attempted bootstrapping on endpoint localhost has failed.
Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Unknown error (0xc1000001)
at Internal.Cryptography.HashProviderCng.AppendHashData(ReadOnlySpan`1 source)
at System.Security.Cryptography.HMACSHA1.HashCore(ReadOnlySpan`1 source)
at System.Security.Cryptography.HashAlgorithm.TryComputeHash(ReadOnlySpan`1 source, Span`1 destination, Int32& bytesWritten)
at System.Security.Cryptography.Rfc2898DeriveBytes.Func()
at System.Security.Cryptography.Rfc2898DeriveBytes.GetBytes(Int32 cb)
at Couchbase.Core.IO.Authentication.ScramShaMechanism.GetSaltedPassword(String password, Byte[] salt, Int32 iterationCount)
at Couchbase.Core.IO.Authentication.ScramShaMechanism.AuthenticateAsync(IConnection connection, CancellationToken cancellationToken)
at Couchbase.Core.ClusterNode.Couchbase.Core.IO.Connections.IConnectionInitializer.InitializeConnectionAsync(IConnection connection, 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 where exception was thrown ---
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 cancellationToken)
at Couchbase.Core.ClusterContext.BootstrapGlobalAsync()