How to connect to virtual device on AiO VM from Mac?
I have installed onePK SDK for Java on my Mac. What I want is to run tutorials from sdk. For connection I use All-in-One VM and demo 3node network. VM runs under VMWare fusion. I can ping virutal devices from Mac. The problem is that when I run SessionTutorial (as I can understamd we need to run it first) I have a following error:
28 [main] TRACE com.cisco.onep.element.NetworkElement - Connect called for username:alex
677 [main] ERROR com.cisco.onep.element.NetworkElement - Could not connect to NetworkElement: com.cisco.onep.core.exception.OnepTransportException: Error occurred in the operation. Failed to connect to the network element or the session is closed. Failed to connect to the network element or the session is closed. javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
683 [main] ERROR com.cisco.onep.tutorials.session.SessionTutorial - Failed to connect to element.
com.cisco.onep.core.exception.OnepTransportException: Error occurred in the operation. Failed to connect to the network element or the session is closed. Failed to connect to the network element or the session is closed. javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Caused by: org.apache.thrift.transport.TTransportException: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
... 3 more
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
... 8 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
... 12 more
Actually I have something similar when I run other tutorials. How can I solve this problem?
OnePK requires TLS now. You must build a Java truststore file and specify the path to that file for running the tutorials. Check out the Getting Started Guide on the AiO VM desktop and look at the Security section. This will walk you through configuring TLS on the device as well as the command line options for the various tutorials. You can copy the truststore.jks file from the AiO VM to your Mac since you only care about connecting to the IOSv instances.
If you still get an SSL error, you will want to make sure you're connecting to the devices with the right address. This might mean you need to establish routing through the Linux VM to the IOSv instances. This can be done by adding a static route on the Mac (e.g., sudo route add -net 10.10.10.0/24 192.168.1.129), then adding appropriate default routes on the IOSv instances.