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

Socket is closed errors #202

Open
janrv opened this issue Jan 8, 2021 · 1 comment
Open

Socket is closed errors #202

janrv opened this issue Jan 8, 2021 · 1 comment
Assignees

Comments

@janrv
Copy link

janrv commented Jan 8, 2021

I have been experiencing a lot of issues regarding the error: Socket is closed.

<10.248.0.101> EXEC /bin/sh -c 'rm -f -r /var/lib/awx/.ansible/tmp/ansible-local-2204217scxicep8/ansible-tmp-1610100647.0131307-2204280-216849336352314/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
  File "/tmp/ansible_ansible.netcommon.cli_command_payload_8codvpkz/ansible_ansible.netcommon.cli_command_payload.zip/ansible_collections/ansible/netcommon/plugins/modules/cli_command.py", line 170, in main
  File "/tmp/ansible_ansible.netcommon.cli_command_payload_8codvpkz/ansible_ansible.netcommon.cli_command_payload.zip/ansible/module_utils/connection.py", line 185, in __rpc__
    raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
fatal: [10.248.0.101]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "answer": null,
            "check_all": false,
            "command": "vsx stat -v | grep CI00056582",
            "newline": true,
            "prompt": null,
            "sendonly": false
        }
    },
    "msg": "Socket is closed"

This seems to occur randomly towards hosts in my inventory and I have no idea how to prevent this from occurring nor do I understand why this is happening.

My task in the playbook:

- name: get VS id of the VS on which the vpn is created
    ansible.netcommon.cli_command:
      command: "vsx stat -v | grep {{vpninfo.json.objects[0].guestofcluster}}"          
    register: outputcommand

I have seen other posts regarding this issue, but no real solution/cause was ever provided

@Qalthos Qalthos added this to the February'21 milestone Jan 27, 2021
@Qalthos Qalthos removed this from the February'21 milestone Mar 1, 2021
@ashish-k-panigrahy
Copy link

ashish-k-panigrahy commented Nov 15, 2023

I have been seeing this issue too with nxos_config module. I don't know what the cause is and how to solve it.
use case/example:


- name: Delete IP block 
  nxos_config:
    lines: "no ip prefix-list PLIST-XX1"
    save_when: always
  register: ip_delete_result
  until: ip_delete_result is succeeded
  retries: 3

Error:
fatal: [clf01-r03]: FAILED! => {"attempts": 3, "changed": false, "msg": "Socket is closed"}

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

3 participants