一张点卡求教ansible大佬,密码明明正确,就是连不上,手动是可以连上的

Jockwell-avatar

Jockwell

2022-06-26T06:33:24+00:00

[admin@localhost ~]$ ansible all -i h1 -m ping -vvv
ansible 2.4.2.0
config file = /home/admin/ansible.cfg
configured module search path = [u'/home/admin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Oct 30 2018, 23:45:53) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
Using /home/admin/ansible.cfg as config file
Parsed /home/admin/h1 inventory source with ini plugin
META: ran handlers
Using module file /usr/lib/python2.7/site-packages/ansible/modules/system/ping.py
<1::80> ESTABLISH SSH CONNECTION FOR USER: useradmin
<1::80> SSH: EXEC sshpass -d11 ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o Port=22 -o User=useradmin -o ConnectTimeout=10 -o ControlPath=/home/admin/.ansible/cp/4da1dea790 1::80 '/bin/sh -c '"'"'echo ~ && sleep 0'"'"''
<1::80> (255, '', 'mux_client_request_session: session request failed: Session open refused by peer\r\nControlSocket /home/admin/.ansible/cp/4da1dea790 already exists, disabling multiplexing\r\nexec request failed on channel 0\r\n')
1::80 | UNREACHABLE! => {
"changed": false,
"msg": "Failed to connect to the host via ssh: mux_client_request_session: session request failed: Session open refused by peer\r\nControlSocket /home/admin/.ansible/cp/4da1dea790 already exists, disabling multiplexing\r\nexec request failed on channel 0\r\n",
"unreachable": true
}
[admin@localhost ~]$
AXEZ_-avatar

AXEZ_

[quote][tid=32545622]Topic[/tid] Post by [uid=62713290]Innocent-III[/uid] (2022-07-03 14:37):

[admin@localhost ~]$ ansible all -i h1 -m ping -vvv
ansible 2.4.2.0
config file = /home/admin/ansible.cfg
configured module search path = [u'/home/admin/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module lo[/quote]你要连的终端ssh起着吗
Jockwell-avatar

Jockwell

[quote][pid=622421814,32545622,1]Reply[/pid] Post by [uid=42632719]无解的一笔[/uid] (2022-07-03 14:52):

你要连的终端ssh起着吗[/quote]手动是可以连上的
AXEZ_-avatar

AXEZ_

可能你要连的终端不支持session复用 你把ansible这端controlmaster 关了 或者把终端的session复用打开
Jockwell-avatar

Jockwell

[quote][pid=622424507,32545622,1]Reply[/pid] Post by [uid=42632719]无解的一笔[/uid] (2022-07-03 15:08):
可能你要连的终端不支持session复用 你把ansible这端controlmaster 关了 或者把终端的session复用打开[/quote]终端是不能改的
我这台ansible机器应该改哪里呢?