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

ChocolateyInstall failing #138

Open
sunilvishvakarma opened this issue Mar 8, 2019 · 4 comments
Open

ChocolateyInstall failing #138

sunilvishvakarma opened this issue Mar 8, 2019 · 4 comments

Comments

@sunilvishvakarma
Copy link

Cookbook version

latest

Chef-client version

2.0.1

Platform Details

Scenario:

We are using the chocolatey cookbook in windows machines to install the windows packages.
we are trying to install some of windows packages via cookbook by using the chocolatey_package resource. it's failing in windows 07, windows server 08, but the same cookbook is successfully running in the windows 08 and windows10.

Steps to Reproduce:

The ChocolateyInstall install failing in windows 07, windows server 08 due to the following error.

Running handlers:
[2019-03-08T07:40:44+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-03-08T07:40:44+00:00] ERROR: Exception handlers complete
Chef Client failed. 2 resources updated in 01 minutes 07 seconds
[2019-03-08T07:40:44+00:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
[2019-03-08T07:40:44+00:00] FATAL: Please provide the contents of the stacktrace.out the file if you file a bug report
[2019-03-08T07:40:44+00:00] FATAL: Chef::Exceptions::MissingLibrary: chocolatey_package[svn] (sncr_bamboo::subversion li
ne 21) had an error: Chef::Exceptions::MissingLibrary: Could not locate your Chocolatey install. To install chocolatey,
we recommend
the 'chocolatey' cookbook (https://github.com/chocolatey/chocolatey-cookbook).
If Chocolatey is installed, ensure that the 'ChocolateyInstall' environment
variable is correctly set. You can verify this with the PowerShell command
'[System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')'.

`````````````````````````````````````````````````````````````````````````````````````````
### Expected Result:
> We can able to install the packages via manually by using the chocolatey command, but via cookbook is failing. 
> the environment test output is positive.
2019-03-06T15:29:50+00:00] INFO: Running queued delayed notifications before re-raising exception

Running handlers:
[2019-03-06T15:29:50+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-03-06T15:29:50+00:00] ERROR: Exception handlers complete
Chef Client failed. 2 resources updated in 31 seconds
[2019-03-06T15:29:50+00:00] FATAL: Stacktrace dumped to c:/chef/cache/chef-stacktrace.out
[2019-03-06T15:29:50+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-03-06T15:29:50+00:00] FATAL: Chef::Exceptions::MissingLibrary: chocolatey_package[svn] (sncr_bamboo::subversion li
ne 21) had an error: Chef::Exceptions::MissingLibrary: Could not locate your Chocolatey install. To install chocolatey,
we recommend
the 'chocolatey' cookbook (https://github.com/chocolatey/chocolatey-cookbook).
If Chocolatey is installed, ensure that the 'ChocolateyInstall' environment

variable is correctly set. You can verify this with the PowerShell command
'[System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')'.


> The variable check result
PS C:\Windows\system32> [System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')
C:\ProgramData\chocolatey

> So our question is, this cookbook tested in windows 07  and windows server 08? 


Please need your help to fix this.

Regards
Sunil

@sunilvishvakarma
Copy link
Author

Recipe: sncr_bamboo::subversion

  • chocolatey_package[svn] action install

    ================================================================================
    Error executing action install on resource 'chocolatey_package[svn]'

    Chef::Exceptions::MissingLibrary

    Could not locate your Chocolatey install. To install chocolatey, we recommend
    the 'chocolatey' cookbook (https://github.com/chocolatey/chocolatey-cookbook).
    If Chocolatey is installed, ensure that the 'ChocolateyInstall' environment
    variable is correctly set. You can verify this with the PowerShell command
    '[System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')'.

    Resource Declaration:

    In C:/chef/cache/cookbooks/sncr_bamboo/recipes/subversion.rb

    21: chocolatey_package 'svn'
    22: end

    Compiled Resource:

    Declared in C:/chef/cache/cookbooks/sncr_bamboo/recipes/subversion.rb:21:in `from_file'

    chocolatey_package("svn") do
    package_name ["svn"]
    action [:install]
    default_guard_interpreter :default
    declared_type :chocolatey_package
    cookbook_name "sncr_bamboo"
    recipe_name "subversion"
    end

    System Info:

    chef_version=13.8.5
    platform=windows
    platform_version=6.1.7601
    ruby=ruby 2.4.3p205 (2017-12-14 revision 61247) [x64-mingw32]
    program_name=C:/opscode/chef/bin/chef-client
    executable=C:/opscode/chef/bin/chef-client

Running handlers:
[2019-03-08T07:40:44+00:00] ERROR: Running exception handlers
Running handlers complete
[2019-03-08T07:40:44+00:00] ERROR: Exception handlers complete
Chef Client failed. 2 resources updated in 01 minutes 07 seconds
[2019-03-08T07:40:44+00:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
[2019-03-08T07:40:44+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2019-03-08T07:40:44+00:00] FATAL: Chef::Exceptions::MissingLibrary: chocolatey_package[svn] (sncr_bamboo::subversion li
ne 21) had an error: Chef::Exceptions::MissingLibrary: Could not locate your Chocolatey install. To install chocolatey,
we recommend
the 'chocolatey' cookbook (https://github.com/chocolatey/chocolatey-cookbook).
If Chocolatey is installed, ensure that the 'ChocolateyInstall' environment
variable is correctly set. You can verify this with the PowerShell command
'[System.Environment]::GetEnvironmentVariable('ChocolateyInstall', 'MACHINE')'.

@sunilvishvakarma
Copy link
Author

Sorry, we are using the following version of the chocolatey cookbook.

"chocolatey": "= 1.2.1",

@ferventcoder
Copy link
Contributor

Hi @suniilsync - just coming across this issue. I'm not sure who is monitoring the cookbook these days. Anyway, did you determine the issue?

@sunilvishvakarma
Copy link
Author

@ferventcoder - We couldn't able to rectify it, and migrated all our SVN code to Git, hence I dint get a chance to look into this.

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

No branches or pull requests

2 participants