SSH connect failures on Mitogen 0.2.9 on WSL Ubuntu 18.04
See original GitHub issueI’m seeing consistent failures when trying to connect via SSH when multiple hosts are specified in the inventory:
TASK [Gathering Facts] **********************************************************************************************************************************************ERROR! [mux 15260] 10:54:20.330539 E mitogen: <Stream ssh.stage-web1 #6e10> crashed
Traceback (most recent call last):
File "/home/gchaix/repos/xxx/ansible/plugins/mitogen-0.2.9/mitogen/core.py", line 3481, in _call
func(self)
File "/home/gchaix/repos/xxx/ansible/plugins/mitogen-0.2.9/mitogen/core.py", line 1719, in on_transmit
self.protocol.on_transmit(broker)
File "/home/gchaix/repos/xxx/ansible/plugins/mitogen-0.2.9/mitogen/core.py", line 2167, in on_transmit
self._writer.on_transmit(broker)
File "/home/gchaix/repos/xxx/ansible/plugins/mitogen-0.2.9/mitogen/core.py", line 1907, in on_transmit
written = self._protocol.stream.transmit_side.write(buf)
File "/home/gchaix/repos/xxx/ansible/plugins/mitogen-0.2.9/mitogen/core.py", line 2033, in write
written, disconnected = io_op(os.write, self.fd, s)
File "/home/gchaix/repos/xxx/ansible/plugins/mitogen-0.2.9/mitogen/core.py", line 553, in io_op
return func(*args), None
OSError: [Errno 11] Resource temporarily unavailable
fatal: [stage-web1]: UNREACHABLE! => {"changed": false, "msg": "Mitogen was disconnected from the remote environment while a call was in-progress. If you feel this is in error, please file a bug. Original error was: the respondent Context has disconnected", "unreachable": true}
ok: [stage-web2]
One host connects, all of the host connections other fail. If there are more than two hosts in the inventory, all but one fail with the same errors. Repeated runs show that the host that fails appears to be random.
PLAY RECAP **********************************************************************************************************************************************************
prod-solr1 : ok=0 changed=0 unreachable=1 failed=0
prod-solr2 : ok=0 changed=0 unreachable=1 failed=0
prod-solr3 : ok=0 changed=0 unreachable=1 failed=0
prod-util1 : ok=8 changed=0 unreachable=0 failed=0
prod-web1 : ok=0 changed=0 unreachable=1 failed=0
prod-web2 : ok=0 changed=0 unreachable=1 failed=0
prod-web3 : ok=0 changed=0 unreachable=1 failed=0
Environment:
Mitogen 0.2.9
Windows 10 Pro, V. 1809, OS build 17763.914
WSL Ubuntu 18.04.3 LTS
ansible 2.7.11 config file = /home/gchaix/repos/xxx/ansible/ansible.cfg configured module search path = [u'/home/gchaix/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /home/gchaix/.local/lib/python2.7/site-packages/ansible executable location = /home/gchaix/.local/bin/ansible python version = 2.7.15+ (default, Oct 7 2019, 17:39:04) [GCC 7.4.0]
Host target OS is generally CentOS 7.x but this also appears to be happening with other distros (Ubuntu, etc.)
No patches on Ansible or Mitogen. I tried running it with Mitogen current master, same behavior. This feels like it might be related to #319 but I’m not familiar enough with the internals of WSL to really say for certain. Interestingly, running Ansible with -vvv
seems to bypass the issue, as all host connections succeed, whereas running with just --verbose
produces failure and the output above.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:18
I’m still on WSL1 and definitely seeing the problem. Sadly, I don’t know of any test envs that provide WSL instances to test.
I’m still seeing failures on
master
@ a5fe4a9f