Connection reset by peer on an AIX host provisioning

110 views
Skip to first unread message

Michaël Pailloncy

unread,
Jul 17, 2014, 8:37:16 AM7/17/14
to ansible...@googlegroups.com
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

Michael DeHaan

unread,
Jul 17, 2014, 9:35:15 PM7/17/14
to ansible...@googlegroups.com
Not sure.

Try running with -vvvv (four v's) to get SSH debug info out of the system.




--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/6e277907-cedc-47e3-b856-0c25506596cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lucas, Sascha

unread,
Jul 18, 2014, 2:20:29 AM7/18/14
to ansible...@googlegroups.com
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.

Michaël Pailloncy

unread,
Jul 18, 2014, 4:50:36 AM7/18/14
to ansible...@googlegroups.com
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
Reply all
Reply to author
Forward
0 new messages