You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/12/21 00:56:54 UTC
[pulsar] 08/15: Add error log when new jetty client (#12840)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 1d58b1fd86d79408e543d5d8df3996fd6e1156d7
Author: ZhangJian He <sh...@gmail.com>
AuthorDate: Thu Nov 18 16:05:23 2021 +0800
Add error log when new jetty client (#12840)
(cherry picked from commit c18063f44684052ef07f0259084743a7a45e5656)
---
.../java/org/apache/pulsar/proxy/server/AdminProxyHandler.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java
index 13f9372..7d3c658 100644
--- a/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java
+++ b/pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/AdminProxyHandler.java
@@ -256,7 +256,7 @@ class AdminProxyHandler extends ProxyServlet {
if (config.isTlsEnabledWithBroker()) {
try {
- X509Certificate trustCertificates[] = SecurityUtility
+ X509Certificate[] trustCertificates = SecurityUtility
.loadCertificatesFromPemFile(config.getBrokerClientTrustCertsFilePath());
SSLContext sslCtx;
@@ -281,6 +281,7 @@ class AdminProxyHandler extends ProxyServlet {
return new JettyHttpClient(contextFactory);
} catch (Exception e) {
+ LOG.error("new jetty http client exception ", e);
try {
auth.close();
} catch (IOException ioe) {
@@ -303,7 +304,7 @@ class AdminProxyHandler extends ProxyServlet {
boolean isFunctionsRestRequest = false;
String requestUri = request.getRequestURI();
- for (String routePrefix: functionRoutes) {
+ for (String routePrefix : functionRoutes) {
if (requestUri.startsWith(routePrefix)) {
isFunctionsRestRequest = true;
break;
@@ -324,7 +325,7 @@ class AdminProxyHandler extends ProxyServlet {
if (LOG.isDebugEnabled()) {
LOG.debug("[{}:{}] Selected active broker is {}", request.getRemoteAddr(), request.getRemotePort(),
- url.toString());
+ url);
}
} catch (Exception e) {
LOG.warn("[{}:{}] Failed to get next active broker {}", request.getRemoteAddr(),