[ACS-5805] Split configuration for Transform and Shared File Store (#2142)

* [ACS-5805] Split configuration for Transform and Shared File Store and create common switch for MTLS.

* [ACS-5805] Add explicit error logging.
This commit is contained in:
Kacper Magdziarz
2023-08-17 14:08:23 +02:00
committed by GitHub
parent 6c9c1671f8
commit 6d33166e24
2 changed files with 14 additions and 1 deletions

View File

@@ -44,6 +44,7 @@ import org.apache.http.StatusLine;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
@@ -198,6 +199,7 @@ public class RemoteTransformerClient
// In the case of transform requests, unlike version checks, it is only the failure to connect that
// forces a wait before trying again.
connectionFailed();
logHttpClientTimeoutException(e, logger);
throw new AlfrescoRuntimeException(name + " failed to connect or to read the response", e);
}
}
@@ -216,6 +218,14 @@ public class RemoteTransformerClient
}
}
private void logHttpClientTimeoutException(IOException e, Log logger)
{
if (e instanceof ConnectTimeoutException)
{
logger.error(e.getMessage());
}
}
/**
* Indicates if a remote transform:
* a) ready probe has ever indicated success {@code new Pair<>(true, <version string>)},

View File

@@ -750,8 +750,11 @@ encryption.ssl.truststore.type=JCEKS
encryption.ssl.truststore.keyMetaData.location=
## HttpClient config for Transform Service
#Transform Service and Shared File Store should have common switch for MTLS.
httpclient.config.transformServices.mTLSEnabled=false
#enable mtls in HttpClientFactory for Transform Service.
httpclient.config.transform.mTLSEnabled=false
httpclient.config.transform.mTLSEnabled=${httpclient.config.transformServices.mTLSEnabled}
httpclient.config.transform.maxTotalConnections=20
httpclient.config.transform.maxHostConnections=20