diff --git a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java index 9a3a56afe8e234601c6cd2d92a8855713e05fc4b..8891bd322e3f05128ba1d983be1fa05348fd366c 100644 --- a/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java +++ b/broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java @@ -406,6 +406,7 @@ public class BrokerController { @Override public void onChanged(String path) { if (path.equals(TlsSystemConfig.tlsServerTrustCertPath)) { + log.info("The trust certificate changed, reload the ssl context"); reloadServerSslContext(); } if (path.equals(TlsSystemConfig.tlsServerCertPath)) { @@ -415,8 +416,8 @@ public class BrokerController { keyChanged = true; } if (certChanged && keyChanged) { - certChanged = false; - keyChanged = false; + log.info("The certificate and private key changed, reload the ssl context"); + certChanged = keyChanged = false; reloadServerSslContext(); } } diff --git a/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvController.java b/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvController.java index 844175c34f4a9a1d0421e81e562880cb778ee204..2ed599c11c49549ac556027e2b7896848af9f362 100644 --- a/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvController.java +++ b/namesrv/src/main/java/org/apache/rocketmq/namesrv/NamesrvController.java @@ -113,6 +113,7 @@ public class NamesrvController { @Override public void onChanged(String path) { if (path.equals(TlsSystemConfig.tlsServerTrustCertPath)) { + log.info("The trust certificate changed, reload the ssl context"); reloadServerSslContext(); } if (path.equals(TlsSystemConfig.tlsServerCertPath)) { @@ -122,8 +123,8 @@ public class NamesrvController { keyChanged = true; } if (certChanged && keyChanged) { - certChanged = false; - keyChanged = false; + log.info("The certificate and private key changed, reload the ssl context"); + certChanged = keyChanged = false; reloadServerSslContext(); } }