About | FAQ | Help
Ask Your Question

mcollective Windows service no longer working

asked 2014-09-08 09:38:22 -0500

tek0011 gravatar image

updated 2014-09-08 10:35:39 -0500

We just upgraded puppet agent to 3.7.0 and now the mcollective service will no longer work in windows (*nix still working fine)


├── puppetlabs-mcollective (v2.0.0)

# Installs and manages mcollective service for windows
class windows_mcollective {

        # Copies over main mcollective files
        file { 'C:\marionette-collective':
                ensure  => present,
                source  => 'puppet:///extra_files/marionette-collective',
                recurse => true,

        # Populates facts.yaml file
        file{ 'C:\marionette-collective\etc\facts.yaml':
                loglevel => debug, # reduce noise in Puppet reports
                content  => inline_template("<%= scope.to_hash.reject { |k,v| k.to_s =~ /(uptime_seconds|timestamp|free)/ }.to_yaml %>"), # exclude rapidly changing facts
                require  =>  File['C:\marionette-collective'],

        # Runs batch file to create mcollective as a service.
        exec { 'create service':
                command     => '"C:\marionette-collective\bin\register_service.bat"',
                path        => "$::path",
                require     => File['C:\marionette-collective'],
                subscribe   => File['C:\marionette-collective'],
                refreshonly => true,
                before      => Service['mcollectived'],

                # Attempted to run only when the service did not exist. Line below does not work, but is in correct direction.
                # Without line below, will call bat file everytime mcollective files change. Results in an ignorable error.
#               onlyif      => 'C:\Windows\System32\net.exe start | C:\Windows\System32\find.exe "The Marionette Collective"',

        # Ensures that the mcollective service is running and starts at boot.
        service { 'mcollectived':
                ensure  => running,
                enable  => true,
                require => Exec['create service'],

Issue I now get with the agent:

Error: /Stage[main]/Windows_mcollective/Service[mcollectived]: Could not evaluate: uninitialized constant Win32::Service::Error
Notice: Finished catalog run in 32.65 seconds

I also notice:

'"ruby"' is not recognized as an internal or external command,
operable program or batch file

and of course:

C:\marionette-collective\bin>net start mcollectived
The service name is invalid.

More help is available by typing NET HELPMSG 2185.

Anyone have any idea what is going on?

Edit: How did it work before 3.7.0 , but now is saying ruby isnt installed?

edit retag flag offensive close merge delete


Did the ruby path change in 3.7.0?

tek0011 gravatar imagetek0011 ( 2014-09-08 12:16:12 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2014-09-08 12:27:48 -0500

joshc gravatar image

updated 2014-09-08 12:28:57 -0500

This is due to http://bit.ly/1qArlXH . We will need to update mcollective to work correctly with ffi based win32 gems.

edit flag offensive delete link more


We being me or we being you? haha - Is that a statement as in mcollective for windows will not work yet? Edit: I see. x64 changes. That being said should the x32 still work? Cause yikes, as a 3 week old Puppet user, this frightens me.

tek0011 gravatar imagetek0011 ( 2014-09-08 12:31:12 -0500 )edit

Sorry, this is an mcollective bug. I've filed it as https://tickets.puppetlabs.com/browse/MCO-462. Puppet Labs will need to update mcollective. In the meantime, you will need to downgrade to puppet 3.6.2.

joshc gravatar imagejoshc ( 2014-09-08 12:52:33 -0500 )edit

Thanks joshc

tek0011 gravatar imagetek0011 ( 2014-09-08 13:05:49 -0500 )edit

@tek001 could you add some detail to https://tickets.puppetlabs.com/browse/MCO-462 for me; I'd like to know your output from `ruby -v` and `gem list`. As this seems to be a bug I'd like to keep all the interactions over in JIRA until we have a fix.

richardc gravatar imagerichardc ( 2014-09-09 08:03:55 -0500 )edit

@joshc - Done.

tek0011 gravatar imagetek0011 ( 2014-09-09 13:52:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-09-08 09:38:22 -0500

Seen: 634 times

Last updated: Sep 08 '14