After mcollective update agent does not work anymore

35 views
Skip to first unread message

Andreas Dvorak

unread,
Oct 19, 2017, 4:49:07 AM10/19/17
to Puppet Users
Dear all,

I have an self written mcollective agent that does nocht work anymore, after the Puppet und MCollective update. All other agents are working.
Does anybody has an idea?


The client is running:
mcollective 2.6.0
puppet 3.7.1
Centos 6

locate ehyp.rb
/usr/local/libexec/mcollective/mcollective/agent/ehyp.rb
/usr/local/libexec/mcollective/mcollective/application/ehyp.rb

If the server has
Centos 6
mcollective 2.6.0
puppet 3.7.1
it does work

If server hast
Centos 6
mcollective-package-agent-4.4.0
puppet-agent-1.9.3
it does not work.

mcollective.log
D, [2017-10-19T10:44:27.294257 #122124] DEBUG -- : base.rb:120:in `block (2 levels) in validate_filter?' Failing based on agent ehyp

server.cfg
/usr/local/libexec/mcollective:/usr/libexec/mcollective:/opt/puppetlabs/mcollective/plugins


Regards,
Andreas

R.I.Pienaar

unread,
Oct 19, 2017, 4:58:27 AM10/19/17
to puppet...@googlegroups.com


On Thu, Oct 19, 2017, at 10:49, Andreas Dvorak wrote:
> Dear all,
>
> I have an self written mcollective agent that does nocht work anymore,
> after the Puppet und MCollective update. All other agents are working.
> Does anybody has an idea?
>
>
> The client is running:
> mcollective 2.6.0
> puppet 3.7.1
> Centos 6
>
> locate ehyp.rb
> /usr/local/libexec/mcollective/mcollective/agent/ehyp.rb
> /usr/local/libexec/mcollective/mcollective/application/ehyp.rb

The early logs just as the daemon starts shows you what it finds and why
it might not load something it does find, put it in debug and show us

Andreas Dvorak

unread,
Oct 19, 2017, 7:25:16 AM10/19/17
to Puppet Users
Hi,

thank you. That is a good tip. The log says:

D, [2017-10-19T12:50:04.972364 #13809] DEBUG -- : agents.rb:104:in `block in findagentfile' Found ehyp at /usr/libexec/mcollective/mcollective/agent/ehyp.rb
D, [2017-10-19T12:50:04.972530 #13809] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading MCollective::Agent::Ehyp from mcollective/agent/ehyp.rb
D, [2017-10-19T12:50:04.974482 #13809] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading MCollective::Util::UnprivilegedAgent from mcollective/util/unprivilegedagent.rb
E, [2017-10-19T12:50:04.976625 #13809] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Failed to load MCollective::Util::UnprivilegedAgent: cannot load such file -- pr0cess
E, [2017-10-19T12:50:04.976730 #13809] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Failed to load MCollective::Agent::Ehyp: cannot load such file -- pr0cess
E, [2017-10-19T12:50:04.976815 #13809] ERROR -- : agents.rb:71:in `rescue in loadagent' Loading agent ehyp failed: cannot load such file -- pr0cess
D, [2017-10-19T12:50:04.976978 #13809] DEBUG -- : agents.rb:104:in `block in findagentfile' Found ehyp at /usr/libexec/mcollective/mcollective/agent/ehyp.rb
D, [2017-10-19T12:50:04.977093 #13809] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading MCollective::Agent::Ehyp from mcollective/agent/ehyp.rb
D, [2017-10-19T12:50:04.978885 #13809] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading MCollective::Util::UnprivilegedAgent from mcollective/util/unprivilegedagent.rb
E, [2017-10-19T12:50:04.980883 #13809] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Failed to load MCollective::Util::UnprivilegedAgent: cannot load such file -- pr0cess
E, [2017-10-19T12:50:04.980981 #13809] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Failed to load MCollective::Agent::Ehyp: cannot load such file -- pr0cess
E, [2017-10-19T12:50:04.981084 #13809] ERROR -- : agents.rb:71:in `rescue in loadagent' Loading agent ehyp failed: cannot load such file -- pr0cess

It finds the agent, but can not load it.

The first line the the agent is:
MCollective::Util.loadclass("MCollective::Util::UnprivilegedAgent")

What is wrong with that line?

If I remove that line the error is:
E, [2017-10-19T13:17:18.922324 #42703] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Failed to load MCollective::Agent::Ehyp: cannot load such file -- open4

#MCollective::Util.loadclass("MCollective::Util::UnprivilegedAgent")
require 'open4'
require 'rubygems'

>rpm -ql ruby-open4
/usr/local/lib64/ruby/site_ruby
/usr/local/share/ruby/site_ruby
/usr/local/share/ruby/site_ruby/open4.rb

The open4 is installed, but can not be loaded. Why not?

Can you please help me?

R.I.Pienaar

unread,
Oct 19, 2017, 8:17:29 AM10/19/17
to puppet...@googlegroups.com
The problem appears to be:

cannot load such file -- pr0cess

there's some dependency like a gem that is not found in this
installation of puppet
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-users/ddcfa5b8-dfac-42f4-a0f8-cbb5171b958a%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
R.I.Pienaar / www.devco.net / @ripienaar

Andreas Dvorak

unread,
Oct 20, 2017, 8:22:22 AM10/20/17
to Puppet Users
pr0cess is installed. The older mcollective works fine with that location.

>rpm -ql ruby-pr0cess
/usr/lib/ruby/site_ruby/1.8
/usr/lib64/ruby/site_ruby/1.8/x86_64-linux
/usr/lib64/ruby/site_ruby/1.8/x86_64-linux/pr0cess.so

Do you know how to configure the location to the file or should I be it to an other place?

R.I.Pienaar

unread,
Oct 20, 2017, 8:46:04 AM10/20/17
to puppet...@googlegroups.com
It depends on your ruby that is running mcollective, find the exact path
to the ruby binary and run:

ruby -e 'p $:'

and see if the place this file is matches where its looking, you can
also just try:

ruby -r pr0cess -e 'puts "hello"'

but be sure to use the same ruby path mcollective use

Andreas Dvorak

unread,
Oct 23, 2017, 8:17:14 AM10/23/17
to Puppet Users
thank you that was great help

the rpm puppet-agent bringt the ruby version 2.1

/opt/puppetlabs/puppet/bin/ruby  -e 'p $:' 
["/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0", "/opt/puppetlabs/puppet/lib/ruby/site_ruby/2.1.0/x86_64-linux", "/opt/puppetlabs/puppet/lib/ruby/site_ruby", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/2.1.0/x86_64-linux", "/opt/puppetlabs/puppet/lib/ruby/vendor_ruby", "/opt/puppetlabs/puppet/lib/ruby/2.1.0", "/opt/puppetlabs/puppet/lib/ruby/2.1.0/x86_64-linux"]

So the file /usr/lib64/ruby/site_ruby/1.8/x86_64-linux/pr0cess.so can not be read and the file is not compatible the version 2.1
Reply all
Reply to author
Forward
0 new messages