koko a
koko a

Reputation: 11

Knife bootstrap failing through Jenkins execute shell

I'm trying to perform a "knife bootstrap" command through Jenkins web UI execute shell, but I keep getting this error message : (this is the knife bootstrap command I'm using) :

"knife bootstrap [the node's IP] --ssh-user ec2-user --sudo --identity-file "[my key to the node]" --node-name My123 --run-list 'role[role1]' "

and this is the error message:

" ERROR: Errno::ENOENT: No such file or directory @ rb_sysopen - /etc/chef/validation.pem "

when I run the 'knife bootstrap' command directly through the CLI it works fine.

any idea why it's not working from Jenkins execute shell?

Upvotes: 0

Views: 243

Answers (1)

Manish Badgujar
Manish Badgujar

Reputation: 1

It is due to validation.pem file is missing, this is default path for validation file. Either you can set path in /chef-repo/.chef/knife.rb file or you can use default location /etc/chef/validation.pem.

You can regenerate validation key from webUI and replace the existing one, this should resolve your issue.

Upvotes: 0

Related Questions