This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new ea1228a30a [ISSUE #8966] Feat: add remote address information to acl 
perm error
ea1228a30a is described below

commit ea1228a30ad4d12259a653585eb73ec12e3374b1
Author: Humkum <1109939...@qq.com>
AuthorDate: Mon Dec 2 10:04:17 2024 +0800

    [ISSUE #8966] Feat: add remote address information to acl perm error
---
 .../org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
 
b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
index b0c7099b9d..3d4e62f943 100644
--- 
a/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
+++ 
b/remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingAbstract.java
@@ -320,9 +320,10 @@ public abstract class NettyRemotingAbstract {
         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) {
@@ -359,7 +360,7 @@ public abstract class NettyRemotingAbstract {
                 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()) {

Reply via email to