使用vagrant-berkshelf,我正试图在我的Vagrant CentOS盒子上配置Tomcat。
这是错误:
[vagrant@vagrant-centos65 ~]$ sudo cat /var/chef/cache/chef-stacktrace.out
Mixlib::ShellOut::ShellCommandFailed: execute[Create Tomcat SSL certificate]
(tomcat::default line 128) had an error: Mixlib::ShellOut::ShellCommandFailed:
Expected process to exit with [0], but received '1'
---- Begin output of /usr/bin/keytool -genkeypair -keystore
"/etc/tomcat6/keystore.jks" -storepass "mGSXXns5lCmugUp3VjBK"
-keypass "mGSXXns5lCmugUp3VjBK" -dname "cn=localhost" ----
STDOUT: Usage: keytool [COMMAND] [-- COMMAND]...
Manage private keys and public certificates.
我的问题与此question类似,因此我覆盖了tomcat.keytool
属性(见下文),但仍然遇到了相同的错误。
"tomcat" => {
"keytool" => "/usr/bin/keytool"
}
修改
看起来上面链接的问题指向已修复的Debian / Ubuntu错误(https://tickets.opscode.com/browse/COOK-4097?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel)。
当我删除tomcat.keytool
信息,然后vagrant destroy
编辑并重新运行vagrant up --provision
时,我得到了相同的上述错误。然后,我运行vagrant provision
没有任何错误,并且tomcat正在运行。这对我没有意义。