Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

berks.bat failed with return code: 100 #23

Open
sngehl01 opened this issue Aug 21, 2018 · 5 comments
Open

berks.bat failed with return code: 100 #23

sngehl01 opened this issue Aug 21, 2018 · 5 comments

Comments

@sngehl01
Copy link

I have had a lot of issues with the "Upload Cookbook to Chef Server" task. I am able to successfully update the cookbook version # in the environment, but I cannot upload the cookbook. I get the following error in VSTS :

  • CD to cookbook directory: d:_work\r1\a/_demo
  • [command]C:\Windows\system32\cmd.exe /D /S /C "c:\opscode\chefdk\bin\berks.bat install"
  • No Berksfile or Berksfile.lock found at 'd:/_work/r1/a/_demo'!
  • ##[error]c:\opscode\chefdk\bin\berks.bat failed with return code: 100

Googling error codes hasn't gotten me far. I get the same error when I try to remote into the machine and run the berks.bat install command (No Berksfile of Berksfile.lock found at 'C:/opscode/chefdk/bin'!)

I do have the berkshelf gem here : C:\opscode\chefdk\embedded\lib\ruby\gems\2.5.0\gems\berkshelf-7.0.4

I installed chefdk 3.1.0

Any ideas? thanks.

@stuartpreston
Copy link

If you can't run berks install on the machine from the specified folder, then it's definitely not going to work in the VSTS task :) Are you sure the _demo folder is actually a Chef cookbook (usually contains a metadata.rb file as well as a Berksfile identifying the source for dependencies)?

@stuartpreston
Copy link

I forgot to mention - did you try setting System.Debug to true in case any more output is returned?

@sngehl01
Copy link
Author

You're a gentleman and a scholar :) I will say my _demo folder was right... and wrong, haha. There's a drop folder in it. The cookbook is in _demo/drop. I did change that. I got a new error.

@sngehl01
Copy link
Author

Sorry, didn't mean to comment yet.
2018-08-21T15:47:57.4610080Z ##[error]c:\opscode\chefdk\bin\berks.bat failed with return code: 130

It looks like it can't read the pem. It doesn't show up in the folder it's looking for. I grabbed it during the deployment and the RSA key looks ok (or as I'd expect it to look).

More complete error text :

  • [command]C:\Windows\system32\cmd.exe /D /S /C "c:\opscode\chefdk\bin\berks.bat upload -c c:\windows\temp\berks.config.json"
  • [2018-08-21T11:47:57-04:00] WARN: Failed to read the private key c:windows emp�sts-task.pem: #<Errno::EINVAL: Invalid argument @ rb_sysopen - c:windows emp�sts-task.pem>
  • E, [2018-08-21T11:47:57.426060 #1508] ERROR -- : Chef::Exceptions::PrivateKeyMissing: I cannot read c:windows emp�sts-task.pem, which you told me to use to sign requests!
  • E, [2018-08-21T11:47:57.426486 #1508] ERROR -- : c:/opscode/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.2.0-universal-mingw32/lib/chef/http/authenticator.rb:98:in `rescue in load_signing_key'
  • c:/opscode/chefdk/embedded/lib/ruby/gems/2.5.0/gems/chef-14.2.0-universal-mingw32/lib/chef/http/authenticator.rb:84:in `load_signing_key'

No on the System.Debug to true, where would I set that?

@stuartpreston
Copy link

@sngehl01 Looks like I missed this reply - did you get past this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants