Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-837

Golang SDK 1.x does not decode SRV Records and throws cant connect to host.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a Bug
    • Major
    • 1.6.7
    • None
    • library
    • None
    • 1

    Description

      When using the golang SDK 1.x version, we are not able to connect to the Couchbase Cluster with SRV Record. This is needed for Sync Gateway to connect to a Couchbase cloud spawned cluster.
      Wondering if i am missing something.
      Code for the following
      endpoint := " cb.329c5386-0894-4e31-9a0f-f886b09b4a3d.dp.cloud.couchbase.com"
      bucketName := "Couchbase_Cloud_Bucket"
      cluster, err := gocb.Connect("couchbases://" + endpoint + "?ssl=no_verify")
      if err != nil

      { fmt.Println(err) os.Exit(1) }
      username := "manirahul"
      password := "Welcome!2020"
      _ = cluster.Authenticate(gocb.PasswordAuthenticator{ Username: username, Password: password, })
      _, err = cluster.OpenBucket(bucketName, "")
      if err != nil { fmt.Println(err) os.Exit(1) }

      fmt.Println("Connected..")
      This works with Golang SDK 2.0

      Error is

      panic: failed to connect to any of the specified hosts

       

      Attachments

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

        Activity

          People

            charles.dixon Charles Dixon
            rahul.mani Rahul Mani (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty