Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Hello
I am trying to use the log4j2 Spring cloud config integration capabilities and have been referring to the sample application on the github project https://github.com/apache/logging-log4j2/tree/release-2.x/log4j-spring-cloud-config/log4j-spring-cloud-config-samples When I try to configure a MTLS HTTPs URL of my cloud config server in the bootstrap.yaml of my client application which needs to fetch the log4j2.xml, I get a NPE in the
org.apache.logging.log4j.core.net.ssl.SslConfiguration.createSslContext(
final boolean loadDefaultKeyManagerFactory, final boolean loadDefaultTrustManagerFactory) method when the SSLContext.getInstance(this.protocol); is invoked. On debugging I see that the protocol being passed from the SslConfigurationFactory to the SslConfiguration is "https" which causes SSLContext.getInstance() to throw an exception and thus no sslContext is created. I have attached the stacktrace for your reference.
Below is my configuration. Please let me know if I am missing something.
logging:
config: https://localhost:8888/common/default/${CONFIG_SERVER_LABEL_ESCAPED}/log4j2.xml
log4j2:
debug: true
keyStoreLocation: file:///${HTTP_KEYSTORE_PATH}
keyStoreType: JKS
keyStorePassword: ${HTTP_KEYSTORE_PWD}
trustStoreLocation: file:///${HTTP_TRUSTSTORE_PATH}
trustStoreKeyStoreType: JKS
trustStorePassword: ${HTTP_TRUSTSTORE_PWD}
sslVerifyHostName: false
Attachments
Attachments
Issue Links
- links to