Git Product home page Git Product logo

Comments (13)

StuartMcManus avatar StuartMcManus commented on June 24, 2024

This looks very similar to the following error in:

sensu/sensu-puppet#1046

from puppet-module-sensuclassic.

treydock avatar treydock commented on June 24, 2024

Can you provide your Puppet code where you setup the sensuclassic classes and any hiera data? Feel free to replace sensitive information with fake data. I would like to try and reproduce this issue locally.

What version of Windows is this happening on?

from puppet-module-sensuclassic.

StuartMcManus avatar StuartMcManus commented on June 24, 2024

Hello @treydock I have attached how we are calling the class for sensuclassic with params you can replace with required strings. I have stripped out some non-required params so have done my best to leave all you should need.

I have tested this issue on Windows Server 2012R2 and Windows Server 2016.
Sensu_Class.txt

from puppet-module-sensuclassic.

treydock avatar treydock commented on June 24, 2024

Do you have something special configured for chocolatey to work? I am unable to install Sensu through Chocolatey. When I go to chocolatey website the only options for Sensu I see are for Sensu Go (sensu-agent and sensu-cli). Are you maybe using some kind of custom chocolately repo or custom chocolatey config? This is error I get:

Error: Execution of 'C:\ProgramData\chocolatey\choco.exe install Sensu -y  --ign
ore-package-exit-codes --no-progress' returned 1: Chocolatey v0.10.15
Installing the following packages:
Sensu
By installing you accept licenses for the packages.
Sensu not installed. The package was not found with the source(s) listed.
 Source(s): 'https://chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more
 assistance.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - Sensu - Sensu not installed. The package was not found with the source(s) lis
ted.
 Source(s): 'https://chocolatey.org/api/v2/'
 NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
 the package may not be found.
Please see https://chocolatey.org/docs/troubleshooting for more

from puppet-module-sensuclassic.

StuartMcManus avatar StuartMcManus commented on June 24, 2024

Hello @treydock we internalise packages from chocolately into our internal repo whereby that repo is added as a source when the chocolately packages are installed.

I have just checked though and you are right there is only Sensu Go so we have downloaded the client from Sensu themselves from https://eol-repositories.sensuapp.org/msi/2016/ and created the chocolately package from their msi using the chocolately package builder gui. We used the default options within that GUI so just a right click, create, build package and then uploaded to our internal repo.

from puppet-module-sensuclassic.

ghoneycutt avatar ghoneycutt commented on June 24, 2024

@StuartMcManus We just released v3.6.1. Could you give that a try and let us know if it addresses the issue.

from puppet-module-sensuclassic.

StuartMcManus avatar StuartMcManus commented on June 24, 2024

Hello @ghoneycutt sorry I have not had a chance to test yet but will pick Monday to test out.

from puppet-module-sensuclassic.

StuartMcManus avatar StuartMcManus commented on June 24, 2024

Hello @ghoneycutt I have tested using the new release 3.6.1 but it still comes up with the same error.

from puppet-module-sensuclassic.

treydock avatar treydock commented on June 24, 2024

@StuartMcManus Based on the errors you got its almost as if the Chocolatey package is installing the needed service and then the DSC service in the Puppet module is failing to to properly install the service or detect the existence of the service in same puppet run. I don't have the ability to test with Chocolately packages so I'm not sure I can reproduce this issue. One thing we can do to troubleshoot is you can modify this module on your local system and see if commenting out the following lines solves the problem:

https://github.com/sensu/puppet-module-sensuclassic/blob/master/manifests/client.pp#L75-L88

Also:

Change these two lines to use Service['sensu-client'] instead of Dsc_service['sensu-client']:

https://github.com/sensu/puppet-module-sensuclassic/blob/master/manifests/client.pp#L57

https://github.com/sensu/puppet-module-sensuclassic/blob/master/manifests/client.pp#L68

If your able to share how you add the chocolately package and possibly make the chocolatey package available to me I can try debugging this locally.

from puppet-module-sensuclassic.

StuartMcManus avatar StuartMcManus commented on June 24, 2024

Hello @treydock this is happening after the service is installed correctly by DSC and working, whereby I then stop the service and run puppet to try and start it again. Chocolately just puts down the the files doing a standard msi install and puppet sensuclassic module creates the service using DSC.

Chocolatey for you doesn't need to be factored in as it just puts down the files you can just manually install and run puppet to setup the service for you. The problem is purely to do with the DSC_Service resource within the sensuclassic module not detecting the service correctly when the service is stopped which sounds a like it then sees it as absent but when the service is running it does not have an issue.

from puppet-module-sensuclassic.

StuartMcManus avatar StuartMcManus commented on June 24, 2024

Hello @treydock just checking if you have had a chance to test out with a standard install using the package resource and puppet trying to start the service?

from puppet-module-sensuclassic.

treydock avatar treydock commented on June 24, 2024

I can reproduce the issue and honestly have no idea how to fix the problem, it's likely a bug or misconfiguration with the DSC Puppet module. I think I may be able to come up with a way to get rid of the dsc_service resource all together and instead install the Windows service the way Sensu documents installing the service.

Thus far what I've observed is what I think you saw and that's if sensu-client service is stopped, the dsc_service resource throws errors. Manually starting the service and then running Puppet produces no errors but that's not a solution.

from puppet-module-sensuclassic.

treydock avatar treydock commented on June 24, 2024

@StuartMcManus Can you try the changes in #35 and let me know if that resolves your issue?

from puppet-module-sensuclassic.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.