Loading agent puppet failed: Could not create instance of plugin MCollective::Agent::Puppet: cannot load such file — puppet

D, [2016-05-13T17:35:58.594609 #21476] DEBUG — : activemq.rb:293:in `subscribe’ Subscribing to /topic/mcollective.discovery.agent with headers {}
D, [2016-05-13T17:35:58.594609 #21476] DEBUG — : agents.rb:104:in `block in findagentfile’ Found puppet at C:\mcollective\plugins/mcollective/agent/puppet.rb
D, [2016-05-13T17:35:58.594609 #21476] DEBUG — : pluginmanager.rb:167:in `loadclass’ Loading MCollective::Agent::Puppet from mcollective/agent/puppet.rb
D, [2016-05-13T17:35:58.641409 #21476] DEBUG — : pluginmanager.rb:44:in `<<‘ Registering plugin puppet_agent with class MCollective::Agent::Puppet single_instance: false
D, [2016-05-13T17:35:58.641409 #21476] DEBUG — : pluginmanager.rb:88:in `[]’ Returning new plugin puppet_agent with class MCollective::Agent::Puppet
D, [2016-05-13T17:35:58.657009 #21476] DEBUG — : <internal:10:in `synchronize’ PLMC15: No item called ‘agent/puppet’ for cache ‘ddl’
D, [2016-05-13T17:35:58.657009 #21476] DEBUG — : base.rb PLMC18: Found ‘puppet’ ddl at ‘C:\mcollective\plugins/mcollective/agent/puppet.ddl’
E, [2016-05-13T17:35:58.657009 #21476] ERROR — : agents.rb:71:in `rescue in loadagent’ Loading agent puppet failed: Could not create instance of plugin MCollective::Agent::Puppet: cannot load such file — puppet

问题分析
分析问题是ruby加载puppet插件未成功报错,最终找到原因是mcollective主配置文件server.cfg中 libdir = C:\mcollective\plugins中只指向了mcollective的lib库,并没有找到puppet和facter的lib库导致!因此 需要在libdir中添加puppet和facter的lib库路径

libdir = C:\mcollective\plugins;C:\Program Files\Puppet Labs\Puppet\puppet\lib;C:\Program Files\Puppet Labs\Puppet\facter\lib

发表评论