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

[BP 6.0.2] - Nil error access seg fault error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 6.0.2
    • 6.0.0, 6.0.1
    • XDCR
    • None
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty