SSL.keystore.location在我的Kubernetes秘密装入中找不到JKS文件 [英] SSL.keystore.location can't find JKS file in my Kubernetes secrets mount

查看:467
本文介绍了SSL.keystore.location在我的Kubernetes秘密装入中找不到JKS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在卷装载/ etc / secrets / keystore下为我的JKS文件创建了一个秘密。
我正在访问我的JKS文件路径作为环境变量,其中ssl.keystore.location被解析为file:///etc/secrets/keystore/ssl.jks。但是我从SSL引擎构建器得到一个异常,即找不到密钥库的修改时间,并且java.nio.file.NoSuchFile异常文件:/etc/secrets/keystore/ssl.jks

I have created a secret for my JKS file under volume mount /etc/secrets/keystore. I am accessing my JKS file path as an environment variable where ssl.keystore.location gets resolved as file:///etc/secrets/keystore/ssl.jks. But I get exception from SSL engine builder that modification time of keystore couldn't be found and java.nio.file.NoSuchFile Exception file:/etc/secrets/keystore/ssl.jks

推荐答案

删除 file://

Kafka对Spring的资源抽象一无所知。您只需提供文件的路径(相对或绝对)。

Kafka knows nothing about Spring's Resource abstraction; you need to provide just the path to the file (relative or absolute).

这篇关于SSL.keystore.location在我的Kubernetes秘密装入中找不到JKS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆