Keystore is not created with java 22 (password needed)
还没有人认领这个 Issue。
评估
调研方向
从 issue 中显示的 java_ks 资源开始,并在 Java 22 上重现 keytool 导入操作。将 Puppet 的非交互式运行与 Rocky 9.5 上的手动命令进行比较;当 keystore 创建时无需提示输入密码,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Describe the Bug
Running the latest elasticsearch module with elasticsearch 8.15.1 on Rocky 9 throws error:
Error: Execution of 'keytool -importkeystore -srcstoretype PKCS12 -destkeystore /etc/elasticsearch/elasticsearch.ks -srckeystore /tmp/elasticsearch_node.20241023-51377-1njhkrb -alias elasticsearch_node' returned 1: Importing keystore /tmp/elasticsearch_node.20241023-51377-1njhkrb to /etc/elasticsearch/elasticsearch.ks...
Enter destination keystore password: Enter source keystore password:
***************** WARNING WARNING WARNING *****************
* The integrity of the information stored in the srckeystore*
* has NOT been verified! In order to verify its integrity, *
* you must provide the srckeystore password. *
***************** WARNING WARNING WARNING *****************
Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>keytool error: java.lang.Exception: Too many failures - try later
Error: /Stage[main]/Elasticsearch::Config/Java_ks[elasticsearch_node]/ensure: change from 'absent' to 'present' failed: Execution of 'keytool -importkeystore -srcstoretype PKCS12 -destkeystore /etc/elasticsearch/elasticsearch.ks -srckeystore /tmp/elasticsearch_node.20241023-51377-1njhkrb -alias elasticsearch_node' returned 1: Importing keystore /tmp/elasticsearch_node.20241023-51377-1njhkrb to /etc/elasticsearch/elasticsearch.ks...
Enter destination keystore password: Enter source keystore password:
***************** WARNING WARNING WARNING *****************
* The integrity of the information stored in the srckeystore*
* has NOT been verified! In order to verify its integrity, *
* you must provide the srckeystore password. *
***************** WARNING WARNING WARNING *****************
Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>Enter key password for <elasticsearch_node>keytool error: java.lang.Exception: Too many failures - try later (corrective)
from elasticsearch module:
# Trust CA Certificate
java_ks { 'elasticsearch_ca':
ensure => present,
certificate => $elasticsearch::ca_certificate,
target => $_keystore_path,
password => $elasticsearch::keystore_password,
trustcacerts => true,
}
# Load node certificate and private key
java_ks { 'elasticsearch_node':
ensure => present,
certificate => $elasticsearch::certificate,
private_key => $elasticsearch::private_key,
private_key_type => $elasticsearch::private_key_type,
target => $_keystore_path,
password => $elasticsearch::keystore_password,
}
The password is not empty in both cases.
Java version used in elasticsearch:
/usr/share/elasticsearch/jdk/bin/java -version
openjdk version "22.0.1" 2024-04-16
OpenJDK Runtime Environment (build 22.0.1+8-16)
OpenJDK 64-Bit Server VM (build 22.0.1+8-16, mixed mode, sharing)
This is probably a combination of Java and operation system versions, the same module used on elasticsearch 7.17 works properly.
Expected Behavior
proper keystore should be created.
Steps to Reproduce
I have included code from elasticsearch module.
Environment
- Java version 22.0.1
- Platform: Rocky 9.5
- Puppet version: 7.33.0
Additional Context
When I run commands from above manually (outside puppet run), the keystore is created but I have to provide the password manually on every step.
- 主要语言
- Ruby
- 星标
- 34
- 派生
- 97
- 平均合并
- 41 分钟
- 30 天内合并 PR
- 2
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
puppetlabs/puppetlabs-java_ks 的其他 Issue
-
bugfix community
难度 3/5 1-2 天 新手友好度 55/100
puppetlabs/puppetlabs-java_ks#476 · 1 条评论 ·
-
community
难度 4/5 3-5 天 新手友好度 35/100
puppetlabs/puppetlabs-java_ks#455 · 1 条评论 · 1 个 reaction ·
-
community
难度 4/5 3-5 天 新手友好度 35/100
puppetlabs/puppetlabs-java_ks#445 · 4 条评论 ·
-
community
难度 3/5 1-2 天 新手友好度 42/100
puppetlabs/puppetlabs-java_ks#434 ·
查看 puppetlabs/puppetlabs-java_ks 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
GantMan/jail-monkey#380 ·
-
难度 2/5 1-3 小时 新手友好度 62/100
voxpupuli/puppet-wireguard#151 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug f:search
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复