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

changed": false, "msg": "command timeout triggered, timeout value is 30 secs. #496

Open
Saran307 opened this issue Feb 16, 2024 · 1 comment

Comments

@Saran307
Copy link

I was trying to copy a file from remote server to the host using junipernetworks.junos.junos_command module but i am getting command timeout error. I tried to use wait_for : timeout , ANSIBLE_PERSISTENT_COMMAND_TIMEOUT in vars and async poll as well but it did not help

ISSUE TYPE
Getting command timeout triggered, timeout value is 30 secs in junipernetworks.junos.junos_command module. I was trying to copy a file to the host from remote server. It might take around 5-6 mins. So i changed the default command timeout using asyn/poll, wait_for : timeout , ANSIBLE_PERSISTENT_COMMAND_TIMEOUT but nothing helped.

COMPONENT NAME
junipernetworks.junos.junos_command

ANSIBLE VERSION

ansible [core 2.13.13]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.8.16 (default, Apr  1 2023, 04:18:30) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18.0.1)]
  jinja version = 3.1.3
  libyaml = True

COLLECTION VERSION

``
ksaran@buildnet6200:/etc/ansible/playbooks# ansible-galaxy collection list junipernetworks.junos

/home/user/.ansible/collections/ansible_collections

Collection Version


junipernetworks.junos 5.3.0

/usr/local/lib/python3.8/site-packages/ansible_collections

Collection Version


junipernetworks.junos 3.1.0


##### CONFIGURATION

HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False


##### OS / ENVIRONMENT
Network os Junos


##### STEPS TO REPRODUCE
Try to copy a file from jump server to the host using junipernetworks.junos.junos_command

  • name: play book to get the version of the device and copy image files from remote device
    hosts: '{{ hostname }}'
    become: 'yes'
    gather_facts: 'no'
    connection: network_cli
    vars_prompt:
    • name: hostname
      prompt: 'Enter the Junos SRX hostname:'
      private: 'no'
    • name: ssh_username
      prompt: 'Enter SSH Username:'
      private: 'no'
    • name: ssh_password
      prompt: 'Enter SSH Password:'
      private: 'yes'
    • name: File_1
      prompt: 'Enter name of file 1 to copy:'
      private: 'no'
      vars:
      ansible_host: '{{ hostname }}'
      ansible_ssh_user: '{{ ssh_username }}'
      ansible_ssh_pass: '{{ ssh_password }}'
      tasks:
      junipernetworks.junos.junos_command:
      commands:
      - 'file copy "/{{ File_1 }}" /var/tmp/{{ File_1 }} routing-instance mgmt_junos'
      async: 120
      poll: 2

<!--- HINT: You can paste gist.github.com links for larger files -->

##### EXPECTED RESULTS
File needs to be copied from jump server to host


##### ACTUAL RESULTS

[paste below](fatal: [device.net]: FAILED! => {"ansible_job_id": "651079966096.3830764", "changed": false, "finished": 1, "msg": "command timeout triggered, timeout value is 30 secs.\nSee the timeout setting options in the Network Debug and Troubleshooting Guide.", "results_file": "/home/user/.ansible_async/651079966096.3830764", "started": 1, "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []})

@VivekRavichandran07
Copy link

I do have the same issue for juniper config.. Any suggestions to make it work?

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

2 participants