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
- is a backport of
-
MB-30389 Nil error access seg fault error
- Closed