Skip to content

Commit

Permalink
[ISSUE #8966] Feat: add remote address information to acl perm error
Browse files Browse the repository at this point in the history
  • Loading branch information
humkum authored Dec 2, 2024
1 parent 93d7e80 commit ea1228a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,10 @@ private Runnable buildProcessRequestHandler(ChannelHandlerContext ctx, RemotingC
return () -> {
Exception exception = null;
RemotingCommand response;
String remoteAddr = null;

try {
String remoteAddr = RemotingHelper.parseChannelRemoteAddr(ctx.channel());
remoteAddr = RemotingHelper.parseChannelRemoteAddr(ctx.channel());
try {
doBeforeRpcHooks(remoteAddr, cmd);
} catch (AbortProcessException e) {
Expand Down Expand Up @@ -359,7 +360,7 @@ private Runnable buildProcessRequestHandler(ChannelHandlerContext ctx, RemotingC
response.setOpaque(opaque);
writeResponse(ctx.channel(), cmd, response);
} catch (Throwable e) {
log.error("process request exception", e);
log.error("process request exception, remoteAddr: {}", remoteAddr, e);
log.error(cmd.toString());

if (!cmd.isOnewayRPC()) {
Expand Down

0 comments on commit ea1228a

Please sign in to comment.