SslConfig is null when trying to capture logs using Syslog with TLS
Maintainer thường phản hồi trong vòng 1 ngày
@vy đang làm issue này rồi.
Từ ngày 16/2/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Description
Essentially, I am trying to test the sending of log messages using Syslog over TLS protocol. My tests work completely fine with TCP but break for a number of reasons (since we've upgraded from JDK17 -> 21). The trust store is being set programmatically along with the 'SSL' protocol. However, I encounter issues whereby you get NPE's for it being unable to initialise the SSL Configuration required.
With an SSL block it 'seems' to work, but that hasn't been required before and as per the log4j docs should still not be required as long as the system variables for the trustStore etc are being set before any appenders are created. Would greatly appreciate any assistance on this 🙇 .
Configuration
Version: 2.25.3
Operating system: Windows 11
JDK: JDK21
Logs
2026-01-20T12:20:03.986235Z pool-2-thread-1 @coroutine#3 ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.SyslogAppender for element Syslog: java.lang.NullPointerException: Cannot invoke "org.apache.logging.log4j.core.net.ssl.SslConfiguration.getKeyStoreConfig()" because "sslConfig" is null
java.lang.NullPointerException: Cannot invoke "org.apache.logging.log4j.core.net.ssl.SslConfiguration.getKeyStoreConfig()" because "sslConfig" is null
at org.apache.logging.log4j.core.net.SslSocketManager.createSslConfigurationId(SslSocketManager.java:252)
at org.apache.logging.log4j.core.net.SslSocketManager.getSocketManager(SslSocketManager.java:227)
at org.apache.logging.log4j.core.appender.SocketAppender.createSocketManager(SocketAppender.java:579)
at org.apache.logging.log4j.core.appender.SyslogAppender$Builder.build(SyslogAppender.java:151)
at org.apache.logging.log4j.core.appender.SyslogAppender$Builder.build(SyslogAppender.java:49)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:124)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1206)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1125)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1117)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:715)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:271)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:324)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:697)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:786)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:808)
at org.apache.logging.log4j.core.config.Configurator.reconfigure(Configurator.java:281)
at io.kotest.core.spec.ListenersKt$functionOverrideCallbacks$1.beforeEach(listeners.kt:41)
at io.kotest.engine.test.TestExtensions.beforeTestBeforeAnyBeforeContainer-gIAlu-s(TestExtensions.kt:80)
at io.kotest.engine.test.interceptors.LifecycleInterceptor.intercept(LifecycleInterceptor.kt:47)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor$intercept$2.invokeSuspend(TestCaseExtensionInterceptor.kt:24)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor$intercept$2.invoke(TestCaseExtensionInterceptor.kt)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor$intercept$2.invoke(TestCaseExtensionInterceptor.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1$1.invokeSuspend(TestExtensions.kt:143)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1$1.invoke(TestExtensions.kt)
at io.micronaut.test.extensions.kotest5.MicronautKotest5Extension.intercept(MicronautKotest5Extension.kt:42)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invokeSuspend(TestExtensions.kt:140)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions.intercept(TestExtensions.kt:148)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor.intercept(TestCaseExtensionInterceptor.kt:24)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor$intercept$runTest$1$4$1.invokeSuspend(BeforeSpecListenerInterceptor.kt:50)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor$intercept$runTest$1$4$1.invoke(BeforeSpecListenerInterceptor.kt)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor$intercept$runTest$1$4$1.invoke(BeforeSpecListenerInterceptor.kt)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor.intercept(BeforeSpecListenerInterceptor.kt:60)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.TestEnabledCheckInterceptor.intercept(TestEnabledCheckInterceptor.kt:31)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invokeSuspend(CoroutineErrorCollectorInterceptor.kt:34)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invoke(CoroutineErrorCollectorInterceptor.kt)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invoke(CoroutineErrorCollectorInterceptor.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndspatched(Undispatched.kt:66)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:43)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor.intercept(CoroutineErrorCollectorInterceptor.kt:33)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invokeSuspend(coroutineDispatcherFactoryInterceptor.kt:57)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invoke(coroutineDispatcherFactoryInterceptor.kt)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invoke(coroutineDispatcherFactoryInterceptor.kt)
at io.kotest.engine.concurrency.FixedThreadCoroutineDispatcherFactory$withDispatcher$4.invokeSuspend(FixedThreadCoroutineDispatcherFactory.kt:59)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
2026-01-20T12:20:03.995535800Z pool-2-thread-1 @coroutine#3 ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.SyslogAppender for element Syslog: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.SyslogAppender
java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.SyslogAppender
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:268)
at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:140)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1206)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1125)
at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1117)
at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:715)
at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:271)
at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:324)
at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:697)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:786)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:808)
at org.apache.logging.log4j.core.config.Configurator.reconfigure(Configurator.java:281)
at io.kotest.core.spec.ListenersKt$functionOverrideCallbacks$1.beforeEach(listeners.kt:41)
at io.kotest.engine.test.TestExtensions.beforeTestBeforeAnyBeforeContainer-gIAlu-s(TestExtensions.kt:80)
at io.kotest.engine.test.interceptors.LifecycleInterceptor.intercept(LifecycleInterceptor.kt:47)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor$intercept$2.invokeSuspend(TestCaseExtensionInterceptor.kt:24)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor$intercept$2.invoke(TestCaseExtensionInterceptor.kt)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor$intercept$2.invoke(TestCaseExtensionInterceptor.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1$1.invokeSuspend(TestExtensions.kt:143)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1$1.invoke(TestExtensions.kt)
at io.micronaut.test.extensions.kotest5.MicronautKotest5Extension.intercept(MicronautKotest5Extension.kt:42)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invokeSuspend(TestExtensions.kt:140)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions.intercept(TestExtensions.kt:148)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor.intercept(TestCaseExtensionInterceptor.kt:24)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor$intercept$runTest$1$4$1.invokeSuspend(BeforeSpecListenerInterceptor.kt:50)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor$intercept$runTest$1$4$1.invoke(BeforeSpecListenerInterceptor.kt)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor$intercept$runTest$1$4$1.invoke(BeforeSpecListenerInterceptor.kt)
at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor.intercept(BeforeSpecListenerInterceptor.kt:60)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.TestEnabledCheckInterceptor.intercept(TestEnabledCheckInterceptor.kt:31)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invokeSuspend(CoroutineErrorCollectorInterceptor.kt:34)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invoke(CoroutineErrorCollectorInterceptor.kt)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invoke(CoroutineErrorCollectorInterceptor.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndspatched(Undispatched.kt:66)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:43)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:165)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor.intercept(CoroutineErrorCollectorInterceptor.kt:33)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invokeSuspend(TestCaseExecutor.kt:100)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invokeSuspend(coroutineDispatcherFactoryInterceptor.kt:57)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invoke(coroutineDispatcherFactoryInterceptor.kt)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invoke(coroutineDispatcherFactoryInterceptor.kt)
at io.kotest.engine.concurrency.FixedThreadCoroutineDispatcherFactory$withDispatcher$4.invokeSuspend(FixedThreadCoroutineDispatcherFactory.kt:59)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:34)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:100)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
2026-01-20T12:20:04.004096Z pool-2-thread-1 @coroutine#3 ERROR Null object returned for Syslog in Appenders.
2026-01-20T12:20:04.020423300Z pool-2-thread-1 @coroutine#3 ERROR Unable to locate appender "LogToSyslog" for logger config "root"
Reproduction
I've converted my kotlin code into a basic JUnit test that aims to send a log message via TLS through Syslog. Apologies for not providing a comprehensive test in this case but the kotlin file should have enough to be able to run. You might just need to setup a basic GenericContainer companion class that uses the image 'balabit/syslog-ng:4.4.0'.
- Ngôn ngữ chính
- Java
- Star
- 3.6k
- Fork
- 1.8k
- Merge trung bình
- 5 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/logging-log4j2
-
additivity attributeĐang mởwaiting-for-maintainer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
apache/logging-log4j2#4475 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Migrate `log4j-api-test` tests to JUnit 5Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởapi priority: P3 tests waiting-for-maintainer
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
apache/logging-log4j2#4430 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`Rfc5424Layout` does not escape the `newLineEscape` replacement in SD-PARAM-VALUECó thể đã có người làm @lunarbae628 đã nhận 5 ngày trước. Đang mởbug layouts priority: P3
apache/logging-log4j2#4464 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
configuration enhancement layouts
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
apache/logging-log4j2#4463 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`evaluateOnStartup="true"` saves logs under wrong file names after missing scheduled rollCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởappenders:Rolling bug priority: P1 waiting-for-maintainer
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
apache/logging-log4j2#4449 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của apache/logging-log4j2
Issue tương tự
-
[FEATURE] Expose external refresh, node-level translog and warmer statsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởuntriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 2 ngày
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
Good First Issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
hiero-ledger/hiero-sdk-java#3059 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug live-tv platform:desktop platform:mobile platform:tv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
fk0u/cleanyourtv-tahoe#102 ·
Maintainer thường phản hồi trong vòng 1 ngày