Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mux_client_read_packet: read header failed: Broken pipe #23

Open
balucio opened this issue Sep 15, 2020 · 3 comments
Open

mux_client_read_packet: read header failed: Broken pipe #23

balucio opened this issue Sep 15, 2020 · 3 comments

Comments

@balucio
Copy link

balucio commented Sep 15, 2020

I tryed your module on following OpenWrt system

NAME="OpenWrt"
VERSION="2.0.0"
ID="openwrt"
ID_LIKE="lede openwrt"
PRETTY_NAME="OpenWrt 2.0.0"
VERSION_ID="2.0.0"
HOME_URL="%u"
BUG_URL="http://bugs.openwrt.org/"
SUPPORT_URL="http://forum.lede-project.org/"
BUILD_ID="r7402+17-0f543883cd"
LEDE_BOARD="sunxi/cortexa7"
LEDE_ARCH="arm_cortex-a7_neon-vfpv4"
LEDE_TAINTS="no-all glibc busybox"
LEDE_DEVICE_MANUFACTURER="Kerberos"
LEDE_DEVICE_MANUFACTURER_URL="www.x-monitor.it"
LEDE_DEVICE_PRODUCT="Generic"
LEDE_DEVICE_REVISION="1.0.0"
LEDE_RELEASE="OpenWrt 2.0.0 1.0"

using this simple playbook:


---
- hosts: rtus_poste

  roles:
    - ansible-openwrt

  tasks:

    - name: Commit
      uci:
         command: commit

Ansible version 2.9.6 on Linux Mint, I get this error:

fatal: [rtu_poste]: FAILED! => {
    "changed": false,
    "module_stderr": "OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f  31 Mar 2020\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug2: resolve_canonicalize: hostname 10.29.9.42 is address\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18875\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to 10.29.9.42 closed.\r\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 0
}
@sree0744
Copy link

Similar error observed in Centos7 and ansible 2.7.5

@nouknouk
Copy link

nouknouk commented May 22, 2022

Hi,

the same for me here:

  • pip show ansible | grep Version => Ansible Version: 5.6.0
  • ansible --version => ansible [core 2.12.4]
  • ansible-galaxy install gekmihesg.openwrt => gekmihesg.openwrt (master)

openwrt.yml:

- hosts: router
  roles:
    - gekmihesg.openwrt
  tasks:
    - name: commit changes
      uci:
        command: commit

ansible-playbook openwrt.yml -u root -k -vvvv => debug3: mux_client_read_packet: read header failed: Broken pipe

full log:

fatal: [router.lan]: FAILED! => {
    "changed": false,
    "module_stderr": "OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f  31 Mar 2020\r\ndebug1: Reading configuration data /home/nouknouk/.ssh/config\r\ndebug1: /home/nouknouk/.ssh/config line 10: Applying options for router.lan\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug1: auto-mux: Trying existing master\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 5071\r\ndebug3: mux_client_request_session: session request sent\r\ndebug3: mux_client_read_packet: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\nShared connection to router.lan closed.\r\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 0
}

note: with the exact same config, using another task, like opkg, runs successfully.

  tasks:
  - name: test opkg
    opkg: 
      name: tmux

Best regards.

@mossroy
Copy link

mossroy commented Nov 22, 2024

Same here, on any task using uci module.
Ansible 2.16.3 on Ubuntu 24.04
Turris Mox on Turris OS 7.3.0 (OpenWRT 22.03)

fatal: [turris]: FAILED! => {
    "changed": false,
    "module_stderr": "OpenSSH_9.6p1 Ubuntu-3ubuntu13.5, OpenSSL 3.0.13 30 Jan 2024\r\ndebug1: Reading configuration data /etc/ssh/ssh_config\r\ndebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files\r\ndebug1: /etc/ssh/ssh_config line 21: Applying options for *\r\ndebug2: resolve_canonicalize: hostname 192.168.1.1 is address\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/mossroy/.ssh/known_hosts'\r\ndebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/mossroy/.ssh/known_hosts2'\r\ndebug1: auto-mux: Trying existing master at '/home/mossroy/.ansible/cp/b9152b1ade'\r\ndebug2: fd 3 setting O_NONBLOCK\r\ndebug2: mux_client_hello_exchange: master version 4\r\ndebug3: mux_client_forwards: request forwardings: 0 local, 0 remote\r\ndebug3: mux_client_request_session: entering\r\ndebug3: mux_client_request_alive: entering\r\ndebug3: mux_client_request_alive: done pid = 18455\r\ndebug3: mux_client_request_session: session request sent\r\ndebug1: mux_client_request_session: master session id: 2\r\ndebug3: mux_client_read_packet_timeout: read header failed: Broken pipe\r\ndebug2: Received exit status from master 0\r\n",
    "module_stdout": "",
    "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
    "rc": 0
}

Everything works fine on tasks not using uci module.
And this playbook was working fine a few months ago on the same device. So it's probably a regression due to an upgrade somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants