gpt4 book ai didi

docker - 未知无法查询docker版本: Unable to read TLS config: tls: failed to find any PEM data in certificate input

转载 作者:行者123 更新时间:2023-12-02 18:23:44 24 4
gpt4 key购买 nike

我遇到了一个奇怪的问题,我尝试发布 this它在 github 上,所以我不妨也在这里问一下..

➜  ~ docker-machine version
docker-machine version 0.8.2, build e18a919

➜ ~ docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
atago - google Running tcp://xxx.xxx.xxx.xxx:2376 Unknown Unable to query docker version: Unable to read TLS config: tls: failed to find any PEM data in certificate input
azure01 - azure Running tcp://xxx.xx.xxx.xxx:2376 Unknown Unable to query docker version: Unable to read TLS config: tls: failed to find any PEM data in certificate input
dev - virtualbox Stopped Unknown
dev01 - google Unknown
jeanepaul-dev - google Running tcp://xxx.xxx.xxx.xx:2376 Unknown Unable to query docker version: Unable to read TLS config: tls: failed to find any PEM data in certificate input

我尝试重新生成证书,但是,

➜  ~ docker-machine regenerate-certs -f azure01
Regenerating TLS certificates
Waiting for SSH to be available...
Detecting the provisioner...
Installing Docker...
Copying certs to the local machine directory...
error generating server cert: tls: failed to parse private key

最佳答案

我在尝试为 Grafana 设置 HTTPS 时遇到了同样的错误。因为它看起来是一个与证书相关的问题,而且这个问题很长时间没有得到回答这就是我在 Grafana 的情况下解决同样问题的方法。

1 将 keystore 从专有格式迁移到 pkcs12 格式。

keytool -importkeystore -srckeystore ./keystore -destkeystore ./keystore.pfx -deststoretype pkcs12 -storepass <storePass>

2 提取 keyStore.pem - 它包含证书和 key

openssl pkcs12 -in keystore.pfx -out keyStore.pem -nodes

3 仅将 key 提取为 pem 格式

openssl pkcs12 -in keystore.pfx -out keyStore-keys.pem -nodes -nocerts

对于 grafana,我只使用了第 2 步和第 3 步生成的文件

vi /path/to/grafana-5.2.1/conf/custom.ini
[server]
..
cert_file = "/path/to/grafana-5.2.1/conf/keyStore.pem"
cert_key = "/path/to/grafana-5.2.1/conf/keyStore-keys.pem"

关于docker - 未知无法查询docker版本: Unable to read TLS config: tls: failed to find any PEM data in certificate input,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40188551/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com