gekmihesg/ansible-openwrt

mux_client_read_packet: read header failed: Broken pipe

balucio opened this issue · 2 comments

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
}

Similar error observed in Centos7 and ansible 2.7.5

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.