Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-1527

JsonSerializationException when bootstrapping against invalid remote host

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Minor
    • 2.5.6
    • 2.5.0
    • library
    • None

    Description

      HttpStreaming fails (expectedly), but the logged message is a bit misleading:

      System.AggregateException : Could not bootstrap - check inner exceptions for details.
      ----> System.AggregateException : One or more errors occurred.
      ----> Newtonsoft.Json.JsonSerializationException : Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Couchbase.Configuration.Server.Serialization.Settings' because the type requires a JSON object (e.g.

      {"name":"value"}

      ) to deserialize correctly.
      To fix this error either change the JSON to a JSON object (e.g.

      {"name":"value"}

      ) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
      Path 'settings', line 1, position 87.
      ----> System.Security.Authentication.AuthenticationException : Authentication failed for user 'Administrator'
      TearDown : System.ArgumentNullException : Value cannot be null.
      Parameter name: bucket
      at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
      at Couchbase.Core.ClusterController.CreateBucket(String bucketName, IAuthenticator authenticator)
      at Couchbase.Cluster.OpenBucket()
      at Couchbase.IntegrationTests.CouchbaseBucket_N1QlQuery_Tests.OneTimeSetUp() in C:\Users\jmorris\repos\couchbase-net-client\Src\Couchbase.IntegrationTests\CouchbaseBucket_N1QlQuery_Tests.cs:line 30
      --AggregateException
      at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
      at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
      --JsonSerializationException
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
      at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
      at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
      at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
      at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownLoadConfig[T](Uri uri)
      at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadConfigs(Uri server)
      at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
      at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.Initialize()
      at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.StartProvider(String bucketName, String username, String password)
      at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig(String bucketName, String username, String password)
      at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IAuthenticator authenticator)
      --AuthenticationException
      at Couchbase.IO.ConnectionPoolBase`1.Authenticate(IConnection connection)
      at Couchbase.IO.SharedConnectionPool`1.CreateAndAuthConnection()
      at Couchbase.IO.SharedConnectionPool`1.Acquire()
      at Couchbase.IO.Services.PooledIOService.Execute[T](IOperation`1 operation)
      at Couchbase.Configuration.Server.Providers.CarrierPublication.CarrierPublicationProvider.GetConfig(String bucketName, String username, String password)
      --TearDown
      at Couchbase.Cluster.CloseBucket(IBucket bucket)
      at Couchbase.IntegrationTests.CouchbaseBucket_N1QlQuery_Tests.OneTimeTearDown() in C:\Users\jmorris\repos\couchbase-net-client\Src\Couchbase.IntegrationTests\CouchbaseBucket_N1QlQuery_Tests.cs:line 325

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jmorris Jeff Morris
            jmorris Jeff Morris
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty