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

Error with ClusterHelper - Only 'http' and 'https' schemes are allowed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • backlog-2.0, .backlog
    • 2.4.2
    • library
    • None
    • Windows / ASP.NET Core

    Description

      Summary: I'm using "couchbase://localhost" as a connection string and getting an error that only "http" and "https" schemes are allowed.

      Repro:

      1. New ASP.NET Core app
      2. In Startup.cs, in ConfigureServices, do a ClusterHelper.Initialize
      3. In the ClientConfiguration::Servers, I create a List<Uri> with one Uri = new("couchbase://localhost")
      4. In a Controller constructor, I do ClusterHelper.GetBucket("default")

      Actual:

      Exception -->

      {System.ArgumentException: Only 'http' and 'https' schemes are allowed.Parameter name: requestUri   at System.Net.Http.HttpRequestMessage.InitializeValues(HttpMethod method, Uri requestUri)   at System.Net.Http.HttpRequestMessage..ctor(HttpMethod method, Uri requestUri)   at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)   at Couchbase.Configuration.Server.Providers.Streaming.HttpServerConfig.DownloadString(Uri uri)   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 username, String password)   at Couchbase.Configuration.Server.Providers.Streaming.HttpStreamingProvider.GetConfig(String bucketName, String password)   at Couchbase.Core.ClusterController.CreateBucket(String bucketName, String password, IClusterCredentials credentials)}

      If I switch to http://localhost:8091, it works fine.

      Expected:

      couchbase://localhost should be a valid connection string.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            matthew.groves Matthew Groves
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty