java - 配置 log4j' HTTP appender 以接受自签名证书
问题描述
我正在尝试使用 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 选项)?
解决方案
推荐阅读
- python - 不允许 SelectField 提交方法
- uml - 包含的用例可以与参与者相关联吗?
- python - Python程序比较两个不同目录中文件的内容
- python - 具有多项观测分布的 HMM
- masstransit - MassTransit 发送到现有交易所
- python-3.x - 使用 pandas 处理 Excel 文件时出现错误消息“Traceback(最近一次调用最后一次)”
- tensorflow - 无法使用 tf.decode_csv() 正确读取一个数组 csv 文件
- javascript - 模块没有导出成员,“请求”
- javascript - Moment .JS - 为什么差异不是全年格式
- javascript - 如何在 Javascript 中使用 ASP 变量?