Cisco Nexus 1000V

166 views
Skip to first unread message

jca...@virtomation.com

unread,
Dec 7, 2012, 2:40:09 PM12/7/12
to netc...@googlegroups.com
Hello,

This is a great library.  I made a simple modification so that I could use it against a Nexus 1KV, which is attached.  The odd thing is the hello doesn't seem to be sent and I receive the following error.  Source is attached.

Setting up SSH transport client .. 
SSH transport client setup complete.
Dec 7, 2012 1:59:38 PM com.centeredlogic.util.CLThread run
INFO: Starting thread - NotificationStreamPinger-10.5.77.9; transferring control to runnable ..
Sending XML request: 
<?xml version="1.0" encoding="UTF-8"?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="http://www.cisco.com/nxos:1.0:security_tree" message-id="1">
  <nc:get>
    <nc:filter type="subtree">
      <show>
        <port-profile />
      </show>
    </nc:filter>
  </nc:get>
</nc:rpc>
Dec 7, 2012 1:59:39 PM com.centeredlogic.net.netconf.transport.ssh.SshConnection <init>
INFO: Connected to: 10.10.10.9:22 using Password authentication
Received XML response:
<?xml version="1.0" encoding="UTF-8"?>
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns="http://www.cisco.com/nxos:1.0:security_tree" message-id="1">
  <nc:rpc-error>
    <nc:error-type>application</nc:error-type>
    <nc:error-tag>operation-failed</nc:error-tag>
    <nc:error-severity>error</nc:error-severity>
    <nc:error-message>current session has not received hello</nc:error-message>
  </nc:rpc-error>
</nc:rpc-reply>Dec 7, 2012 1:59:39 PM com.centeredlogic.util.CLThread run
WARNING: Thread - NotificationStreamPinger-10.5.77.9 was interrupted.
Dec 7, 2012 1:59:39 PM com.centeredlogic.util.CLThread run
WARNING: This thread will go back to executing its regular run() method
Dec 7, 2012 1:59:39 PM com.centeredlogic.util.CLThread run
INFO: Terminating thread - NotificationStreamPinger-10.5.77.9

Any help would be appreciated.  
Thanks, Joe

cisco-n1kv.patch
netconf-cisco.java

A.V.

unread,
Dec 13, 2012, 12:30:40 PM12/13/12
to netc...@googlegroups.com, jca...@virtomation.com
Hello,

   Actually, your changes look fine to me; I am not sure why you get that error, other than the device does not expect the standard NETCONF "hello" message.

   To simplify things though, I would start with:
  • Hardcoding "xmlagent" in the SshConnection.java source (replace "netconf" with "xmlagent").
  • Run the SshTransportClientTest class to take in an input file and send it to the device.
  That way, you can verify that your source changes and tests are very restricted. If THAT does not work, I would sniff the network packets and see what is going on the wire.

   Let me know how things work out.

-A.V.
Reply all
Reply to author
Forward
0 new messages