Skip to content

Instantly share code, notes, and snippets.

@skamithi
Created August 16, 2017 01:41
Show Gist options
  • Save skamithi/b2befc068b504150e3aec0c4805c6626 to your computer and use it in GitHub Desktop.
Save skamithi/b2befc068b504150e3aec0c4805c6626 to your computer and use it in GitHub Desktop.
debug junos vqfx connection to ansible 2.4 fails on netconf actions
2017-08-16 01:37:45,386 p=9431 u=vagrant | ansible-playbook 2.4.0
config file = /home/vagrant/git/ansible-network-testing/ansible.cfg
configured module search path = [u'/home/vagrant/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible
executable location = /home/vagrant/ansible-dev/bin/ansible-playbook
python version = 2.7.5 (default, Nov 6 2016, 00:28:07) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
2017-08-16 01:37:45,386 p=9431 u=vagrant | Using /home/vagrant/git/ansible-network-testing/ansible.cfg as config file
2017-08-16 01:37:45,391 p=9431 u=vagrant | Parsed /home/vagrant/git/ansible-network-testing/inventory/hosts inventory source with ini plugin
2017-08-16 01:37:45,540 p=9431 u=vagrant | PLAYBOOK: test.yml *************************************************************************************************************************************************************
2017-08-16 01:37:45,541 p=9431 u=vagrant | 1 plays in test.yml
2017-08-16 01:37:45,565 p=9431 u=vagrant | PLAY [all] *********************************************************************************************************************************************************************
2017-08-16 01:37:45,582 p=9431 u=vagrant | META: ran handlers
2017-08-16 01:37:45,598 p=9431 u=vagrant | TASK [netconf : include_tasks] *************************************************************************************************************************************************
2017-08-16 01:37:45,599 p=9431 u=vagrant | task path: /home/vagrant/git/ansible-network-testing/roles/netconf/tasks/main.yml:1
2017-08-16 01:37:45,663 p=9431 u=vagrant | included: /home/vagrant/git/ansible-network-testing/roles/netconf/tasks/junos.yml for junos01
2017-08-16 01:37:45,674 p=9431 u=vagrant | TASK [netconf : enable Junos Netconf] ******************************************************************************************************************************************
2017-08-16 01:37:45,674 p=9431 u=vagrant | task path: /home/vagrant/git/ansible-network-testing/roles/netconf/tasks/junos.yml:1
2017-08-16 01:37:46,505 p=9445 u=vagrant | creating new control socket for host 192.168.2.201:22 as user ansible
2017-08-16 01:37:46,505 p=9445 u=vagrant | control socket path is /home/vagrant/.ansible/pc/b4db716992
2017-08-16 01:37:46,505 p=9445 u=vagrant | current working directory is /home/vagrant/git/ansible-network-testing
2017-08-16 01:37:46,505 p=9445 u=vagrant | using connection plugin network_cli
2017-08-16 01:37:46,573 paramiko.transport starting thread (client mode): 0x2676210L
2017-08-16 01:37:46,574 paramiko.transport Local version/idstring: SSH-2.0-paramiko_2.2.1
2017-08-16 01:37:46,581 paramiko.transport Remote version/idstring: SSH-2.0-OpenSSH_6.6.1
2017-08-16 01:37:46,582 paramiko.transport Connected (version 2.0, client OpenSSH_6.6.1)
2017-08-16 01:37:46,582 paramiko.transport kex algos:[u'curve25519-sha256@libssh.org', u'ecdh-sha2-nistp256', u'ecdh-sha2-nistp384', u'ecdh-sha2-nistp521', u'diffie-hellman-group-exchange-sha256', u'diffie-hellman-group-exchange-sha1', u'diffie-hellman-group14-sha1', u'diffie-hellman-group1-sha1'] server key:[u'ssh-rsa', u'ssh-dss', u'ecdsa-sha2-nistp256', u'ssh-ed25519'] client encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com', u'chacha20-poly1305@openssh.com', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'rijndael-cbc@lysator.liu.se'] server encrypt:[u'aes128-ctr', u'aes192-ctr', u'aes256-ctr', u'arcfour256', u'arcfour128', u'aes128-gcm@openssh.com', u'aes256-gcm@openssh.com', u'chacha20-poly1305@openssh.com', u'aes128-cbc', u'3des-cbc', u'blowfish-cbc', u'cast128-cbc', u'aes192-cbc', u'aes256-cbc', u'arcfour', u'rijndael-cbc@lysator.liu.se'] client mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-etm@openssh.com', u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-256-96', u'hmac-sha2-512', u'hmac-sha2-512-96', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] server mac:[u'hmac-md5-etm@openssh.com', u'hmac-sha1-etm@openssh.com', u'umac-64-etm@openssh.com', u'umac-128-etm@openssh.com', u'hmac-sha2-256-etm@openssh.com', u'hmac-sha2-512-etm@openssh.com', u'hmac-ripemd160-etm@openssh.com', u'hmac-sha1-96-etm@openssh.com', u'hmac-md5-96-etm@openssh.com', u'hmac-md5', u'hmac-sha1', u'umac-64@openssh.com', u'umac-128@openssh.com', u'hmac-sha2-256', u'hmac-sha2-256-96', u'hmac-sha2-512', u'hmac-sha2-512-96', u'hmac-ripemd160', u'hmac-ripemd160@openssh.com', u'hmac-sha1-96', u'hmac-md5-96'] client compress:[u'none', u'zlib@openssh.com'] server compress:[u'none', u'zlib@openssh.com'] client lang:[u''] server lang:[u''] kex follows?False
2017-08-16 01:37:46,583 paramiko.transport Kex agreed: ecdh-sha2-nistp256
2017-08-16 01:37:46,583 paramiko.transport HostKey agreed: ecdsa-sha2-nistp256
2017-08-16 01:37:46,583 paramiko.transport Cipher agreed: aes128-ctr
2017-08-16 01:37:46,583 paramiko.transport MAC agreed: hmac-sha2-256
2017-08-16 01:37:46,583 paramiko.transport Compression agreed: none
2017-08-16 01:37:46,700 paramiko.transport kex engine KexNistp256 specified hash_algo <built-in function openssl_sha256>
2017-08-16 01:37:46,702 paramiko.transport Switch to new keys ...
2017-08-16 01:37:46,708 paramiko.transport Trying key 29964571a2249de308bd20e2d7b80e03 from /home/vagrant/git/ansible-network-testing/keys/test_user
2017-08-16 01:37:46,803 paramiko.transport userauth is OK
2017-08-16 01:37:46,829 paramiko.transport Authentication (publickey) successful!
2017-08-16 01:37:46,841 p=9445 u=vagrant | ssh connection done, setting terminal
2017-08-16 01:37:46,842 paramiko.transport [chan 0] Max packet in: 32768 bytes
2017-08-16 01:37:46,846 paramiko.transport [chan 0] Max packet out: 32768 bytes
2017-08-16 01:37:46,846 paramiko.transport Secsh channel 0 opened.
2017-08-16 01:37:46,851 paramiko.transport [chan 0] Sesch channel 0 request ok
2017-08-16 01:37:46,861 paramiko.transport [chan 0] Sesch channel 0 request ok
2017-08-16 01:37:46,868 p=9445 u=vagrant | loaded terminal plugin for network_os junos
2017-08-16 01:37:46,876 p=9445 u=vagrant | loaded cliconf plugin for network_os junos
2017-08-16 01:37:46,940 p=9445 u=vagrant | firing event: on_open_shell()
2017-08-16 01:37:46,980 p=9445 u=vagrant | ssh connection has completed successfully
2017-08-16 01:37:46,981 p=9445 u=vagrant | connection established to 192.168.2.201 in 0:00:00.475040
2017-08-16 01:37:46,981 p=9445 u=vagrant | local socket is set to listening
2017-08-16 01:37:47,504 p=9445 u=vagrant | incoming request accepted on persistent socket
2017-08-16 01:37:47,504 p=9445 u=vagrant | socket operation is CONTEXT
2017-08-16 01:37:47,505 p=9445 u=vagrant | updating play_context for connection
2017-08-16 01:37:47,506 p=9445 u=vagrant | socket operation completed with rc 0
2017-08-16 01:37:47,506 p=9445 u=vagrant | socket operation is RUN
2017-08-16 01:37:47,506 p=9445 u=vagrant | socket operation completed with rc 0
2017-08-16 01:37:48,241 p=9458 u=vagrant | re-using existing socket for ansible@192.168.2.201:22
2017-08-16 01:37:48,241 p=9445 u=vagrant | incoming request accepted on persistent socket
2017-08-16 01:37:48,242 p=9445 u=vagrant | socket operation is CONTEXT
2017-08-16 01:37:48,242 p=9445 u=vagrant | updating play_context for connection
2017-08-16 01:37:48,242 p=9445 u=vagrant | socket operation completed with rc 0
2017-08-16 01:37:48,242 p=9445 u=vagrant | socket operation is EXEC
2017-08-16 01:37:48,242 p=9445 u=vagrant | Command executed: prompt()
2017-08-16 01:37:48,242 p=9445 u=vagrant | socket operation completed with rc 0
2017-08-16 01:37:48,296 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/basic.py
2017-08-16 01:37:48,297 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/connection.py
2017-08-16 01:37:48,297 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/junos.py
2017-08-16 01:37:48,298 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/six/__init__.py
2017-08-16 01:37:48,299 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/network_common.py
2017-08-16 01:37:48,397 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/_text.py
2017-08-16 01:37:48,397 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/parsing/convert_bool.py
2017-08-16 01:37:48,397 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/parsing/__init__.py
2017-08-16 01:37:48,398 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/pycompat24.py
2017-08-16 01:37:48,416 p=9431 u=vagrant | Using module_utils file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/module_utils/netconf.py
2017-08-16 01:37:48,471 p=9431 u=vagrant | Using module file /home/vagrant/ansible-dev/lib/python2.7/site-packages/ansible/modules/network/junos/junos_netconf.py
2017-08-16 01:37:48,657 p=9445 u=vagrant | incoming request accepted on persistent socket
2017-08-16 01:37:48,657 p=9445 u=vagrant | socket operation is EXEC
2017-08-16 01:37:48,657 p=9445 u=vagrant | Command executed: show configuration system services netconf
2017-08-16 01:37:48,683 p=9445 u=vagrant | socket operation completed with rc 0
2017-08-16 01:37:48,701 p=9431 u=vagrant | ok: [junos01] => {
"changed": false,
"commands": [],
"failed": false,
"invocation": {
"module_args": {
"host": null,
"netconf_port": 830,
"password": null,
"port": null,
"provider": null,
"ssh_keyfile": null,
"state": "present",
"timeout": null,
"transport": null,
"username": null
}
}
}
2017-08-16 01:37:48,705 p=9431 u=vagrant | TASK [system : include_tasks] **************************************************************************************************************************************************
2017-08-16 01:37:48,705 p=9431 u=vagrant | task path: /home/vagrant/git/ansible-network-testing/roles/system/tasks/main.yml:2
2017-08-16 01:37:48,726 p=9431 u=vagrant | included: /home/vagrant/git/ansible-network-testing/roles/system/tasks/junos.yml for junos01
2017-08-16 01:37:48,748 p=9431 u=vagrant | TASK [system : junos_system] ***************************************************************************************************************************************************
2017-08-16 01:37:48,748 p=9431 u=vagrant | task path: /home/vagrant/git/ansible-network-testing/roles/system/tasks/junos.yml:3
2017-08-16 01:37:49,539 p=9491 u=vagrant | creating new control socket for host 192.168.2.201:830 as user ansible
2017-08-16 01:37:49,540 p=9491 u=vagrant | control socket path is /home/vagrant/.ansible/pc/4a5f1804eb
2017-08-16 01:37:49,540 p=9491 u=vagrant | current working directory is /home/vagrant/git/ansible-network-testing
2017-08-16 01:37:49,540 p=9491 u=vagrant | using connection plugin netconf
2017-08-16 01:37:49,608 p=9491 u=vagrant | network_os is set to junos
2017-08-16 01:37:49,608 p=9491 u=vagrant | ssh connection done, stating ncclient
2017-08-16 01:37:49,621 ncclient.transport.ssh Connected (version 2.0, client OpenSSH_6.6.1)
2017-08-16 01:37:49,859 p=9491 u=vagrant | connecting to host 192.168.2.201 returned an error
2017-08-16 01:37:49,859 p=9491 u=vagrant | Unknown host key [aa:12:c8:d3:91:ea:4f:c1:90:8c:c6:a6:a4:e9:5c:f0] for [192.168.2.201]
2017-08-16 01:37:59,599 p=9431 u=vagrant | fatal: [junos01]: FAILED! => {
"changed": false,
"failed": true,
"msg": "unable to open shell. Please see: https://docs.ansible.com/ansible/network_debug_troubleshooting.html#unable-to-open-shell"
}
2017-08-16 01:37:59,601 p=9431 u=vagrant | to retry, use: --limit @/home/vagrant/git/ansible-network-testing/test.retry
2017-08-16 01:37:59,601 p=9431 u=vagrant | PLAY RECAP *********************************************************************************************************************************************************************
2017-08-16 01:37:59,601 p=9431 u=vagrant | junos01 : ok=3 changed=0 unreachable=0 failed=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment