Error: socket path /home/user/.ansible/pc/ebf6fe2904 does not exist or cannot be found

FAILED! => {"changed": false, "msg": "socket path /home/user/.ansible/pc/ebf6fe2904 does not exist or cannot be found. See Troubleshooting socket path issues in the Network Debug and Troubleshooting Guide"}

I get this error when im sending a command to an Alcatel network switch. But this error is new because 3 days ago everything worked and i even set the connection timeout to 600 seconds.
Ansible should also have access to /home/user/.ansible/pc

I believe Ansible is trying to create

on the network device.
Have you configured the ansible_network_os and ansible_connection parameters?
https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html

Yes i have configured in the inventory the ansible_network_os and the ansible_connection
Im wondering because 3 days ago everything worked now it doesn’t matter which playbook i run i get the same error

Can you post an example of a task that is failing along with the ansible version you are using?

file hosts

[aos6]
192.158.1.2

[aos8]
192.158.1.5

[all:vars]
ansible_user=User123
ansible_password={{ssh_password}}
ansible_connection=ansible.netcommon.network_cli
ansible_network_os=alcatel.aos8.aos8
ansible_python_interpreter=/usr/bin/python3

playbook

---
- hosts: all
  gather_facts: false
  ignore_errors: true
  vars_files:
   - ~/ansible/inventory/vault.yaml
  tasks:
  - name: show run dir
    alcatel.aos8.aos8_command:
      commands:
        - show running-directory
    register: command_output

  - name: Command output parsing to extract SYNCHRO/NOT SYNCHRO
    set_fact:
      synchronization_status: "{{ command_output.stdout_lines | join('\n') | regex_search('Running Configuration *: (NOT )?SYNCHRONIZED') }}"

  - name: Execute write mem flash-synchro if not synchronized
    when: synchronization_status is match and "NOT SYNCHRONIZED" in synchronization_status
    block:
      - name: Execute command on the switch
        alcatel.aos8.aos8_command:
          commands:
            - write memory flash-synchro
        register: command_output2
        #failed_when: "'ERROR' in command_output2.stdout_lines | join('\n')"

ansible version

  5169 1730195699.26123: starting run
ansible [core 2.17.5]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/user/.local/lib/python3.10/site-packages/napalm_ansible/modules']
  ansible python module location = /home/user/.local/lib/python3.10/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] (/usr/bin/python3)
  jinja version = 3.0.3
  libyaml = True

ansible config (/etc/ansible/ansible.cfg)

[defaults]
vault_password_file = /home/user/ansible/inventory/vault.yaml
#password = /home/user/ansible/inventory/vault.yml
ansible_user = User123
#ansible_password = {{ vault_ssh_password }}
inventory=  ~/ansible/inventory/hosts
interpreter_python = /usr/bin/python3
library = /home/user/.local/lib/python3.10/site-packages/napalm_ansible/modules
action_plugins = /home/user/.local/lib/python3.10/site-packages/napalm_ansible/plugins/action
host_key_checking = False
#vault_password_file = /home/user/ansible/inventory/vault.yml
ask_vault_pass = True
#inventory = /home/user/ansible/inventory/hosts
#log = /home/user/ansible/log/ansible.log

[persistent_connection]
connect_timeout = 36000
command_timeout = 36000

Do you have a link to the alcatel.aos8 collection? Can’t seem to find it on https://galaxy.ansible.com/.

Hi the collection is from the Alcatel Team but is not available for the public

Ok. Then you should ask the Alcatel Team if they have done any changes to the collection.

1 Like

Hi thanks for your reply but the collection didn’t change because we just downloaded it manually without getting it automatically updated

This forum and Ansible are both open-source. It´s hard to help you when you are using a collection that is closed-sourced and unavailable to the public.

1 Like

Yes i know thanks for trying but i have found something which could fix the problem. I created a new venv and now the playbook works perfectly fine.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.