Ansible安装过程中常遇到的错误(FAQ)
1.安装完成后允许命令报错
Traceback (most recent call last):
File "/usr/bin/ansible", line , in <module>
(runner, results) = cli.run(options, args)
File "/usr/bin/ansible", line , in run
extra_vars=extra_vars,
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line , in __init__
cmd = subprocess.Popen(['ssh','-o','ControlPersist'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/usr/lib64/python2.6/subprocess.py", line , in __init__
errread, errwrite)
File "/usr/lib64/python2.6/subprocess.py", line , in _execute_child
raise child_exception
OSError: [Errno ] No such file or directory
解决方法:
# yum install openssh-clients
2.出现Error: ansible requires a json module, none found!
SSH password:
10.0.1.110 | FAILED >> {
"failed": true,
"msg": "Error: ansible requires a json module, nonefound!",
"parsed": false
}
解决方法:
python版本过低,要不升级python要不就升级安装python-simplejson。
3.安装完成后连接客户端服务器报错
FAILED => Using a SSH password insteadof a key is not possible because Host Key checking is enabled and sshpass doesnot support this. Please add this host'sfingerprint to your known_hosts file to manage this host.
解决方法:
在ansible 服务器上使用ssh 登陆下/etc/ansible/hosts 里面配置的服务器。然后再次使用ansible 去管理就不会报上面的错误了!但这样大批量登陆就麻烦来。因为默认ansible是使用key验证的,如果使用密码登陆的服务器,使用ansible的话,要不修改ansible.cfg配置文件的ask_pass = True给取消注释,要不就在运行命令时候加上-k,这个意思是-k, --ask-pass ask for SSH password。再修改:host_key_checking= False即可
4.如果客户端不在know_hosts里将会报错
paramiko: The authenticity of host '192.168.24.15'can't be established.
The ssh-rsa key fingerprint is397c139fd4b0d763fcffaee346a4bf6b.
Are you sure you want to continueconnecting (yes/no)?
解决方法:
需要修改ansible.cfg的#host_key_checking= False取消注释
5.出现FAILED => FAILED: not a valid DSA private key file
解决方法:
需要你在最后添加参数-k
6.openssh升级后无法登录报错
PAM unable todlopen(/lib64/security/pam_stack.so): /lib64/security/pam_stack.so: cannot openshared object
file: No such file or directory
解决方法:
sshrpm 升级后会修改/etc/pam.d/sshd 文件。需要升级前备份此文件最后还原即可登录。
7.第一次系统初始化运行生成本机ansible用户key时报错
failed: [127.0.0.1] =>{"checksum": "f5f2f20fc0774be961fffb951a50023e31abe920","failed": true}
msg: Aborting, target uses selinux but pythonbindings (libselinux-python) aren't installed!
FATAL: all hosts have already failed –aborting
解决方法:
# yum install libselinux-python -y
Ansible安装过程中常遇到的错误(FAQ)的更多相关文章
- MinGW-w64安装过程中出现ERROR res错误的问题
使用 mingw-get-setup.exe 安装.在官网http://www.mingw.org/上搜索download/installer,点击下载. 如果使用 mingw-w64-install ...
- mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决
mysql安装过程中出现错误ERROR 1820 (HY000): You must SET PASSWORD before executing this statement解决 最近新装好的my ...
- mysql-5.5.28源码安装过程中错误总结
介绍一下关于mysql-5.5.28源码安装过程中几大错误总结,希望此文章对各位同学有所帮助.系统centOS 6.3 mini (没有任何编译环境)预编译环境首先装了众所周知的 cmake(yum ...
- mysql安装过程中出现的错误问题解决方案
最近在学Django,因为与数据库相关,所以我下载并安装了MySQL,安装的过程真的是一把辛酸泪啊.安装过后,查看是否可以使用,出现了cann't connect to mysql server这个错 ...
- AS安装过程中出现的错误
1.首先是You may need to adjust the proxy settings in Gradle.的错误, 主要是看你有没有图中红线所画的gradle的压缩包 如果没有,那就前往htt ...
- hadoop安装过程中出现的错误
此次来记录一下我在安装Hadoop安装过程中出现的错误,安装过程参照慕课网林子雨教程进行安装,在尝试过程中出现的错误如下: 1.在安装Ubuntu时,新建虚拟电脑时,并没有在版本的输入框中有Ubunt ...
- Jenkins. 安装过程中出现一个错误: No such plugin: cloudbees-folder
安装过程中出现一个错误: No such plugin: cloudbees-folder 安装插件,有时候会报类似的错误:An error occurred during installation: ...
- Mysql安装过程中出现apply security settings错误的解决方法
在学习Mysql的过程中,首先要安装Mysql.然而在第一遍安装过程中难免会出现安装错误的时候,当卸载后第二次安装(或者第三次甚至更多次)的时候,往往在安装最后一步会出现apply security ...
- win7 安装过程中遇到的错误解决方法
win7 安装过程中遇到的错误解决方法 windows安装无法继续.若要安装windows 请单击 确定 重新启动计算机: 当 出现如上提示的时候,按下shift+f10 会打开命令窗口,进入到C:\ ...
随机推荐
- 流式布局的使用方法--Masonry
http://www.jq22.com/demo/masonry/ 范例 css部分 body { background-color: #c7cad0; } .post_box { backgroun ...
- 【鉴别】日版iPhone如何通过IMEI查询运营商
SoftBank.au.docomo是日本的三大运营商,以前日本不同运营商的iPhone在型号上进行区分,但iPhone5s/5c上三个运营商的型号都一致,所以无法在型号上对运营商进行区分,本文介绍通 ...
- SpringMVC之学习(1)
先来一个springmvc的基本配置,照样输出hello world 1.先导入springmvc所需要的开发包 最起码需要这么多的基本包,然后开始上配置 2.先在web.xml里进行引入,和Stru ...
- java 错误汇总
一.怎么处理警告:编码 GBK 的不可映射字符 解决办法是:应该使用-encoding参数指明编码方式:javac -encoding UTF-8 XX.java,这下没警告了,运行也正确了在JCre ...
- tomcat上
1. Tomcat简介 Tomcat是一个web服务器 web服务器:httpd,nginx web 处理静态文件:html css.js.jpg,png Tomcat 处理 html文件 php软件 ...
- 条件随机场(Conditional random field,CRF)
- Matlab 实现神经网络实例
% Matlab实现简单BP神经网络 % http://blog.csdn.net/zjccoder/article/details/40713147 : %样本个数 xx(i)=*pi*(i-)/; ...
- JAVA中有一个特殊的类: Object
JAVA中有一个特殊的类: Object.它是JAVA体系中所有类的父类(直接父类或者间接父类). 此类中的方法可以使所的类均继承. 以下介绍的三种方法属于Object: (1) finalize方法 ...
- expected_conditions判断页面元素
expected_condtions提供了16种判断页面元素的方法: 1.title_is:判断当前页面的title是否完全等于预期字符串,返回布尔值 2.title_contains:判断当前页面的 ...
- Excel 一个工作表进行按行数拆分
1. 如下Excel表,总共有120多行数据,如何将以50行数据为一个工作表进行拆分 Sub ZheFenSheet() Dim r, c, i, WJhangshu, WJshu, bt As Lo ...