{"action":"created","issue":{"url":"https://api.github.com/repos/leopoul/ncclient/issues/59","labels_url":"https://api.github.com/repos/leopoul/ncclient/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/leopoul/ncclient/issues/59/comments","events_url":"https://api.github.com/repos/leopoul/ncclient/issues/59/events","html_url":"https://github.com/leopoul/ncclient/issues/59","id":68492214,"number":59,"title":"Can't send commands to IOS-XR (Cisco ASR 9000)","user":{"login":"jejenone","id":301667,"avatar_url":"https://avatars.githubusercontent.com/u/301667?v=3","gravatar_id":"","url":"https://api.github.com/users/jejenone","html_url":"https://github.com/jejenone","followers_url":"https://api.github.com/users/jejenone/followers","following_url":"https://api.github.com/users/jejenone/following{/other_user}","gists_url":"https://api.github.com/users/jejenone/gists{/gist_id}","starred_url":"https://api.github.com/users/jejenone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jejenone/subscriptions","organizations_url":"https://api.github.com/users/jejenone/orgs","repos_url":"https://api.github.com/users/jejenone/repos","events_url":"https://api.github.com/users/jejenone/events{/privacy}","received_events_url":"https://api.github.com/users/jejenone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-14T20:45:55Z","updated_at":"2015-04-16T17:35:46Z","closed_at":null,"body":"Using this simple script, connection to a Cisco IOS-XR is hung up abruptly. I am able to retrieve the capabilities, but the `<get-config>` does not work\r\n\r\n```python\r\nfrom ncclient import manager\r\nimport logging\r\nimport sys\r\n\r\nrootLogger = logging.getLogger('ncclient.transport.session')\r\nrootLogger.setLevel(logging.DEBUG)\r\nhandler = logging.StreamHandler()\r\nrootLogger.addHandler(handler)\r\n\r\nhost='<hidden host>'\r\nuser='netconf'\r\npassword='<hidden password>'\r\nm = manager.connect(host=host, port=830, username=user, password=password,\r\n                     hostkey_verify=False, device_params={'name':'default'},\r\n                     look_for_keys=False, allow_agent=False)\r\nc = m.get_config(source='running')\r\n```\r\n\r\n```shell\r\n(.venv)jfleury@36netops2:~/salt-net$ python  test_cisco.py\r\n<SSHSession(session, initial daemon)> created: client_capabilities=['urn:ietf:params:netconf:capability:writable-running:1.0', 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', 'urn:ietf:params:netconf:capability:validate:1.0', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp', 'urn:ietf:params:netconf:base:1.0', 'urn:liberouter:params:netconf:capability:power-control:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0', 'urn:ietf:params:netconf:capability:xpath:1.0', 'urn:ietf:params:netconf:capability:startup:1.0', 'urn:ietf:params:netconf:capability:interleave:1.0']\r\ninstalling listener <ncclient.transport.session.HelloHandler object at 0x2bb4890>\r\nqueueing <?xml version=\"1.0\" encoding=\"UTF-8\"?><nc:hello xmlns:nc=\"urn:ietf:params:xml:ns:netconf:base:1.0\"><nc:capabilities><nc:capability>urn:ietf:params:netconf:capability:writable-running:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:validate:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp</nc:capability><nc:capability>urn:ietf:params:netconf:base:1.0</nc:capability><nc:capability>urn:liberouter:params:netconf:capability:power-control:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:candidate:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:xpath:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:startup:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:interleave:1.0</nc:capability></nc:capabilities></nc:hello>\r\nstarting main loop\r\ndispatching message to <ncclient.transport.session.HelloHandler object at 0x2bb4890>: <hello xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">\r\n <capabilities>\r\n  <capability>urn:ietf:params:netconf:base:1.1</capability>\r\n  <capability>urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring</capability>\r\n  <capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>\r\n  <capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability>\r\n  <capability>urn:ietf:params:netconf:capability:validate:1.1</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-cfg?module=Cisco-IOS-XR-cdp-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper?module=Cisco-IOS-XR-cdp-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-cfg?module=Cisco-IOS-XR-crypto-sam-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper?module=Cisco-IOS-XR-crypto-sam-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-cfg?module=Cisco-IOS-XR-ha-eem-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-oper?module=Cisco-IOS-XR-ha-eem-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg?module=Cisco-IOS-XR-ifmgr-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper?module=Cisco-IOS-XR-ifmgr-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg?module=Cisco-IOS-XR-infra-infra-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg?module=Cisco-IOS-XR-ip-domain-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper?module=Cisco-IOS-XR-ip-domain-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-datatypes?module=Cisco-IOS-XR-ip-iarm-datatypes&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg?module=Cisco-IOS-XR-ipv4-io-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper?module=Cisco-IOS-XR-ipv4-io-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg?module=Cisco-IOS-XR-ipv4-ma-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper?module=Cisco-IOS-XR-ipv4-ma-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-subscriber-cfg?module=Cisco-IOS-XR-ipv4-ma-subscriber-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-cfg?module=Cisco-IOS-XR-ipv6-ma-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper?module=Cisco-IOS-XR-ipv6-ma-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-subscriber-cfg?module=Cisco-IOS-XR-ipv6-ma-subscriber-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-cfg?module=Cisco-IOS-XR-lib-keychain-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper?module=Cisco-IOS-XR-lib-keychain-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg?module=Cisco-IOS-XR-man-netconf-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg?module=Cisco-IOS-XR-man-xml-ttyagent-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper?module=Cisco-IOS-XR-man-xml-ttyagent-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg?module=Cisco-IOS-XR-parser-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-cfg?module=Cisco-IOS-XR-qos-ma-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-oper?module=Cisco-IOS-XR-qos-ma-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-cfg?module=Cisco-IOS-XR-rgmgr-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper?module=Cisco-IOS-XR-rgmgr-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg?module=Cisco-IOS-XR-shellutil-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper?module=Cisco-IOS-XR-shellutil-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg?module=Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cfg?module=Cisco-IOS-XR-tty-management-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-datatypes?module=Cisco-IOS-XR-tty-management-datatypes&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper?module=Cisco-IOS-XR-tty-management-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-cfg?module=Cisco-IOS-XR-tty-server-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper?module=Cisco-IOS-XR-tty-server-oper&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/Cisco-IOS-XR-tty-vty-cfg?module=Cisco-IOS-XR-tty-vty-cfg&amp;revision=2013-07-22</capability>\r\n  <capability>http://cisco.com/ns/yang/cisco-xr-types?module=Cisco-IOS-XR-types&amp;revision=2013-07-22</capability>\r\n  <capability>urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&amp;revision=2013-07-15</capability>\r\n  <capability>urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&amp;revision=2013-07-15</capability>\r\n </capabilities>\r\n <session-id>10918</session-id>\r\n</hello>\r\ndiscarding listener <ncclient.transport.session.HelloHandler object at 0x2bb4890>\r\ndispatching error to <ncclient.transport.session.HelloHandler object at 0x2bb4890>\r\ninitialized: session-id=10918 | server_capabilities=['http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-oper?module=Cisco-IOS-XR-crypto-sam-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-oper?module=Cisco-IOS-XR-cdp-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-cfg?module=Cisco-IOS-XR-qos-ma-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-infra-infra-cfg?module=Cisco-IOS-XR-infra-infra-cfg&revision=2013-07-22', 'urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring', 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-cfg?module=Cisco-IOS-XR-tty-server-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-oper?module=Cisco-IOS-XR-man-xml-ttyagent-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-iarm-datatypes?module=Cisco-IOS-XR-ip-iarm-datatypes&revision=2013-07-22', 'urn:ietf:params:xml:ns:yang:ietf-yang-types?module=ietf-yang-types&revision=2013-07-15', 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-cfg?module=Cisco-IOS-XR-shellutil-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-cfg?module=Cisco-IOS-XR-ipv4-io-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-cfg?module=Cisco-IOS-XR-ipv4-ma-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-server-oper?module=Cisco-IOS-XR-tty-server-oper&revision=2013-07-22', 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-netconf-cfg?module=Cisco-IOS-XR-man-netconf-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-cfg?module=Cisco-IOS-XR-tty-management-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-oper?module=Cisco-IOS-XR-ifmgr-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg?module=Cisco-IOS-XR-subscriber-infra-tmplmgr-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-oper?module=Cisco-IOS-XR-rgmgr-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-io-oper?module=Cisco-IOS-XR-ipv4-io-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ifmgr-cfg?module=Cisco-IOS-XR-ifmgr-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-cfg?module=Cisco-IOS-XR-ipv6-ma-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-cfg?module=Cisco-IOS-XR-lib-keychain-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-oper?module=Cisco-IOS-XR-ip-domain-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-vty-cfg?module=Cisco-IOS-XR-tty-vty-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-subscriber-cfg?module=Cisco-IOS-XR-ipv4-ma-subscriber-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-cdp-cfg?module=Cisco-IOS-XR-cdp-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-subscriber-cfg?module=Cisco-IOS-XR-ipv6-ma-subscriber-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-cfg?module=Cisco-IOS-XR-ha-eem-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ha-eem-oper?module=Cisco-IOS-XR-ha-eem-oper&revision=2013-07-22', 'urn:ietf:params:netconf:capability:candidate:1.0', 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-datatypes?module=Cisco-IOS-XR-tty-management-datatypes&revision=2013-07-22', 'http://cisco.com/ns/yang/cisco-xr-types?module=Cisco-IOS-XR-types&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-qos-ma-oper?module=Cisco-IOS-XR-qos-ma-oper&revision=2013-07-22', 'urn:ietf:params:xml:ns:yang:ietf-inet-types?module=ietf-inet-types&revision=2013-07-15', 'http://cisco.com/ns/yang/Cisco-IOS-XR-lib-keychain-oper?module=Cisco-IOS-XR-lib-keychain-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv4-ma-oper?module=Cisco-IOS-XR-ipv4-ma-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-man-xml-ttyagent-cfg?module=Cisco-IOS-XR-man-xml-ttyagent-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ip-domain-cfg?module=Cisco-IOS-XR-ip-domain-cfg&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-tty-management-oper?module=Cisco-IOS-XR-tty-management-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-rgmgr-cfg?module=Cisco-IOS-XR-rgmgr-cfg&revision=2013-07-22', 'urn:ietf:params:netconf:capability:validate:1.1', 'http://cisco.com/ns/yang/Cisco-IOS-XR-crypto-sam-cfg?module=Cisco-IOS-XR-crypto-sam-cfg&revision=2013-07-22', 'urn:ietf:params:netconf:base:1.1', 'http://cisco.com/ns/yang/Cisco-IOS-XR-ipv6-ma-oper?module=Cisco-IOS-XR-ipv6-ma-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-shellutil-oper?module=Cisco-IOS-XR-shellutil-oper&revision=2013-07-22', 'http://cisco.com/ns/yang/Cisco-IOS-XR-parser-cfg?module=Cisco-IOS-XR-parser-cfg&revision=2013-07-22']\r\ninstalling listener <ncclient.operations.rpc.RPCReplyListener object at 0x2baae50>\r\nTraceback (most recent call last):\r\n  File \"test_cisco.py\", line 16, in <module>\r\n    c = m.get_config(source='running')\r\n  File \"/state/home/jfleury/salt-net/.venv/lib/python2.7/site-packages/ncclient/manager.py\", line 156, in wrapper\r\n    return self.execute(op_cls, *args, **kwds)\r\n  File \"/state/home/jfleury/salt-net/.venv/lib/python2.7/site-packages/ncclient/manager.py\", line 226, in execute\r\n    raise_mode=self._raise_mode).request(*args, **kwds)\r\n  File \"/state/home/jfleury/salt-net/.venv/lib/python2.7/site-packages/ncclient/operations/retrieve.py\", line 87, in request\r\n    return self._request(node)\r\n  File \"/state/home/jfleury/salt-net/.venv/lib/python2.7/site-packages/ncclient/operations/rpc.py\", line 291, in _request\r\n    self._session.send(req)\r\n  File \"/state/home/jfleury/salt-net/.venv/lib/python2.7/site-packages/ncclient/transport/session.py\", line 147, in send\r\n    raise TransportError('Not connected to NETCONF server')\r\nncclient.transport.errors.TransportError: Not connected to NETCONF server\r\n```\r\n\r\nCan't figure out why the connection is dropped. Any idea how to debug that ?"},"comment":{"url":"https://api.github.com/repos/leopoul/ncclient/issues/comments/93792686","html_url":"https://github.com/leopoul/ncclient/issues/59#issuecomment-93792686","issue_url":"https://api.github.com/repos/leopoul/ncclient/issues/59","id":93792686,"user":{"login":"jejenone","id":301667,"avatar_url":"https://avatars.githubusercontent.com/u/301667?v=3","gravatar_id":"","url":"https://api.github.com/users/jejenone","html_url":"https://github.com/jejenone","followers_url":"https://api.github.com/users/jejenone/followers","following_url":"https://api.github.com/users/jejenone/following{/other_user}","gists_url":"https://api.github.com/users/jejenone/gists{/gist_id}","starred_url":"https://api.github.com/users/jejenone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jejenone/subscriptions","organizations_url":"https://api.github.com/users/jejenone/orgs","repos_url":"https://api.github.com/users/jejenone/repos","events_url":"https://api.github.com/users/jejenone/events{/privacy}","received_events_url":"https://api.github.com/users/jejenone/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T17:35:46Z","updated_at":"2015-04-16T17:35:46Z","body":"Is there any chance you can push this branch on github ? I don't really care about it not being stable, since everything I'm working on right now is experimental anyway and being multi-vendor is essential to that project. Also, I'd be more than happy to contribute to IOS-XR support starting from that branch.\r\nAppreciate your input on that specific problem."}}