Hi all,
I have a problem to provision an AIX host using Ansible (see https://github.com/ansible/ansible/issues/8164 for details).
$> ansible -i myhosts aix -m ping -vvvv
Result :
<aix> ESTABLISH CONNECTION FOR USER: myuser
<aix> REMOTE_MODULE ping
<aix> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/ansible/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'User=myuser', '-o', 'ConnectTimeout=10', 'aix', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163 && echo $HOME/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163'"]
<aix> PUT /tmp/tmpb1NMJ5 TO /ansible/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163/ping
aix | FAILED => failed to transfer file to /ansible/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163/ping:
Couldn't read packet: Connection reset by peer
I don’t think it’s a network problem since I can connect successfully using SSH on this host.
Thanks in advance.
Michaël Pailloncy
Not sure.
Try running with -vvvv (four v’s) to get SSH debug info out of the system.
Hi Michaël,
<aix> PUT /tmp/tmpb1NMJ5 TO /ansible/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163/ping
aix | FAILED => failed to transfer file to /ansible/.ansible/tmp/ansible-tmp-1405515992.16-30163890915163/ping:
Couldn't read packet: Connection reset by peer
On peer reset, the chance is high to find some hints in the AIX system logs...
It seems, that "scp" is failing, where ansible tries to copy the ping module over to your AIX. Mostly this is the case, when you have some "ugly" login-scripts, that write something to stdout even in non interactive session (like scp uses). You should check by hand, if scp to AIX works.
Sometimes we have a similar problem, when remote user is root. I couldn't find the cause, but using "-c paramiko" helped.
Thanks, Sascha.
Stellvertretender Vorsitzender des Aufsichtsrates: Detlef Hillebrand
Geschäftsführung: Michael Krüger
Sitz der Gesellschaft: Halle/Saale
Registergericht: Amtsgericht Stendal | Handelsregister-Nr. HRB 208414
UST-ID-Nr. DE 158253683
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Empfänger sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail oder des Inhalts dieser Mail sind nicht gestattet. Diese Kommunikation per E-Mail ist nicht gegen den Zugriff durch Dritte geschützt. Die GISA GmbH haftet ausdrücklich nicht für den Inhalt und die Vollständigkeit von E-Mails und den gegebenenfalls daraus entstehenden Schaden. Sollte trotz der bestehenden Viren-Schutzprogramme durch diese E-Mail ein Virus in Ihr System gelangen, so haftet die GISA GmbH - soweit gesetzlich zulässig - nicht für die hieraus entstehenden Schäden.
Hi,
I’ve tried an scp from and to the AIX host and it works correctly.
The problem seems to be related to sftp : http://docs.ansible.com/intro_configuration.html#scp-if-ssh
I have set scp_if_ssh=True in ansible.cfg and the ping module works well now.
Thanks for your help !
Michaël