报错custom_require.rb:36:in gem_original_require: no such file to load--puppet的解决

简介:

最近在测试在windows安装mcollective,一直卡在一个问题上,以下是windows上重启mcollectived服务后报的错误


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
agents.rb Loading agent puppet failed: Could not create instance of plugin MCollective::Agent::Puppet: C:/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/ 1.8 /rubygems/custom_require.rb: 36 : in  `gem_original_require': no such file to load--puppet
D, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ] DEBUG -- : windows_daemon.rb Starting Windows Service Daemon
D, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ] DEBUG -- : pluginmanager.rb Returning cached plugin global_stats  with  class  MCollective::RunnerStats
D, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin security_plugin  with  class  MCollective::Security::Psk
D, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ] DEBUG -- : pluginmanager.rb Returning cached plugin global_stats  with  class  MCollective::RunnerStats
D, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin connector_plugin  with  class  MCollective::Connector::Stomp
I, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ]  INFO -- : stomp.rb MCollective  2.2 .x will be the last to fully support the  'stomp'  connector, please migrate to the  'activemq'  or  'rabbitmq'  connector
D, [ 2013 - 12 -19T08: 49 : 51.572777  # 1696 ] DEBUG -- : stomp.rb Connecting to  192.168 . 100.122 : 61613
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : agents.rb Reloading all agents from disk
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : agents.rb Found discovery at C:\mcollective\plugins/mcollective/agent/discovery.rb
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Agent::Discovery from mcollective/agent/discovery.rb
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : agents.rb MCollective::Agent::Discovery does not have an activate? method, activating  as  default
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin discovery_agent  with  class  MCollective::Agent::Discovery single_instance:  true
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin discovery_agent  with  class  MCollective::Agent::Discovery
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : pluginmanager.rb Returning cached plugin connector_plugin  with  class  MCollective::Connector::Stomp
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : stomp.rb Subscribing to /topic/mcollective.discovery.command
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : agents.rb Found puppet at C:\mcollective\plugins/mcollective/agent/puppet.rb
D, [ 2013 - 12 -19T08: 49 : 51.588377  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Agent::Puppet from mcollective/agent/puppet.rb
D, [ 2013 - 12 -19T08: 49 : 51.603977  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin puppet_agent  with  class  MCollective::Agent::Puppet single_instance:  false
D, [ 2013 - 12 -19T08: 49 : 51.603977  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin puppet_agent  with  class  MCollective::Agent::Puppet
D, [ 2013 - 12 -19T08: 49 : 51.603977  # 1696 ] DEBUG -- : cache.rb Cache miss on  'ddl'  key  'agent/puppet'
D, [ 2013 - 12 -19T08: 49 : 51.603977  # 1696 ] DEBUG -- : base.rb Found puppet ddl at C:\mcollective\plugins/mcollective/agent/puppet.ddl
E, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] ERROR -- : agents.rb Loading agent puppet failed: Could not create instance of plugin MCollective::Agent::Puppet: C:/Puppet Labs/Puppet/sys/ruby/lib/ruby/site_ruby/ 1.8 /rubygems/custom_require.rb: 36 : in  `gem_original_require': no such file to load -- puppet
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : agents.rb Found rpcutil at C:\mcollective\plugins/mcollective/agent/rpcutil.rb
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Agent::Rpcutil from mcollective/agent/rpcutil.rb
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : agent.rb Starting  default  activation checks  for  rpcutil
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin rpcutil_agent  with  class  MCollective::Agent::Rpcutil single_instance:  false
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin rpcutil_agent  with  class  MCollective::Agent::Rpcutil
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : cache.rb Cache miss on  'ddl'  key  'agent/rpcutil'
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : base.rb Found rpcutil ddl at C:\mcollective\plugins/mcollective/agent/rpcutil.ddl
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Returning cached plugin connector_plugin  with  class  MCollective::Connector::Stomp
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : stomp.rb Subscribing to /topic/mcollective.rpcutil.command
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Data::Agent_data from mcollective/data/agent_data.rb
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin agent_data  with  class  MCollective::Data::Agent_data single_instance:  false
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Data::Fstat_data from mcollective/data/fstat_data.rb
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin fstat_data  with  class  MCollective::Data::Fstat_data single_instance:  false
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Data::Puppet_data from mcollective/data/puppet_data.rb
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin puppet_data  with  class  MCollective::Data::Puppet_data single_instance:  false
D, [ 2013 - 12 -19T08: 49 : 51.619577  # 1696 ] DEBUG -- : pluginmanager.rb Loading MCollective::Data::Resource_data from mcollective/data/resource_data.rb
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : pluginmanager.rb Registering plugin resource_data  with  class  MCollective::Data::Resource_data single_instance:  false
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin resource_data  with  class  MCollective::Data::Resource_data
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : cache.rb Cache miss on  'ddl'  key  'data/resource_data'
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : base.rb Found resource_data ddl at C:\mcollective\plugins/mcollective/data/resource_data.ddl
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin puppet_data  with  class  MCollective::Data::Puppet_data
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : cache.rb Cache miss on  'ddl'  key  'data/puppet_data'
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : base.rb Found puppet_data ddl at C:\mcollective\plugins/mcollective/data/puppet_data.ddl
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin agent_data  with  class  MCollective::Data::Agent_data
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : cache.rb Cache miss on  'ddl'  key  'data/agent_data'
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : base.rb Found agent_data ddl at C:\mcollective\plugins/mcollective/data/agent_data.ddl
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : pluginmanager.rb Returning  new  plugin fstat_data  with  class  MCollective::Data::Fstat_data
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : cache.rb Cache miss on  'ddl'  key  'data/fstat_data'
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : base.rb Found fstat_data ddl at C:\mcollective\plugins/mcollective/data/fstat_data.ddl
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : pluginmanager.rb Returning cached plugin connector_plugin  with  class  MCollective::Connector::Stomp
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : stomp.rb Subscribing to /topic/mcollective.mcollective.command
D, [ 2013 - 12 -19T08: 49 : 51.635177  # 1696 ] DEBUG -- : stomp.rb Waiting  for  a message from Stomp

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

备注:puppet和facter的lib路径可能跟上面不符,可进行查看获得!



本文转自凌激冰51CTO博客,原文链接:http://blog.51cto.com/dreamfire/1343032,如需转载请自行联系原作者

相关文章
|
Docker 容器
Docker 容器与镜像的关系是什么?底层原理是什么?
Docker 容器与镜像的关系是什么?底层原理是什么?
728 0
|
8月前
|
Java API 调度
如何避免 Java 中的 TimeoutException 异常
在Java中,`TimeoutException`通常发生在执行操作超过预设时间时。要避免此异常,可以优化代码逻辑,减少不必要的等待;合理设置超时时间,确保其足够完成正常操作;使用异步处理或线程池管理任务,提高程序响应性。
420 13
|
8月前
|
数据采集 存储 数据处理
Python中的多线程编程及其在数据处理中的应用
本文深入探讨了Python中多线程编程的概念、原理和实现方法,并详细介绍了其在数据处理领域的应用。通过对比单线程与多线程的性能差异,展示了多线程编程在提升程序运行效率方面的显著优势。文章还提供了实际案例,帮助读者更好地理解和掌握多线程编程技术。
|
Java API 应用服务中间件
Java一分钟之-JNDI:Java命名和目录接口
【6月更文挑战第3天】JNDI,Java Naming and Directory Interface,是Java的API,用于访问命名和目录服务。本文聚焦JNDI常见问题和易错点:1) 初始化Context时需正确配置环境属性;2) 查找资源时确保名称与服务器配置一致;3) 别忘了导入JNDI库和妥善处理异常;4) 使用后记得关闭资源。理解JNDI并避免这些问题能提升应用的可维护性和灵活性。
419 2
|
9月前
|
Java Spring
【亲测有效完结bug】org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exce
【亲测有效完结bug】org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exce
1213 0
|
机器学习/深度学习 传感器 算法
【雷达回波】基于matlab模拟不同统计分布雷达散射截面和回波
【雷达回波】基于matlab模拟不同统计分布雷达散射截面和回波
|
NoSQL Cloud Native 关系型数据库
一张图读懂阿里云数据库架构和配置选择
一张图读懂阿里云数据库架构和配置选择,阿里云数据库大全
1314 1
|
弹性计算 运维 数据可视化
阿里云轻量应用服务器怎么用?使用教程来了
阿里云轻量应用服务器使用教程,包括轻量服务器远程连接方法、轻量服务器防火墙开放端口教程及轻量应用服务器更换操作系统方法等
2320 0
阿里云轻量应用服务器怎么用?使用教程来了
|
数据可视化 uml
UML——面向对象技术
封装(Encapsulation):隐藏对象的属性和实现细节,仅对外提供公共访问方式,提高复用性和安全性