You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2023/01/03 07:04:31 UTC

[dubbo] branch 3.1 updated: Merge error code 3-3 to 3-8, 6-4 to 99-0. (#11225)

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

albumenj pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new 34168e6d0e Merge error code 3-3 to 3-8, 6-4 to 99-0. (#11225)
34168e6d0e is described below

commit 34168e6d0e1bff11f433a7bca99686481c43dd18
Author: Andy Cheung <mi...@msn.cn>
AuthorDate: Tue Jan 3 15:03:55 2023 +0800

    Merge error code 3-3 to 3-8, 6-4 to 99-0. (#11225)
    
    * Replace LoggerCodeConstants.java with 3.2 branch.
    
    * Add hints in the constant file.
    
    * Add hints in the constant file. (2)
    
    * Merge 3-3 to 3-8.
    
    * 6-4 -> 99-0.
    
    * 6-4 -> 99-0.
    
    * 6-4 -> 99-0.
    
    * 6-4 -> 99-0. (4)
    
    * 6-4 -> 99-0. (5, Compatible)
    
    * Change AbstractH2TransportListener's error code per @EarthChen's request.
---
 .../common/constants/LoggerCodeConstants.java      | 41 ++++++++++++++++++----
 .../config/deploy/DefaultApplicationDeployer.java  |  4 +--
 .../annotation/ServiceAnnotationPostProcessor.java |  2 +-
 .../dubbo/remoting/api/ConnectionHandler.java      |  4 +--
 .../dubbo/remoting/api/SslClientTlsHandler.java    |  4 +--
 .../dubbo/remoting/api/SslServerTlsHandler.java    |  6 ++--
 .../support/header/HeaderExchangeServer.java       |  4 +--
 .../support/header/ReconnectTimerTask.java         |  4 +--
 .../dubbo/remoting/transport/AbstractEndpoint.java |  6 ++--
 .../dubbo/remoting/transport/AbstractServer.java   | 14 ++++----
 .../transport/ChannelHandlerDispatcher.java        | 12 +++----
 .../remoting/transport/MultiMessageHandler.java    |  6 ++--
 .../transport/dispatcher/ChannelEventRunnable.java | 14 ++++----
 .../remoting/transport/netty/NettyHelper.java      | 11 +++---
 .../netty4/NettyPortUnificationServerHandler.java  |  6 ++--
 .../rpc/proxy/javassist/JavassistProxyFactory.java | 14 ++++----
 .../tri/transport/AbstractH2TransportListener.java |  8 +++--
 17 files changed, 97 insertions(+), 63 deletions(-)

diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
index ef4be3c1a6..f033d3941a 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/LoggerCodeConstants.java
@@ -18,7 +18,20 @@
 package org.apache.dubbo.common.constants;
 
 /**
- * Constants of Error codes used in logger.
+ * <p>Constants of Error Codes used in logger.
+ *
+ * <p>Format: <i>[Category]-[Code]</i>, where:
+ * <li>[Category] is the category code which identifies the module.
+ * <li>[Code] is the detailed code.
+ * <li>Every blanks should be filled with positive number.
+ *
+ * <br /><br />
+ * <p>Hint:
+ * <li>Synchronize this file across different branches. (Use merge and cherry-pick.)
+ * <li>Double-check the usage in different branches before deleting any of the error code.
+ * <li>If applicable, use error code that already appears in this file.
+ * <li>If it's required to add an error code, find an error code that's marked by 'Absent', and rename it. (so that no code is wasted)
+ * <li>Update the corresponding file in dubbo-website repository.
  */
 public interface LoggerCodeConstants {
 
@@ -75,8 +88,10 @@ public interface LoggerCodeConstants {
 
     String COMMON_METADATA_PROCESSOR = "0-26";
 
+    String COMMON_ISOLATED_EXECUTOR_CONFIGURATION_ERROR = "0-27";
+
     // Registry module
-    
+
     String REGISTRY_ADDRESS_INVALID = "1-1";
 
     /**
@@ -170,7 +185,11 @@ public interface LoggerCodeConstants {
 
     String REGISTRY_FAILED_LOAD_METADATA = "1-39";
 
-    // Cluster module
+    String REGISTRY_ROUTER_WAIT_LONG = "1-40";
+
+    String REGISTRY_ISTIO_EXCEPTION = "1-41";
+
+    // Cluster module 2-x
     String CLUSTER_FAILED_SITE_SELECTION = "2-1";
 
     String CLUSTER_NO_VALID_PROVIDER = "2-2";
@@ -211,12 +230,15 @@ public interface LoggerCodeConstants {
 
     String CLUSTER_FAILED_GROUP_MERGE = "2-20";
 
-    // Proxy module.
+    // Proxy module. 3-1
     String PROXY_FAILED_CONVERT_URL = "3-1";
 
     String PROXY_FAILED_EXPORT_SERVICE = "3-2";
 
-    String PROXY_FAILED_JAVASSIST = "3-3";
+    /**
+     * Absent. Merged with 3-8.
+     */
+    String PROXY_33 = "3-3";
 
     String PROXY_TIMEOUT_REQUEST = "3-4";
 
@@ -226,6 +248,8 @@ public interface LoggerCodeConstants {
 
     String PROXY_TIMEOUT_RESPONSE = "3-7";
 
+    String PROXY_FAILED = "3-8";
+
     // Protocol module.
     String PROTOCOL_UNSUPPORTED = "4-1";
 
@@ -311,7 +335,7 @@ public interface LoggerCodeConstants {
 
     String CONFIG_STOP_DUBBO_ERROR = "5-20";
 
-    String CONFIG_FAILED_EXECUTE_DESTORY = "5-21";
+    String CONFIG_FAILED_EXECUTE_DESTROY = "5-21";
 
     String CONFIG_FAILED_INIT_CONFIG_CENTER = "5-22";
 
@@ -358,6 +382,9 @@ public interface LoggerCodeConstants {
 
     String TRANSPORT_FAILED_CLOSE = "6-3";
 
+    /**
+     * Absent. Merged to 99-0.
+     */
     String TRANSPORT_UNEXPECTED_EXCEPTION = "6-4";
 
     String TRANSPORT_FAILED_DISCONNECT_PROVIDER = "6-5";
@@ -397,6 +424,8 @@ public interface LoggerCodeConstants {
 
     String QOS_UNEXPECTED_EXCEPTION = "7-6";
 
+    String QOS_PERMISSION_DENY_EXCEPTION = "7-7";
+
     // Testing module (8[X], where [X] is number of the module to be tested.)
     String TESTING_REGISTRY_FAILED_TO_START_ZOOKEEPER = "81-1";
 
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
index 3411789c09..94d4d94ed4 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/deploy/DefaultApplicationDeployer.java
@@ -76,7 +76,7 @@ import static java.lang.String.format;
 import static org.apache.dubbo.common.config.ConfigurationUtils.parseProperties;
 import static org.apache.dubbo.common.constants.CommonConstants.REGISTRY_SPLIT_PATTERN;
 import static org.apache.dubbo.common.constants.CommonConstants.REMOTE_METADATA_STORAGE_TYPE;
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.CONFIG_FAILED_EXECUTE_DESTORY;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.CONFIG_FAILED_EXECUTE_DESTROY;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.CONFIG_FAILED_INIT_CONFIG_CENTER;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.CONFIG_FAILED_START_MODEL;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.CONFIG_REFRESH_INSTANCE_ERROR;
@@ -1063,7 +1063,7 @@ public class DefaultApplicationDeployer extends AbstractDeployer<ApplicationMode
             try {
                 serviceDiscovery.destroy();
             } catch (Throwable ignored) {
-                logger.warn(CONFIG_FAILED_EXECUTE_DESTORY, "", "", ignored.getMessage(), ignored);
+                logger.warn(CONFIG_FAILED_EXECUTE_DESTROY, "", "", ignored.getMessage(), ignored);
             }
         });
         if (logger.isDebugEnabled()) {
diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java
index 4f9b3342e4..4a7cb9ad84 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/ServiceAnnotationPostProcessor.java
@@ -401,7 +401,7 @@ public class ServiceAnnotationPostProcessor implements BeanDefinitionRegistryPos
     }
 
     private Set<String> resolvePackagesToScan(Set<String> packagesToScan) {
-        Set<String> resolvedPackagesToScan = new LinkedHashSet<String>(packagesToScan.size());
+        Set<String> resolvedPackagesToScan = new LinkedHashSet<>(packagesToScan.size());
         for (String packageToScan : packagesToScan) {
             if (StringUtils.hasText(packageToScan)) {
                 String resolvedPackageToScan = environment.resolvePlaceholders(packageToScan.trim());
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/ConnectionHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/ConnectionHandler.java
index 6f0baa6158..97cb908049 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/ConnectionHandler.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/ConnectionHandler.java
@@ -29,7 +29,7 @@ import io.netty.util.AttributeKey;
 
 import java.util.concurrent.TimeUnit;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 @ChannelHandler.Sharable
 public class ConnectionHandler extends ChannelInboundHandlerAdapter {
@@ -70,7 +70,7 @@ public class ConnectionHandler extends ChannelInboundHandlerAdapter {
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        log.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", String.format("Channel error:%s", ctx.channel()), cause);
+        log.warn(INTERNAL_ERROR, "unknown error in remoting module", "", String.format("Channel error:%s", ctx.channel()), cause);
         ctx.close();
     }
 
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslClientTlsHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslClientTlsHandler.java
index 5a7239c16a..2955827b9f 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslClientTlsHandler.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslClientTlsHandler.java
@@ -29,7 +29,7 @@ import io.netty.handler.ssl.SslHandshakeCompletionEvent;
 import javax.net.ssl.SSLEngine;
 import javax.net.ssl.SSLSession;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 
 public class SslClientTlsHandler extends ChannelInboundHandlerAdapter {
@@ -61,7 +61,7 @@ public class SslClientTlsHandler extends ChannelInboundHandlerAdapter {
                 logger.info("TLS negotiation succeed with session: " + session);
                 ctx.pipeline().remove(this);
             } else {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "TLS negotiation failed when trying to accept new connection.", handshakeEvent.cause());
+                logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", "TLS negotiation failed when trying to accept new connection.", handshakeEvent.cause());
                 ctx.fireExceptionCaught(handshakeEvent.cause());
             }
         }
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslServerTlsHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslServerTlsHandler.java
index ee926f06d6..94be77a933 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslServerTlsHandler.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/SslServerTlsHandler.java
@@ -31,7 +31,7 @@ import io.netty.handler.ssl.SslHandshakeCompletionEvent;
 import javax.net.ssl.SSLSession;
 import java.util.List;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 public class SslServerTlsHandler extends ByteToMessageDecoder {
     private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(SslServerTlsHandler.class);
@@ -59,7 +59,7 @@ public class SslServerTlsHandler extends ByteToMessageDecoder {
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "TLS negotiation failed when trying to accept new connection.", cause);
+        logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", "TLS negotiation failed when trying to accept new connection.", cause);
     }
 
     @Override
@@ -72,7 +72,7 @@ public class SslServerTlsHandler extends ByteToMessageDecoder {
                 // Remove after handshake success.
                 ctx.pipeline().remove(this);
             } else {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "TLS negotiation failed when trying to accept new connection.", handshakeEvent.cause());
+                logger.error(INTERNAL_ERROR, "", "", "TLS negotiation failed when trying to accept new connection.", handshakeEvent.cause());
                 ctx.close();
             }
         }
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java
index aab03f6f44..25d2370d4f 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java
@@ -46,7 +46,7 @@ import static java.util.Collections.unmodifiableCollection;
 import static org.apache.dubbo.common.constants.CommonConstants.READONLY_EVENT;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_FAILED_CLOSE;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_FAILED_RESPONSE;
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 import static org.apache.dubbo.remoting.Constants.HEARTBEAT_CHECK_TICK;
 import static org.apache.dubbo.remoting.Constants.LEAST_HEARTBEAT_DURATION;
 import static org.apache.dubbo.remoting.Constants.TICKS_PER_WHEEL;
@@ -221,7 +221,7 @@ public class HeaderExchangeServer implements ExchangeServer {
                 startIdleCheckTask(url);
             }
         } catch (Throwable t) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+            logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
         }
     }
 
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/ReconnectTimerTask.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/ReconnectTimerTask.java
index 9306f3aaf1..54a035b764 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/ReconnectTimerTask.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/ReconnectTimerTask.java
@@ -23,7 +23,7 @@ import org.apache.dubbo.remoting.Channel;
 import org.apache.dubbo.remoting.Client;
 
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_FAILED_RECONNECT;
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 /**
  * ReconnectTimerTask
@@ -64,7 +64,7 @@ public class ReconnectTimerTask extends AbstractTimerTask {
                 }
             }
         } catch (Throwable t) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "Exception when reconnect to remote channel " + channel.getRemoteAddress(), t);
+            logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "Exception when reconnect to remote channel " + channel.getRemoteAddress(), t);
         }
     }
 }
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractEndpoint.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractEndpoint.java
index ed4004bdd1..16b57f1204 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractEndpoint.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractEndpoint.java
@@ -28,7 +28,7 @@ import org.apache.dubbo.remoting.Constants;
 import org.apache.dubbo.remoting.transport.codec.CodecAdapter;
 import org.apache.dubbo.rpc.model.FrameworkModel;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 import static org.apache.dubbo.rpc.model.ScopeModelUtil.getFrameworkModel;
 
 /**
@@ -80,7 +80,7 @@ public abstract class AbstractEndpoint extends AbstractPeer implements Resetable
                 }
             }
         } catch (Throwable t) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+            logger.error(INTERNAL_ERROR, "", "", t.getMessage(), t);
         }
 
         try {
@@ -88,7 +88,7 @@ public abstract class AbstractEndpoint extends AbstractPeer implements Resetable
                 this.codec = getChannelCodec(url);
             }
         } catch (Throwable t) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+            logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
         }
     }
 
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractServer.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractServer.java
index 0c0aad37bb..0a27e256f2 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractServer.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractServer.java
@@ -36,7 +36,7 @@ import java.util.concurrent.ExecutorService;
 
 import static org.apache.dubbo.common.constants.CommonConstants.ANYHOST_KEY;
 import static org.apache.dubbo.common.constants.CommonConstants.ANYHOST_VALUE;
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 import static org.apache.dubbo.remoting.Constants.ACCEPTS_KEY;
 import static org.apache.dubbo.remoting.Constants.DEFAULT_ACCEPTS;
 
@@ -96,7 +96,7 @@ public abstract class AbstractServer extends AbstractEndpoint implements Remotin
                 }
             }
         } catch (Throwable t) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+            logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
         }
 
         ExecutorService executor = executorRepository.createExecutorIfAbsent(url);
@@ -128,13 +128,13 @@ public abstract class AbstractServer extends AbstractEndpoint implements Remotin
         try {
             super.close();
         } catch (Throwable e) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", e.getMessage(), e);
+            logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", e.getMessage(), e);
         }
 
         try {
             doClose();
         } catch (Throwable e) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", e.getMessage(), e);
+            logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", e.getMessage(), e);
         }
     }
 
@@ -163,13 +163,13 @@ public abstract class AbstractServer extends AbstractEndpoint implements Remotin
     public void connected(Channel ch) throws RemotingException {
         // If the server has entered the shutdown process, reject any new connection
         if (this.isClosing() || this.isClosed()) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "Close new channel " + ch + ", cause: server is closing or has been closed. For example, receive a new connect request while in shutdown process.");
+            logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "Close new channel " + ch + ", cause: server is closing or has been closed. For example, receive a new connect request while in shutdown process.");
             ch.close();
             return;
         }
 
         if (accepts > 0 && getChannels().size() > accepts) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "Close channel " + ch + ", cause: The server " + ch.getLocalAddress() + " connections greater than max config " + accepts);
+            logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", "Close channel " + ch + ", cause: The server " + ch.getLocalAddress() + " connections greater than max config " + accepts);
             ch.close();
             return;
         }
@@ -180,7 +180,7 @@ public abstract class AbstractServer extends AbstractEndpoint implements Remotin
     public void disconnected(Channel ch) throws RemotingException {
         Collection<Channel> channels = getChannels();
         if (channels.isEmpty()) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "All clients has disconnected from " + ch.getLocalAddress() + ". You can graceful shutdown now.");
+            logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "All clients has disconnected from " + ch.getLocalAddress() + ". You can graceful shutdown now.");
         }
         super.disconnected(ch);
     }
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/ChannelHandlerDispatcher.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/ChannelHandlerDispatcher.java
index f425eb3ce0..c0dc2b2f84 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/ChannelHandlerDispatcher.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/ChannelHandlerDispatcher.java
@@ -26,7 +26,7 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.concurrent.CopyOnWriteArraySet;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 /**
  * ChannelListenerDispatcher
@@ -70,7 +70,7 @@ public class ChannelHandlerDispatcher implements ChannelHandler {
             try {
                 listener.connected(channel);
             } catch (Throwable t) {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+                logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
             }
         }
     }
@@ -81,7 +81,7 @@ public class ChannelHandlerDispatcher implements ChannelHandler {
             try {
                 listener.disconnected(channel);
             } catch (Throwable t) {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+                logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
             }
         }
     }
@@ -92,7 +92,7 @@ public class ChannelHandlerDispatcher implements ChannelHandler {
             try {
                 listener.sent(channel, message);
             } catch (Throwable t) {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+                logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
             }
         }
     }
@@ -103,7 +103,7 @@ public class ChannelHandlerDispatcher implements ChannelHandler {
             try {
                 listener.received(channel, message);
             } catch (Throwable t) {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+                logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
             }
         }
     }
@@ -114,7 +114,7 @@ public class ChannelHandlerDispatcher implements ChannelHandler {
             try {
                 listener.caught(channel, exception);
             } catch (Throwable t) {
-                logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", t.getMessage(), t);
+                logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", t.getMessage(), t);
             }
         }
     }
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/MultiMessageHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/MultiMessageHandler.java
index 7d65fdd757..0e78bb06b0 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/MultiMessageHandler.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/MultiMessageHandler.java
@@ -23,7 +23,7 @@ import org.apache.dubbo.remoting.ChannelHandler;
 import org.apache.dubbo.remoting.RemotingException;
 import org.apache.dubbo.remoting.exchange.support.MultiMessage;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 /**
  * @see MultiMessage
@@ -45,11 +45,11 @@ public class MultiMessageHandler extends AbstractChannelHandlerDelegate {
                 try {
                     handler.received(channel, obj);
                 } catch (Throwable t) {
-                    logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "MultiMessageHandler received fail.", t);
+                    logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", "MultiMessageHandler received fail.", t);
                     try {
                         handler.caught(channel, t);
                     } catch (Throwable t1) {
-                        logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "MultiMessageHandler caught fail.", t1);
+                        logger.error(INTERNAL_ERROR, "unknown error in remoting module", "", "MultiMessageHandler caught fail.", t1);
                     }
                 }
             }
diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/ChannelEventRunnable.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/ChannelEventRunnable.java
index 9af07d3b38..a250d05bf7 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/ChannelEventRunnable.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/dispatcher/ChannelEventRunnable.java
@@ -22,7 +22,7 @@ import org.apache.dubbo.common.threadlocal.InternalThreadLocal;
 import org.apache.dubbo.remoting.Channel;
 import org.apache.dubbo.remoting.ChannelHandler;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 public class ChannelEventRunnable implements Runnable {
     private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(ChannelEventRunnable.class);
@@ -60,7 +60,7 @@ public class ChannelEventRunnable implements Runnable {
             try {
                 handler.received(channel, message);
             } catch (Exception e) {
-                logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
+                logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
                     + ", message is " + message, e);
             }
         } else {
@@ -69,21 +69,21 @@ public class ChannelEventRunnable implements Runnable {
                     try {
                         handler.connected(channel);
                     } catch (Exception e) {
-                        logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel, e);
+                        logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel, e);
                     }
                     break;
                 case DISCONNECTED:
                     try {
                         handler.disconnected(channel);
                     } catch (Exception e) {
-                        logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel, e);
+                        logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel, e);
                     }
                     break;
                 case SENT:
                     try {
                         handler.sent(channel, message);
                     } catch (Exception e) {
-                        logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
+                        logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
                             + ", message is " + message, e);
                     }
                     break;
@@ -91,12 +91,12 @@ public class ChannelEventRunnable implements Runnable {
                     try {
                         handler.caught(channel, exception);
                     } catch (Exception e) {
-                        logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
+                        logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "ChannelEventRunnable handle " + state + " operation error, channel is " + channel
                             + ", message is: " + message + ", exception is " + exception, e);
                     }
                     break;
                 default:
-                    logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "unknown state: " + state + ", message is " + message);
+                    logger.warn(INTERNAL_ERROR, "unknown error in remoting module", "", "unknown state: " + state + ", message is " + message);
             }
         }
         InternalThreadLocal.removeAll();
diff --git a/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHelper.java b/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHelper.java
index bfe8cafd8a..f7f70bfecd 100644
--- a/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHelper.java
+++ b/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHelper.java
@@ -23,7 +23,7 @@ import org.jboss.netty.logging.AbstractInternalLogger;
 import org.jboss.netty.logging.InternalLogger;
 import org.jboss.netty.logging.InternalLoggerFactory;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 final class NettyHelper {
 
@@ -44,6 +44,7 @@ final class NettyHelper {
 
     static class DubboLogger extends AbstractInternalLogger {
 
+        public static final String LOGGER_CAUSE_STRING = "unknown error in remoting-netty module";
         private ErrorTypeAwareLogger logger;
 
         DubboLogger(ErrorTypeAwareLogger logger) {
@@ -92,22 +93,22 @@ final class NettyHelper {
 
         @Override
         public void warn(String msg) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", msg);
+            logger.warn(INTERNAL_ERROR, LOGGER_CAUSE_STRING, "", msg);
         }
 
         @Override
         public void warn(String msg, Throwable cause) {
-            logger.warn(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", msg, cause);
+            logger.warn(INTERNAL_ERROR, LOGGER_CAUSE_STRING, "", msg, cause);
         }
 
         @Override
         public void error(String msg) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", msg);
+            logger.error(INTERNAL_ERROR, LOGGER_CAUSE_STRING, "", msg);
         }
 
         @Override
         public void error(String msg, Throwable cause) {
-            logger.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", msg, cause);
+            logger.error(INTERNAL_ERROR, LOGGER_CAUSE_STRING, "", msg, cause);
         }
 
         @Override
diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyPortUnificationServerHandler.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyPortUnificationServerHandler.java
index 338f3572d1..c48372865e 100644
--- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyPortUnificationServerHandler.java
+++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyPortUnificationServerHandler.java
@@ -39,7 +39,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_UNEXPECTED_EXCEPTION;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 
 public class NettyPortUnificationServerHandler extends ByteToMessageDecoder {
 
@@ -71,7 +71,7 @@ public class NettyPortUnificationServerHandler extends ByteToMessageDecoder {
 
     @Override
     public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
-        LOGGER.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", "Unexpected exception from downstream before protocol detected.", cause);
+        LOGGER.error(INTERNAL_ERROR, "unknown error in remoting module", "", "Unexpected exception from downstream before protocol detected.", cause);
     }
 
     @Override
@@ -125,7 +125,7 @@ public class NettyPortUnificationServerHandler extends ByteToMessageDecoder {
             Set<String> supported = url.getApplicationModel()
                 .getExtensionLoader(WireProtocol.class)
                 .getSupportedExtensions();
-            LOGGER.error(TRANSPORT_UNEXPECTED_EXCEPTION, "", "", String.format("Can not recognize protocol from downstream=%s . "
+            LOGGER.error(INTERNAL_ERROR, "unknown error in remoting module", "", String.format("Can not recognize protocol from downstream=%s . "
                     + "preface=%s protocols=%s", ctx.channel().remoteAddress(),
                 Bytes.bytes2hex(preface),
                 supported));
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/javassist/JavassistProxyFactory.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/javassist/JavassistProxyFactory.java
index 8755a75cca..4d341b2ec9 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/javassist/JavassistProxyFactory.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/proxy/javassist/JavassistProxyFactory.java
@@ -29,7 +29,7 @@ import org.apache.dubbo.rpc.proxy.jdk.JdkProxyFactory;
 
 import java.util.Arrays;
 
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROXY_FAILED_JAVASSIST;
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROXY_FAILED;
 
 /**
  * JavassistRpcProxyFactory
@@ -47,13 +47,13 @@ public class JavassistProxyFactory extends AbstractProxyFactory {
             // try fall back to JDK proxy factory
             try {
                 T proxy = jdkProxyFactory.getProxy(invoker, interfaces);
-                logger.error(PROXY_FAILED_JAVASSIST, "", "", "Failed to generate proxy by Javassist failed. Fallback to use JDK proxy success. " +
+                logger.error(PROXY_FAILED, "", "", "Failed to generate proxy by Javassist failed. Fallback to use JDK proxy success. " +
                     "Interfaces: " + Arrays.toString(interfaces), fromJavassist);
                 return proxy;
             } catch (Throwable fromJdk) {
-                logger.error(PROXY_FAILED_JAVASSIST, "", "", "Failed to generate proxy by Javassist failed. Fallback to use JDK proxy is also failed. " +
+                logger.error(PROXY_FAILED, "", "", "Failed to generate proxy by Javassist failed. Fallback to use JDK proxy is also failed. " +
                     "Interfaces: " + Arrays.toString(interfaces) + " Javassist Error.", fromJavassist);
-                logger.error(PROXY_FAILED_JAVASSIST, "", "", "Failed to generate proxy by Javassist failed. Fallback to use JDK proxy is also failed. " +
+                logger.error(PROXY_FAILED, "", "", "Failed to generate proxy by Javassist failed. Fallback to use JDK proxy is also failed. " +
                     "Interfaces: " + Arrays.toString(interfaces) + " JDK Error.", fromJdk);
                 throw fromJavassist;
             }
@@ -77,14 +77,14 @@ public class JavassistProxyFactory extends AbstractProxyFactory {
             // try fall back to JDK proxy factory
             try {
                 Invoker<T> invoker = jdkProxyFactory.getInvoker(proxy, type, url);
-                logger.error(PROXY_FAILED_JAVASSIST, "", "", "Failed to generate invoker by Javassist failed. Fallback to use JDK proxy success. " +
+                logger.error(PROXY_FAILED, "", "", "Failed to generate invoker by Javassist failed. Fallback to use JDK proxy success. " +
                     "Interfaces: " + type, fromJavassist);
                 // log out error
                 return invoker;
             } catch (Throwable fromJdk) {
-                logger.error(PROXY_FAILED_JAVASSIST, "", "", "Failed to generate invoker by Javassist failed. Fallback to use JDK proxy is also failed. " +
+                logger.error(PROXY_FAILED, "", "", "Failed to generate invoker by Javassist failed. Fallback to use JDK proxy is also failed. " +
                     "Interfaces: " + type + " Javassist Error.", fromJavassist);
-                logger.error(PROXY_FAILED_JAVASSIST, "", "", "Failed to generate invoker by Javassist failed. Fallback to use JDK proxy is also failed. " +
+                logger.error(PROXY_FAILED, "", "", "Failed to generate invoker by Javassist failed. Fallback to use JDK proxy is also failed. " +
                     "Interfaces: " + type + " JDK Error.", fromJdk);
                 throw fromJavassist;
             }
diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/AbstractH2TransportListener.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/AbstractH2TransportListener.java
index f4732bb87c..110e0472f5 100644
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/AbstractH2TransportListener.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/transport/AbstractH2TransportListener.java
@@ -32,6 +32,7 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.function.Supplier;
 
+import static org.apache.dubbo.common.constants.LoggerCodeConstants.INTERNAL_ERROR;
 import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_FAILED_PARSE;
 
 public abstract class AbstractH2TransportListener implements H2TransportListener {
@@ -66,7 +67,7 @@ public abstract class AbstractH2TransportListener implements H2TransportListener
             }
         }
 
-        // try convert upper key
+        // try converting upper key
         Object obj = convertUpperHeaderSupplier.get();
         if (obj == null) {
             return attachments;
@@ -81,7 +82,10 @@ public abstract class AbstractH2TransportListener implements H2TransportListener
                 }
             }
         } else {
-            LOGGER.error(PROTOCOL_FAILED_PARSE, "", "", "Triple convertNoLowerCaseHeader error, obj is not String");
+            // If convertUpperHeaderSupplier does not return String, just fail...
+            // Internal invocation, use INTERNAL_ERROR instead.
+
+            LOGGER.error(INTERNAL_ERROR, "wrong internal invocation", "", "Triple convertNoLowerCaseHeader error, obj is not String");
         }
         return attachments;
     }