[ https://issues.apache.org/jira/browse/LOG4J2-3439?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jayesh Netravali closed LOG4J2-3439. ------------------------------------ Closing as this is working as expected. > log4j2 Spring Cloud config integration with MTLS gives NullPointerException > --------------------------------------------------------------------------- > > Key: LOG4J2-3439 > URL: https://issues.apache.org/jira/browse/LOG4J2-3439 > Project: Log4j 2 > Issue Type: Bug > Reporter: Jayesh Netravali > Assignee: Piotr Karwasz > Priority: Major > Fix For: 2.17.3 > > Attachments: log4j-core-stacktrace.txt > > > 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 -- This message was sent by Atlassian Jira (v8.20.1#820001)