saltstack配置安装的一些关键步骤及安装时各种报错的分析
以下其他仅做参考,官方网址才是安装重点:http://docs.saltstack.cn/topics/installation/rhel.html
与安装相关的一些文档或资料:
一、linux服务器安装:
http://blog.chinaunix.net/xmlrpc.php?r=blog/article&uid=12067603&id=4027192
源码安装与简单配置http://blog.chinaunix.net/uid-20908097-id-3984933.html
二、架构描述:http://www.361way.com/saltstack-install/3123.html
三、grain各类代理、设备静态设置
四、saltstack 的实际应用开发
http://xiaorui.cc/2014/11/18/%E7%94%A8saltstack%E7%9A%84returners%E5%AE%9E%E7%8E%B0%E6%89%B9%E9%87%8F%E7%9B%91%E6%8E%A7%E5%92%8C%E6%95%B0%E6%8D%AE%E5%AD%98%E5%82%A8/
五、zeroMQ消息队列处理http://www.bubuko.com/infodetail-450639.html
六、内嵌的openstack模块:
salt-openstack-utils-neutron 网络地址等资源管理,划分物理网络
salt-openstack-utils-nova计算组织控制器,计算所有活动的生命周期
swift 对象存储,兼具SAN高速直接访问磁盘特点及NAS的分布式共享特点。
七、salt安装:http://docs.saltstack.cn/topics/installation/rhel.html
八、安装完毕后,用命令查看启动进程是否起来
ps
-ef | grep
-i salt | grep
-v
saltsta+ | grep
-v
grep
九、必要时可祭出日志文件查看日志:cat /var/log/salt/minion
cat /var/log/salt/master
=================分割线=====================
一、一些低级错误:
1
、
在代码里发现部分静态配置文件,例如/usr/lib/python2.7/site-packages/salt/config.py
DEFAULT_MASTER_OPTS = {
'interface': '0.0.0.0',
'publish_port': '4505',
'pub_hwm': 1000,
'auth_mode': 1,
千万不要手贱去改
2、vi /etc/salt/master修改user,若改错则提示无权限
3、/usr/lib/python2.7/site-packages/salt/config.py文件里的'interface'不为0.0.0.0时显示超时:
Salt request timed out. The master is not responding. If this error persists after verifying the master is up, worker_threads may need to be increased.
若正确后仍然超时,修改
/etc/salt/master
的worker_threads,改大
二、启动saltmaster服务时,报错AttributeError: 'module' object has no attribute 'BASE_THORIUM_ROOTS_DIR'
在vi /etc/salt/master或site-packages的__init__.py注释掉BASE_THORIUM_ROOTS_DIR相关模块或源码 目前原因未明
三、在同一台电脑上装minion,然后进行测试:
1
、yum install salt-minion
2、安装完毕后
在/etc/salt的minion里写上master:127.0.0.1,master的ip
然后service salt-minion restart
3、输入salt-key list,显示minions:
- 10.1.240.181
minions_denied:
minions_pre:
minions_rejected:
已可查看到子机
四、在/etc/salt/master的配置文件中没有配置自动接收key,可以使用以下命令salt-key -A
显示如下时成功:The key glob '*' does not match any unaccepted keys.
五、一个问题引发的多种病症:
1、salt '*'
sys.doc
报错:
self._print_docs(ret)
File "/usr/lib/python2.7/site-packages/salt/cli/salt.py", line 344, in _print_docs
if ret[host][fun]:
TypeError: string indices must be integers, not str
Traceback (most recent call last):
File "/usr/bin/salt", line 10, in <module>
salt_main()
File "/usr/lib/python2.7/site-packages/salt/scripts.py", line 458, in salt_main
client.run()
File "/usr/lib/python2.7/site-packages/salt/cli/salt.py", line 195, in run
self._output_ret(ret, out)
File "/usr/lib/python2.7/site-packages/salt/cli/salt.py", line 300, in _output_ret
self._print_docs(ret)
File "/usr/lib/python2.7/site-packages/salt/cli/salt.py", line 344, in _print_docs
if ret[host][fun]:
TypeError: string indices must be integers, not str
2、salt "*" cmd.run "df -h"
得到结果:
10.1.240.181:
Minion did not return. [No response]
3、使用调试语句:salt-minion -l debug
发现有类似报错:
in "<string>", line 44, column 1:
id:host172
^
could not found expected ':'
in "<string>", line 46, column 1:
# Append a domain to a hostname ...
原来/etc/salt/minion及/etc/salt/master配置文件中,master: 192.168.10.16等相关配置项的冒号后面都需要有一个空格,问题解决
saltstack配置安装的一些关键步骤及安装时各种报错的分析的更多相关文章
- python已安装了DNS处理模块,执行时却报错ImportError
一.代码: #!/usr/bin/python import dns.resolver ............此处省略 二.故障报错 ubuntu:~/automation/001_base$ py ...
- linux(centos8):基于java13安装rocketmq-4.7.1(解决jdk不兼容的报错)
一,Rocketmq是什么? 1, RocketMQ是一个队列模型的消息中间件,具有高性能.高可靠.高实时.分布式特点 相比kafka,rocketmq的实时性更强 2,官方网站: http://ro ...
- 安装vue-cli时-4058报错的解决方法
一.报错信息 安装vue-cli时-4058报错 二.解决办法 1.安装淘宝镜像 npm --registry https://registry.npm.taobao.org info undersc ...
- 安装了nodejs后在命令行运行npm报错
安装了nodejs后在命令行运行npm报错:Error: Cannot find module 'internal/util/types' 解决方法:删除目录“C:\Users\mengxiaobo\ ...
- 【Devops】【docker】【CI/CD】Jenkins自动安装JDK需要提供Oracle的账号密码,否则报错:Unable ro auto-install JDK until the license is accepted
Jenkins自动安装JDK需要提供Oracle的账号密码,否则报错:Unable ro auto-install JDK until the license is accepted 解决方法: ...
- vue-cli 安装时 npm 报错 errno -4048
如何解决vue-cli 安装时 npm 报错 errno -4048 第一种解决方法:以管理身份运行cmd.exe 第二种解决办法:在dos窗口输入命令 npm cache clean --fo ...
- 按照教程自动安装RFNoC时.在使用pip安装pybombs时出现报错,解决办法
$ sudo apt-get install git $ sudo apt-get install python-setuptools python-dev python-pip build-esse ...
- bootcamp安装win7的详细步骤 (光盘安装)
bootcamp安装win7的详细步骤 首先是要您确定以下内容(1)您的Mac系统下是一个盘符,也就是“macintosh hd”一个磁盘.如果不是的话,首先您需要做的是备份您分区下面的资料,让磁 ...
- vue.js环境配置步骤及npm run dev报错解决方案
安装完成后,使用npm run dev 运行,成功后,就可以在浏览器中看到vue的欢迎画面了 最后一步可能报错,我就遇到这样的问题了, 个人问题仅供参考: ERROR Failed to compil ...
随机推荐
- 314. Binary Tree Vertical Order Traversal
题目: Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to ...
- 267. Palindrome Permutation II
题目: Given a string s, return all the palindromic permutations (without duplicates) of it. Return an ...
- 两则C++知识点
返回引用遵守的两条准则: 1. 不能返回局部变量: 2. 不能返回new出的量,因为可能是临时对象. const的用法: 1. 基本数据类型的写限制: 2. 函数的传入以及返回参数: 3. 类内的数据 ...
- Deeplearning原文作者Hinton代码注解
[z]Deeplearning原文作者Hinton代码注解 跑Hinton最初代码时看到这篇注释文章,很少细心,待研究... 原文地址:>http://www.cnblogs.com/BeDPS ...
- C# 字符串计算表达式
C# 字符串计算表达式 string str="4+4+2.1"; 要的效果: double sum=4+4+2.1: 方案一: 动态计算表达式: 1 public class ...
- 最短JS判断是否为IE6(IE的写法) (转)
常用的 JavaScript 检测浏览器为 IE 是哪个版本的代码,包括是否是最人极端厌恶的 ie6 识别与检测. 代码如下: var isIE = !!window.ActiveXObject; v ...
- Ubuntu Server搭建svn服务以及迁移方法【转】
转自:http://www.linuxidc.com/Linux/2013-05/84693.htm Ubuntu Server搭建svn服务以及迁移方法 采用apache+svn,http访问方式. ...
- C# 时间戳和时间的相互转换
时间戳定义为从格林威治时间 1970年01月01日00时00分00秒(北京时间1970年01月01日08时00分00秒)起至现在的总秒数. C#格式时间转时间戳Timestamp private in ...
- BZOJ 2006 超级钢琴(划分树+优先队列)
题目链接:http://61.187.179.132/JudgeOnline/problem.php?id=2006 题意: 给出一个数列A,L,R,构造出一个新的集合,集合中的数字为A中任意连续t( ...
- RSA (cryptosystem)
https://en.wikipedia.org/wiki/RSA_(cryptosystem) RSA is one of the first practical实用性的 public-key cr ...