Ask Your Question
0

Mcollective doesn't start on CentOS 7 via Systemctl

asked 2017-05-26 09:04:40 -0500

naspar gravatar image

updated 2017-05-26 15:23:02 -0500

Hi guys,

I have successfully installed and configured my puppet environment which includes one PuppetMaster and few nodes (Linux/Windows). Foreman is also installed and can do some basic things from there.

Since Foreman does not support the "Puppet Run" via the deprecated "puppet kick" command, I am now trying to configure the mcollective service (middleware based on ActiveMQ), in order to be able to use the mco command from foreman and push single classes on nodes.

The ActiveMQ seems to be properly installed, as i can see the the gui popping up via the browser. Unfortunately i can't see any response while running the "mco ping <node>" command, and i suspect it is due to the problem i have when trying to start the mcollective service via systemctl.

Here the error i get, hope some of you might be of help :

systemctl start mcollective

the log :

ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Failed to load Mcollective::Registration::Meta: cannot load such file -- mcollective/registration/meta.rb

system/package info :

puppet --version
4.10.1 

puppetserver --version
puppetserver version: 2.7.2

mco --version
/usr/local/bin/mco 2.10.4

uname -r
3.10.0-514.16.1.el7.x86_64

cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

/etc/puppetlabs/mcollective/server.cfg

connector = activemq
    plugin.activemq.pool.size = 1
    plugin.activemq.pool.1.host = puppetmaster
    plugin.activemq.pool.1.port = 61613
    plugin.activemq.pool.1.user = mcollective
    plugin.activemq.pool.1.password = marionette

    main_collective = mcollective
    collectives = mcollective
    libdir = /opt/puppetlabs/mcollective/plugins
    logfile = /var/log/puppetlabs/mcollective.log
    loglevel = info
    daemonize = 1

    securityprovider = psk
    plugin.psk = unset

    factsource = yaml
    plugin.yaml = /etc/puppetlabs/mcollective/facts.yaml

    classesfile = /opt/puppetlabs/puppet/cache/state/classes.txt

    plugin.puppet.summary    = /opt/puppetlabs/puppet/cache/state/last_run_summary.yaml

    registration = Meta
    registerinterval = 14400

    rpcauthorization = 1
    rpcauthprovider = action_policy
    plugin.actionpolicy.allow_unconfigured = 1
    plugin.activemq.heartbeat_interval = 30

vi /etc/puppetlabs/mcollective/client.cfg

connector = activemq
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = puppetmaster
plugin.stomp.port = 61613
plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = marionette

connection_timeout = 30

main_collective = mcollective
collectives = mcollective
libdir = /opt/puppetlabs/mcollective/plugins
libdir = /usr/share/mcollective/plugins
libdir = /usr/libexec/mcollective
logfile = /dev/null
loglevel = info
logger_type = console

securityprovider = psk
plugin.psk = unset

factsource = yaml
plugin.yaml = /etc/puppetlabs/mcollective/facts.yam

guidlines/links : https://docs.puppet.com/mcollective/c... https://docs.puppet.com/mcollective/d... https://docs.puppet.com/mcollective/d... https://raw.githubusercontent.com/pup... https://docs.puppet.com/mcollective/d... http://projects.theforeman.org/projec...mcollectivehttps://docs.puppet.com/mcollective/r...cliusage.html

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-05-29 01:59:45 -0500

naspar gravatar image

The problem was fixed just by simplifying the config files. I have followed several guides to configure Puppet and the one-time run via Foreman, and some of the were perhaps a bit obsolete, not really reflecting the latest Puppet/Foreman Versions.

Here below are the new files (Server.cfg and Client.cfg). The Systemctl can now start mco without any issue :

[root@puppetmaster ~]# cat /etc/puppetlabs/mcollective/server.cfg 
main_collective = mcollective
collectives = mcollective

libdir = /opt/puppetlabs/mcollective/plugins

# consult the "classic" libdirs too
libdir = /usr/share/mcollective/plugins
libdir = /usr/libexec/mcollective

logfile = /var/log/puppetlabs/mcollective.log
loglevel = info
daemonize = 1

# Plugins
securityprovider = psk
plugin.psk = unset

connector = activemq
direct_addressing = 1
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = puppetmaster
plugin.activemq.pool.1.port = 61613
plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = marionette

# Facts
factsource = yaml
plugin.yaml = /etc/puppetlabs/mcollective/facts.yaml

fact_cache_time = 300

classesfile = /opt/puppetlabs/puppet/cache/state/classes.txt


[root@puppetmaster ~]# cat /etc/puppetlabs/mcollective/client.cfg 
main_collective = mcollective
collectives = mcollective

libdir = /opt/puppetlabs/mcollective/plugins

# consult the "classic" libdirs too
libdir = /usr/share/mcollective/plugins
libdir = /usr/libexec/mcollective

logger_type = console
loglevel = warn

# Plugins
securityprovider = psk
plugin.psk = unset

connector = activemq

direct_addressing = 1

plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = puppetmaster
plugin.activemq.pool.1.port = 61613

plugin.activemq.pool.1.user = mcollective
plugin.activemq.pool.1.password = marionette

connection_timeout = 3

logfile = /var/log/mcollective.log
edit flag offensive delete link more

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

Stats

Asked: 2017-05-26 09:04:40 -0500

Seen: 82 times

Last updated: May 29