<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ansible ssh connection issue with cisco nxos after upgrade to 9.3( in Network Devices</title>
    <link>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622281#M159</link>
    <description>This question appears not to have anything to do with NSO, so you are probably posting in the wrong forum&lt;BR /&gt;Cheers,&lt;BR /&gt;KJ.&lt;BR /&gt;</description>
    <pubDate>Wed, 01 Jun 2022 07:56:19 GMT</pubDate>
    <dc:creator>KJ Rossavik</dc:creator>
    <dc:date>2022-06-01T07:56:19Z</dc:date>
    <item>
      <title>ansible ssh connection issue with cisco nxos after upgrade to 9.3(9) s</title>
      <link>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622074#M158</link>
      <description>&lt;P&gt;I am using an Ansible Server to connect to a Cisco NXOS Switch (N93180LC). The connection runs over paramiko using ssh user/password and has always worked without a problem until I upgraded from 9.3(8) to 9.3(9) software release. When I downgrade the software, then the ssh-connection works again. The connection works also with other devices using the same ssh user/password that are not on version 9.3(9).&lt;/P&gt;
&lt;P&gt;SSH-connection over putty works just fine with the same user/password for the nexus switch. It only doesnt work over Ansible. Ansible is on version core 2.11.7 with python 3.6.8.&lt;/P&gt;
&lt;P&gt;The ssh-connection is attempted both with a playbook and simply with "ssh user@ip-of-switch" on the Ansible Server. When "ssh user@ip-of-switch" is attempted, the process just gets stuck as if its still "loading". The error output from playbook is appended at the end of the post.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;A href="https://www.myccpay.life/" target="_self"&gt;&lt;FONT size="1 2 3 4 5 6 7" color="#FFFFFF"&gt;myccpay account&lt;/FONT&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;The playbook content is not posted here because it works fine with other devices. It basically just has one task asking the nxos to show hostname.&lt;/P&gt;
&lt;P&gt;I thought the problem may be fingerprint related, so I have set ansible_host_key_checking = False in ansible.cfg. Just to be sure, I also manually added the fingerprint from the switch (which i got with "show ssh key") to the ansible known_hosts file.&lt;/P&gt;
&lt;P&gt;I've also tried setting ansible connection to libssh instead of paramiko.&lt;/P&gt;
&lt;P&gt;Is there maybe a bug with the 9.3(9) release specifically in combination with Ansible that I have not been able to find? I would be appreciative of any help I could get!&lt;/P&gt;
&lt;P&gt;But none of the above could solve the problem. The output error that I get from ansible is as follows:&lt;/P&gt;
&lt;PRE&gt;TASK [ask Hostname NXOS] ******************************************************************************************************************
task path: /home/ansible/var/test/Angel/nxos/playbook_hostcheck.yaml:24
The full traceback is:
Traceback (most recent call last):
  File "/home/ansible/.ansible/tmp/ansible-local-62419fhcrsg9/ansible-tmp-1653908906.3061478-6248-45658655329117/AnsiballZ_nxos_command.py"                                , line 100, in &amp;lt;module&amp;gt;
    _ansiballz_main()
  File "/home/ansible/.ansible/tmp/ansible-local-62419fhcrsg9/ansible-tmp-1653908906.3061478-6248-45658655329117/AnsiballZ_nxos_command.py"                                , line 92, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ansible/.ansible/tmp/ansible-local-62419fhcrsg9/ansible-tmp-1653908906.3061478-6248-45658655329117/AnsiballZ_nxos_command.py"                                , line 41, in invoke_module
    run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/modules/nxos_com                                mand.py", line 237, in &amp;lt;module&amp;gt;
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/modules/nxos_com                                mand.py", line 206, in main
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/module_utils/net                                work/nxos/nxos.py", line 1370, in run_commands
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/module_utils/net                                work/nxos/nxos.py", line 129, in get_connection
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible/module_utils/connection.py", line 200, in __rpc                                __
ansible.module_utils.connection.ConnectionError: [Errno 110] Connection timed out
fatal: [17.237.73.11]: FAILED! =&amp;gt; {
    "changed": false,
    "rc": 1
}

MSG:

MODULE FAILURE
See stdout/stderr for the exact error


MODULE_STDERR:

Traceback (most recent call last):
  File "/home/ansible/.ansible/tmp/ansible-local-62419fhcrsg9/ansible-tmp-1653908906.3061478-6248-45658655329117/AnsiballZ_nxos_command.py"                                , line 100, in &amp;lt;module&amp;gt;
    _ansiballz_main()
  File "/home/ansible/.ansible/tmp/ansible-local-62419fhcrsg9/ansible-tmp-1653908906.3061478-6248-45658655329117/AnsiballZ_nxos_command.py"                                , line 92, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ansible/.ansible/tmp/ansible-local-62419fhcrsg9/ansible-tmp-1653908906.3061478-6248-45658655329117/AnsiballZ_nxos_command.py"                                , line 41, in invoke_module
    run_name='__main__', alter_sys=True)
  File "/usr/lib64/python3.6/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/modules/nxos_com                                mand.py", line 237, in &amp;lt;module&amp;gt;
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/modules/nxos_com                                mand.py", line 206, in main
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/module_utils/net                                work/nxos/nxos.py", line 1370, in run_commands
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible_collections/cisco/nxos/plugins/module_utils/net                                work/nxos/nxos.py", line 129, in get_connection
  File "/tmp/ansible_nxos_command_payload_xau7a6f5/ansible_nxos_command_payload.zip/ansible/module_utils/connection.py", line 200, in __rpc                                __
ansible.module_utils.connection.ConnectionError: [Errno 110] Connection timed out&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 18:07:41 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622074#M158</guid>
      <dc:creator>Morse</dc:creator>
      <dc:date>2023-05-08T18:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: ansible ssh connection issue with cisco nxos after upgrade to 9.3(</title>
      <link>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622281#M159</link>
      <description>This question appears not to have anything to do with NSO, so you are probably posting in the wrong forum&lt;BR /&gt;Cheers,&lt;BR /&gt;KJ.&lt;BR /&gt;</description>
      <pubDate>Wed, 01 Jun 2022 07:56:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622281#M159</guid>
      <dc:creator>KJ Rossavik</dc:creator>
      <dc:date>2022-06-01T07:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: ansible ssh connection issue with cisco nxos after upgrade to 9.3(</title>
      <link>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622309#M160</link>
      <description>&lt;P&gt;&lt;SPAN&gt;CSCvy19448&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Check this bug i know it for 9.3(7) but still it give y hint.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 08:23:46 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-devices/ansible-ssh-connection-issue-with-cisco-nxos-after-upgrade-to-9/m-p/4622309#M160</guid>
      <dc:creator>MHM Cisco World</dc:creator>
      <dc:date>2022-06-01T08:23:46Z</dc:date>
    </item>
  </channel>
</rss>

