Ansible cannot connect via SSH / broken pipe problem

155 views
Skip to first unread message

Alexey Eromenko

unread,
Sep 19, 2018, 5:09:06 AM9/19/18
to Ansible Project
fatal: [finland-07]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: mux_client_hello_exchange: write packet: Broken pipe\r\n", "unreachable": true}
fatal: [finland-08]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: mux_client_hello_exchange: write packet: Broken pipe\r\n", "unreachable": true}

Any ideas why ?

Karl Auer

unread,
Sep 19, 2018, 5:19:58 AM9/19/18
to ansible-project
This usually means a network-level failure rather than a DNS or protocol failure.

Look at the addressing information for whatever the finland-7 host is.

- if it is a name, can you resolve it (on whatever host is doing the ssh)?

- if it does resolve, is the IP address an address that should be able to be reached (from the host doing the ssh)?

- if *should* be reachable, is it *actually* reachable (from the host doing the ssh)?

Regards, K.



--
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-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/52af07fe-965a-42cc-a832-d7fe3d360d4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Auer

Email  : ka...@2pisoftware.com
Website: 
http://2pisoftware.com

GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA

Alexey Eromenko

unread,
Sep 19, 2018, 5:27:51 AM9/19/18
to ansible...@googlegroups.com
All the hosts are reachable by IP address. And hosts list is part of
my ansible script.

On Wed, Sep 19, 2018 at 12:19 PM Karl Auer <ka...@2pisoftware.com> wrote:
>
> This usually means a network-level failure rather than a DNS or protocol failure.
>
> Look at the addressing information for whatever the finland-7 host is.
>
> - if it is a name, can you resolve it (on whatever host is doing the ssh)?
>
> - if it does resolve, is the IP address an address that should be able to be reached (from the host doing the ssh)?
>
> - if *should* be reachable, is it *actually* reachable (from the host doing the ssh)?
>
> Regards, K.
>
>
>
> On Wed, Sep 19, 2018 at 7:09 PM, Alexey Eromenko <al4...@gmail.com> wrote:
>>
>> fatal: [finland-07]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: mux_client_hello_exchange: write packet: Broken pipe\r\n", "unreachable": true}
>> fatal: [finland-08]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: mux_client_hello_exchange: write packet: Broken pipe\r\n", "unreachable": true}
>>
>> Any ideas why ?
>>
>> --
>> 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/52af07fe-965a-42cc-a832-d7fe3d360d4b%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Karl Auer
>
> Email : ka...@2pisoftware.com
> Website: http://2pisoftware.com
>
> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA
>
> --
> 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/CA%2B%2BT08R%3Dq6Ud_OZn8Ltz3dyH7hSRxgrke5G1t2Q3wzE3hXscPw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
-Alexey Eromenko "Technologov"

Karl Auer

unread,
Sep 19, 2018, 6:02:30 AM9/19/18
to ansible-project
Are they reachable *from the host where the ssh client is running*?

Is the host "finland-7" definitely the host you think it is?
Is the name or IP address of that host definitely what you think it is?
Is the host you think ssh is running on definitely the host it is actually running on?

Sherlock Holmes said that when you have eliminated the impossible, whatever remains, however improbable, must be the truth.

Ansible is telling you the host is unreachable. There is something you don't know. Check everything.

Regards, K.


On Wed, Sep 19, 2018 at 7:27 PM, Alexey Eromenko <al4...@gmail.com> wrote:
All the hosts are reachable by IP address. And hosts list is part of
my ansible script.

On Wed, Sep 19, 2018 at 12:19 PM Karl Auer <ka...@2pisoftware.com> wrote:
>
> This usually means a network-level failure rather than a DNS or protocol failure.
>
> Look at the addressing information for whatever the finland-7 host is.
>
> - if it is a name, can you resolve it (on whatever host is doing the ssh)?
>
> - if it does resolve, is the IP address an address that should be able to be reached (from the host doing the ssh)?
>
> - if *should* be reachable, is it *actually* reachable (from the host doing the ssh)?
>
> Regards, K.
>
>
>
> On Wed, Sep 19, 2018 at 7:09 PM, Alexey Eromenko <al4...@gmail.com> wrote:
>>
>> fatal: [finland-07]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: mux_client_hello_exchange: write packet: Broken pipe\r\n", "unreachable": true}
>> fatal: [finland-08]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: mux_client_hello_exchange: write packet: Broken pipe\r\n", "unreachable": true}
>>
>> Any ideas why ?
>>
>> --
>> 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-project+unsubscribe@googlegroups.com.
>> To post to this group, send email to ansible-project@googlegroups.com.

>> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/52af07fe-965a-42cc-a832-d7fe3d360d4b%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
> --
> Karl Auer
>
> Email  : ka...@2pisoftware.com
> Website: http://2pisoftware.com
>
> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816
> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA
>
> --
> 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-project+unsubscribe@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.



--
-Alexey Eromenko "Technologov"

--
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-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAOJ6w%3DF9rvhHLdb%3DR0sF1%3DQHnXR28BO3dwFeiL0A8WFsLR%2BXDg%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Alexey Eromenko

unread,
Sep 19, 2018, 6:09:14 AM9/19/18
to ansible...@googlegroups.com
On Wed, Sep 19, 2018 at 1:02 PM Karl Auer <ka...@2pisoftware.com> wrote:
>
> Are they reachable *from the host where the ssh client is running*?
>
> Is the host "finland-7" definitely the host you think it is?
> Is the name or IP address of that host definitely what you think it is?
> Is the host you think ssh is running on definitely the host it is actually running on?
>

From my file, "hosts":
finland-07 ansible_host=95.216.19.219 ansible_port=22
finland-08 ansible_host=95.216.21.109 ansible_port=22
Basically ALL connects go via IP address, NOTHING goes via SSH.

> Sherlock Holmes said that when you have eliminated the impossible, whatever remains, however improbable, must be the truth.
Yes, manual SSH connection to IP 95.216.19.219 of finland-07 works great.
>
> Ansible is telling you the host is unreachable. There is something you don't know. Check everything.

And it works on the next run...
Ansible works on the next run, with a different set of hosts failing
to connect at random.

Alexey Eromenko

unread,
Sep 19, 2018, 8:10:42 PM9/19/18
to ansible...@googlegroups.com
opened bug:
Ansible cannot connect via SSH / broken pipe problem #45833
https://github.com/ansible/ansible/issues/45833

Kai Stian Olstad

unread,
Sep 20, 2018, 1:28:37 AM9/20/18
to ansible...@googlegroups.com
You need to at least upgrade Ansible before filing a issue, version 2.2 isn't supported anymore.

https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#release-status


--
Kai Stian Olstad


Alexey Eromenko

unread,
Sep 21, 2018, 11:15:06 PM9/21/18
to ansible...@googlegroups.com
Were there any changes between v2.2 and v2.5 regarding SSH connect module ?

--
-Alexey Eromenko "Technologov"

Kai Stian Olstad

unread,
Sep 22, 2018, 3:51:19 AM9/22/18
to ansible...@googlegroups.com
Number of commits that has changed the file:

$ git log --oneline origin/stable-2.2..origin/stable-2.5 -- lib/ansible/plugins/connection/ssh.py | wc -l
45

$ git log --oneline origin/stable-2.2..origin/stable-2.6 -- lib/ansible/plugins/connection/ssh.py | wc -l
50


--
Kai Stian Olstad


Reply all
Reply to author
Forward
0 new messages