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

[BP 5.5.4]- Nil error access seg fault error

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 5.5.4
    • 5.5.0, 5.5.1, 5.5.2, 5.5.3
    • XDCR
    • 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-33675
          # Subject Branch Project Status CR V

          Activity

            People

              neil.huang Neil Huang
              neil.huang Neil Huang
              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