免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5656 | 回复: 2

[Salt] salt客户端报错 [复制链接]

论坛徽章:
1
天秤座
日期:2014-11-05 16:54:55
发表于 2015-06-08 15:08 |显示全部楼层
salt-master配置:
sed '/^$/d;/^#/d' /etc/salt/master
interface: 0.0.0.0
log_file: /var/log/salt/master
nodegroups:
  PartC: 'test-web01,test-web02'
  PartB: 'test-ws01,test-ws02'

salt-minion配置:
sed '/^#/d;/^$/d' /etc/salt/minion
master: 192.168.1.10
id: test-web01
schedule:
  highstate:
    function: state.highstate
    minutes: 5

tree /srv/salt/
├── file
│   ├── init.sls
│   └── resolv.conf

├── file1
│   ├── init.sls
│   └── resolv.conf
└── top.sls



vim /srv/salt/top.sls
base:
  PartC:
   - match: nodegroup
   - file
  PartB:
   - match: nodegroup
   - file1



vim /srv/salt/file/init.sls
/etc/resolv.conf:
  file.managed:
    - source: salt://file/resolv.conf
    - user: root
    - group: root
    - mode: 644

tail /vat/log/salt/master

015-06-08 11:47:17,346 [salt.master                                ][WARNING ] Authentication failure of type "user" occurred.
2015-06-08 13:30:35,516 [salt.master                                ][WARNING ] Authentication failure of type "user" occurred.
2015-06-08 13:33:27,280 [salt.master                                ][WARNING ] Authentication failure of type "user" occurred.
2015-06-08 13:34:17,917 [salt.master                                ][WARNING ] Authentication failure of type "user" occurred.


tail /var/log/salt/minion

TypeError: string indices must be integers, not str
2015-06-08 14:28:01,692 [salt.utils.schedule                         ][ERROR   ] Unhandled exception running state.highstate
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/utils/schedule.py", line 421, in handle_func
    ret['return'] = self.functions[func]()
  File "/usr/lib/python2.6/site-packages/salt/modules/state.py", line 317, in highstate
    st_ = salt.state.HighState(opts, pillar, kwargs.get('__pub_jid'))
  File "/usr/lib/python2.6/site-packages/salt/state.py", line 2924, in __init__
    self.state = State(self.opts, pillar, jid)
  File "/usr/lib/python2.6/site-packages/salt/state.py", line 562, in __init__
    self.opts['pillar'] = self._gather_pillar()
  File "/usr/lib/python2.6/site-packages/salt/state.py", line 581, in _gather_pillar
    ret = pillar.compile_pillar()
  File "/usr/lib/python2.6/site-packages/salt/pillar/__init__.py", line 91, in compile_pillar
    ret_pillar = self.sreq.crypted_transfer_decode_dictentry(load, dictkey='pillar', tries=3, timeout=7200)
  File "/usr/lib/python2.6/site-packages/salt/transport/__init__.py", line 236, in crypted_transfer_decode_dictentry
    aes = key.private_decrypt(ret['key'], 4)
TypeError: string indices must be integers, not str
2015-06-08 13:47:43,951 [salt.log.setup                           ][ERROR   ] An un-handled exception was caught by salt's global exception handler:
TypeError: string indices must be integers, not str
Traceback (most recent call last):
  File "/usr/bin/salt-minion", line 14, in <module>
    salt_minion()
  File "/usr/lib/python2.6/site-packages/salt/scripts.py", line 56, in salt_minion
    minion.start()
  File "/usr/lib/python2.6/site-packages/salt/__init__.py", line 262, in start
    self.prepare()
  File "/usr/lib/python2.6/site-packages/salt/__init__.py", line 241, in prepare
    self.minion = salt.minion.Minion(self.config)
  File "/usr/lib/python2.6/site-packages/salt/minion.py", line 603, in __init__
    opts['environment'],
  File "/usr/lib/python2.6/site-packages/salt/pillar/__init__.py", line 91, in compile_pillar
    ret_pillar = self.sreq.crypted_transfer_decode_dictentry(load, dictkey='pillar', tries=3, timeout=7200)
  File "/usr/lib/python2.6/site-packages/salt/transport/__init__.py", line 236, in crypted_transfer_decode_dictentry
    aes = key.private_decrypt(ret['key'], 4)
TypeError: string indices must be integers, not str



请教大神帮忙看看是什么原因导致的,执行同步老是执行不了,而且客户端的salt-minion进程总是退出。





论坛徽章:
0
发表于 2016-01-22 11:53 |显示全部楼层
用python2.6

论坛徽章:
0
发表于 2016-03-28 07:33 |显示全部楼层
python2.6  在运维中 使用得比较多
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

DTCC2020中国数据库技术大会

【架构革新 高效可控】2020年12月21日-23日第十一届中国数据库技术大会将在北京隆重召开。

大会设置2大主会场,20+技术专场,将邀请超百位行业专家,重点围绕数据架构、AI与大数据、传统企业数据库实践和国产开源数据库等内容展开分享和探讨,为广大数据领域从业人士提供一场年度盛会和交流平台。

http://dtcc.it168.com


大会官网>>
  

北京盛拓优讯信息技术有限公司. 版权所有 16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122
中国互联网协会会员  联系我们:huangweiwei@it168.com
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP