AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[mcollective](server)

Martin Hope
Dziki_Jam
Asked: 2016-08-12 00:25:28 +0800 CST

Mcollective 无法设置完整的 SSL 验证模式错误

  • 1

根据“Learning Puppet 4”一书中的手册,我正在尝试使用 jorhett/puppet-mcollective 模块设置 MCollective。运行“mco ping”、“mco inventory node_name”等后出现以下错误。

警告 2016/08/11 07:21:19:activemq.rb:346:in `rescue in ssl_parameters' 无法设置完整的 SSL 验证模式,退回到未验证:RuntimeError:必须提供证书、密钥和 ca 以进行验证SSL 模式

这是我的配置:Hiera 主机名/puppetserver.yaml

# hostname/puppetserver.yaml
classes:
- mcollective::middleware
- mcollective::client
# Middleware configuration
mcollective::client_password: 'VpOS62qqpH3NEVEtP8rQsS2tpq6xwgOJEXsABjYDvoI='
mcollective::middleware::keystore_password: 'k7Dj+On3xGmQPX7CuCxgXaOFwHZFdKICeQQFpWlzg6E='
mcollective::middleware::truststore_password: 'k7Dj+On3xGmQPX7CuCxgXaOFwHZFdKICeQQFpWlzg6E='

Hiera common.yaml

---
puppet::status: 'running'
puppet::enabled: true

# every node installs the server
classes:
  - mcollective::server
# The Puppet Server will host the middleware
mcollective::hosts:
  - 'puppet.example.com'
mcollective::collectives:
  - 'mcollective'
mcollective::connector: 'activemq'
mcollective::connector_ssl: true
mcollective::connector_ssl_type: 'anonymous'
# Access passwords
mcollective::server_password: 'h3Vh7JGGkyWxuehCvScXRwZmIZYRHtDDDxuS1W68XAQ='
mcollective::psk_key: 'y2Z2BzcsRFXCBidywQafyJoELH5bIkmZzXGssLLMVsw='
mcollective::facts::cronjob::run_every: 10
mcollective::server::package_ensure: 'latest'
mcollective::plugin::agents:
  puppet:
    version: 'latest'
mcollective::client::unix_group: vagrant
mcollective::client::package_ensure: 'latest'
mcollective::plugin::clients:
  puppet:
    version: 'latest'

集体服务器.cfg

# /etc/mcollective/server.cfg
libdir = /usr/libexec/mcollective
libdir = /opt/puppetlabs/mcollective/plugins
classesfile = /opt/puppetlabs/puppet/cache/state/classes.txt
daemonize = 1
direct_addressing = 1
main_collective = mcollective
collectives = mcollective                                                       

# ActiveMQ connector settings:
connector = activemq
plugin.activemq.heartbeat_interval = 30
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = puppet.example.com
plugin.activemq.pool.1.port = 61614
plugin.activemq.pool.1.user = server
plugin.activemq.pool.1.password = h3Vh7JGGkyWxuehCvScXRwZmIZYRHtDDDxuS1W68XAQ=
plugin.activemq.pool.1.ssl = true
plugin.activemq.pool.1.ssl.fallback = true

# Send these messages to keep the Stomp connection alive.
# This solves NAT and firewall timeout problems.
registerinterval = 600

# Security provider
securityprovider = psk
plugin.psk = y2Z2BzcsRFXCBidywQafyJoELH5bIkmZzXGssLLMVsw=

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

# Puppet resource control
plugin.puppet.resource_allow_managed_resources = true
plugin.puppet.resource_type_whitelist = none

# Logging
logger_type = syslog
loglevel = info
logfacility = user

Mcollective 客户端.cfg

# Connector
libdir = /usr/libexec/mcollective
libdir = /opt/puppetlabs/mcollective/plugins
direct_addressing = 1
main_collective = mcollective
collectives = mcollective                                                                                                                                       

connector = activemq
plugin.activemq.heartbeat_interval = 30
plugin.activemq.pool.size = 1
plugin.activemq.pool.1.host = puppet.example.com
plugin.activemq.pool.1.port = 61614
plugin.activemq.pool.1.user = client
plugin.activemq.pool.1.password = VpOS62qqpH3NEVEtP8rQsS2tpq6xwgOJEXsABjYDvoI=
plugin.activemq.pool.1.ssl = true
plugin.activemq.pool.1.ssl.fallback = true

# Security provider
securityprovider = psk
plugin.psk = y2Z2BzcsRFXCBidywQafyJoELH5bIkmZzXGssLLMVsw=
plugin.psk.callertype = uid

# Discovery
default_discovery_method = mc
direct_addressing_threshold = 10
default_discovery_options =

# Miscellaneous settings
color = 1
rpclimitmethod = first

# Performance settings
direct_addressing_threshold = 10
ttl = 60

# Logging
logger_type = console
loglevel = warn
puppet centos7 activemq mcollective
  • 1 个回答
  • 431 Views
Martin Hope
Zama Ques
Asked: 2016-06-22 02:34:19 +0800 CST

Puppet Server 未应用清单

  • 1

我使用四个节点进行了 Puppet/MCollective 设置。

  # mco ping
  Node-010.test.com                   time=107.58 ms
  Node-003.test.com                   time=110.68 ms
  Node-009.test.com                   time=114.42 ms
  Node-002.test.com                   time=116.49 ms

#mco puppet runonce 工作正常,但没有应用清单。

  # mco puppet runonce
  * [ ============================================================> ] 4 / 4
  Finished processing 4 / 4 hosts in 151.61 ms

我的清单配置如下:

   # puppet master --configprint manifest
   /etc/puppetlabs/code/environments/production/manifests

我的 Site.pp 如下

  # cat /etc/puppetlabs/code/environments/production/manifests/site.pp
node default {
}
node 'Node-002.test.com'{
file {"/tmp/helloworld.txt":
      ensure => file,
      owner  => 'root',
      group  => 'root',
      mode   => '0644',
      content =>" Hi ",
   }
  }

Site.pp 没有得到应用。

从日志文件看,它似乎正在从缓存中读取并申请不存在规则的节点。

  ` # tail -f /var/log/puppetlabs/puppetserver/puppetserver.log
2016-06-21 20:21:06,355 INFO  [qtp1367105977-65] [puppet-server] Puppet    Compiled catalog for Node-009.test.com in environment qa in 0.04 seconds
2016-06-21 20:21:08,223 INFO  [qtp1367105977-65] [puppet-server] Puppet Caching node for Node-002.test.com
2016-06-21 20:21:08,618 INFO  [qtp1367105977-69] [puppet-server] Puppet Caching node for Node-002.test.com 

我是否遇到了一些错误或缺少一些配置项?

puppet puppetmaster mcollective
  • 1 个回答
  • 568 Views
Martin Hope
quanta
Asked: 2012-05-08 02:06:55 +0800 CST

MCollective 无法加载 Stomp 库?

  • 0

中央操作系统 5.5

重新启动时我遇到了这个问题mcollective:

# service mcollective restart
Shutting down mcollective: 
Starting mcollective: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- stomp (LoadError)
    from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
    from /usr/lib/ruby/site_ruby/1.8/mcollective.rb:2
    from /usr/sbin/mcollectived:3:in `require'
    from /usr/sbin/mcollectived:3
                                                           [FAILED]

STOMP 协议 Ruby 库已经安装:

# gem list stomp

*** LOCAL GEMS ***

stomp (1.2.2, 1.1.8)

我正在使用以下 RubyGems 环境运行 ruby​​ 1.8.7:

# ruby -v
ruby 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
# gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.8.7 (2008-05-31 patchlevel 0) [x86_64-linux]
  - INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /usr/local/lib/ruby/gems/1.8
     - /root/.gem/ruby/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

正如@RIPienaar指出的那样,我混淆了 2 个 Ruby 版本:一个是安装的yum,另一个是从源代码编译的。

我已经卸载了所有二进制 ruby​​-* 包,问题应该改为:

如何让 MCollective 找出从源代码编译的 Ruby(到/usr/local/bin)?:

# cd /usr/local/src/marionette-collective
# rake rpm
...
Building RPM for mcollective-2.0.0-1
================
which: no rpmbuild-md5 in (/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin:/opt/redis/bin)
error: Failed build dependencies:
    ruby is needed by mcollective-2.0.0-1.el5.noarch
    ruby(abi) = 1.8 is needed by mcollective-2.0.0-1.el5.noarch
rake aborted!
Failed: rpmbuild -D 'version 2.0.0' -D 'rpm_release 1' -D 'dist .el5' -D 'use_lsb 0' -ba /usr/src/redhat/SPECS/mcollective.spec
/usr/local/src/marionette-collective/Rakefile:35:in `safe_system'
(See full trace by running task with --trace)

或者如何从源代码编译 MCollective?

ruby puppet rabbitmq mcollective
  • 2 个回答
  • 2500 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve