Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-30389

Nil error access seg fault error

    XMLWordPrintable

Details

    • Untriaged
    • No

    Description

      It is possible that the "err" in the following method is not nil. In which case, the "wrapAsInvalidRemoteClusterError" would cause a nil pointer exception.

      func (service *RemoteClusterService) formErrorFromValidatingRemotehost(ref *metadata.RemoteClusterReference, hostName string, port uint16, err error) error {
      	if !ref.IsEncryptionEnabled() {
      		// if encryption is not on, most likely the error is caused by incorrect hostname or firewall.
      		return wrapAsInvalidRemoteClusterError(fmt.Sprintf("Could not connect to \"%v\" on port %v. This could be due to an incorrect host/port combination or a firewall in place between the servers.", hostName, port))
      	} else {
      		// if encryption is on, several different errors could be returned here, e.g., invalid hostname, invalid certificate, certificate by unknown authority, etc.
      		// just return the err
      		return wrapAsInvalidRemoteClusterError(err.Error())
      	}
      }
      

      Attachments

        Issue Links

          For Gerrit Dashboard: MB-30389
          # Subject Branch Project Status CR V

          Activity

            People

              pavithra.mahamani Pavithra Mahamani (Inactive)
              neil.huang Neil Huang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty