This is an automated email from the ASF dual-hosted git repository.
abhi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ranger.git
The following commit(s) were added to refs/heads/master by this push:
new a7bd1339f RANGER-5277: Ranger Audit to kerberized solr fails (#624)
a7bd1339f is described below
commit a7bd1339f390012b487f6b083656807e8ac4fab1
Author: Halim Kim <[email protected]>
AuthorDate: Sat Aug 9 04:23:18 2025 +0900
RANGER-5277: Ranger Audit to kerberized solr fails (#624)
---
.../org/apache/ranger/audit/destination/SolrAuditDestination.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git
a/agents-audit/dest-solr/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java
b/agents-audit/dest-solr/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java
index 4be6002e3..17e57571a 100644
---
a/agents-audit/dest-solr/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java
+++
b/agents-audit/dest-solr/src/main/java/org/apache/ranger/audit/destination/SolrAuditDestination.java
@@ -239,7 +239,8 @@ synchronized void connect() {
if (zkHosts != null && !zkHosts.isEmpty()) {
LOG.info("Connecting to solr cloud using zkHosts={}",
zkHosts);
- try (Krb5HttpClientBuilder krbBuild = new
Krb5HttpClientBuilder()) {
+ try {
+ Krb5HttpClientBuilder krbBuild = new
Krb5HttpClientBuilder();
SolrHttpClientBuilder kb = krbBuild.getBuilder();
HttpClientUtil.setHttpClientBuilder(kb);
@@ -255,7 +256,8 @@ synchronized void connect() {
LOG.error("Can't connect to Solr server.
ZooKeepers={}", zkHosts, t);
}
} else if (solrURLs != null && !solrURLs.isEmpty()) {
- try (Krb5HttpClientBuilder krbBuild = new
Krb5HttpClientBuilder()) {
+ try {
+ Krb5HttpClientBuilder krbBuild = new
Krb5HttpClientBuilder();
LOG.info("Connecting to Solr using URLs={}",
solrURLs);
SolrHttpClientBuilder kb = krbBuild.getBuilder();