Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-27339 Improve sasl connection failure log message to include server #4823

Merged
merged 3 commits into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public Object run() throws IOException, InterruptedException {
// A provider which failed authentication, but doesn't have the ability to relogin with
// some external system (e.g. username/password, the password either works or it doesn't)
if (!provider.canRetry()) {
LOG.warn("Exception encountered while connecting to the server : " + ex);
LOG.warn("Exception encountered while connecting to the server " + remoteId.getAddress(), ex);
if (ex instanceof RemoteException) {
throw (RemoteException) ex;
}
Expand All @@ -410,7 +410,7 @@ public Object run() throws IOException, InterruptedException {
// Other providers, like kerberos, could request a new ticket from a keytab. Let
// them try again.
if (currRetries < maxRetries) {
LOG.debug("Exception encountered while connecting to the server", ex);
LOG.debug("Exception encountered while connecting to the server " + remoteId.getAddress(), ex);

// Invoke the provider to perform the relogin
provider.relogin();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ private void succeed(Channel ch) throws IOException {
}

private void fail(Channel ch, Throwable error) {
failInit(ch, toIOE(error));
IOException ex = toIOE(error);
LOG.warn("Exception encountered while connecting to the server " + remoteId.getAddress(), ex);
failInit(ch, ex);
rpcClient.failedServers.addToFailedServers(remoteId.getAddress(), error);
}

Expand Down