Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/402.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 配置log4j';HTTP附加程序接受自签名证书_Java_Logging_Log4j_Splunk - Fatal编程技术网

Java 配置log4j';HTTP附加程序接受自签名证书

Java 配置log4j';HTTP附加程序接受自签名证书,java,logging,log4j,splunk,Java,Logging,Log4j,Splunk,我正在尝试使用Log4J HTTP Appender将日志发送到Splunk Cloud的HTTP事件收集器。但是,Splunk似乎在其HTTP事件收集器上使用了自签名证书,因此在Log4J尝试连接到该证书时会导致SSL验证错误: ERROR Unable to send HTTP in appender [Splunk] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX pa

我正在尝试使用Log4J HTTP Appender将日志发送到Splunk Cloud的HTTP事件收集器。但是,Splunk似乎在其HTTP事件收集器上使用了自签名证书,因此在Log4J尝试连接到该证书时会导致SSL验证错误:

ERROR Unable to send HTTP in appender [Splunk] javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

如何临时禁用HTTP Appender的SSL证书验证(类似于CURL的-k选项?

侧栏-如果您计划以这种方式使用,最好将您的Splunk安装的证书更新为非自签名的证书:)@warren我完全同意,但它不是自托管版本,这是一个Splunk Cloud的托管实例。因此,我无法控制SSL证书。否则,它已经被修复了。有趣的是——我(显然是错误的)感觉Splunk Cloud使用了商业(非自签名)certsSidebar——如果你打算以这种方式使用它,可能最好将你的Splunk安装的证书更新为非自签名的证书:)@warren我完全同意,但它不是自托管版本,而是Splunk Cloud的托管实例。因此,我无法控制SSL证书。有趣的是,Splunk Cloud使用商业(非自签名)证书给我的印象(显然是错误的)