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:\ ...
随机推荐
- python3用pillow生成验证码,tornado中输出图片
原文链接http://blog.csdn.net/cdnight/article/details/49636893
- mysql 循环insert
亲测成功!可用,复制即可 DELIMITER ;; CREATE PROCEDURE test_insert() BEGIN DECLARE y TINYINT DEFAULT 1;WHILE y&l ...
- 一款纯html5实现的时钟
今天给大家分享一款非常漂亮的纯html5实现的时钟.整个界面都由html5绘制而成.一起看下效果图: 在线预览 源码下载 实现的代码. html代码: <div class="co ...
- 跟着百度学习php之ThinkPHP的运行流程-1
我在index\Lib\Action\目录下新建了一个ShowAction.class.php文件.ps:该目录是控制器的目录. 然后这个文件中继承了action这个类.代码如下: <?php ...
- [开机启动]Linux开机自启和运行级别
嵌入式系统中程序自启动方法 在很多嵌入式系统中,由于可用资源较少,常常在系统启动后就直接让应用程序自动启动,以减少用户操作和节省资源.如何让自己的应用程序自动启动呢? 在Linux系统中,配置应 ...
- 数据库 Navicat_Premium_11.0.10 破解版下载安装
下载地址:http://www.liangchan.net/soft/download.asp?softid=4785&downid=8&id=4804 破解说明:安装之后不要立即启动 ...
- 梯度下降算法到logistic回归
http://sbp810050504.blog.51cto.com/2799422/1608064/ http://blog.csdn.net/dongtingzhizi/article/detai ...
- linux 测试工具
最近在寻找linux的测试工具,试用了一些.记录如下. memtester 内存测试工具,通过对内存进行读写进行测试.可以对同一块空间进行多次的读写. 源码分析 http://www.cnblogs. ...
- 因此mybatis最好与spring集成起来使用
单独使用mybatis是有很多限制的(比如无法实现跨越多个session的事务),而且很多业务系统本来就是使用spring来管理的事务,因此mybatis最好与spring集成起来使用. spring ...
- Eclipse中如何clean项目以及clean的作用
http://blog.csdn.net/vipmao/article/details/51228171