Service Virtualization

Expand all | Collapse all

Getting SSH "Connection failed" error

  • 1.  Getting SSH "Connection failed" error

    Posted Jun 18, 2017 08:37 PM

    Hi,

    DevTest 9.5: I found JAR files on community to do SSH. However getting "Connection Test Failed" error, when I Test the connection. Kindly assist me. Thanks

     

    Error:

    There was a problem while connecting to <<ServerName>>

     

     



  • 2.  Re: Getting SSH "Connection failed" error

    Broadcom Employee
    Posted Jun 18, 2017 11:09 PM

    Hi Narasimha,

     

       Looks like you have an issue in connecting to remote host with port number which you have given. Can you verify the connection details and also check whether you are able to connect using putty or SSH?

     

    Thanks

    Srikanth



  • 3.  Re: Getting SSH "Connection failed" error

    Posted Jun 18, 2017 11:36 PM

    Hi Srikanth gajsr01,

     

    1) I am able to login through PuTTY with the same details

    2) By using the same details I am able to login to through "Execute External command" step as follows

    {{Putty_Root_Folder}}\putty.exe -ssh {{Server_HostName}} -P {{Server_PortNumber}} -l {{Server_UserName}} -pw {{Server_Password}}



  • 4.  Re: Getting SSH "Connection failed" error

    Posted Jun 29, 2017 11:51 AM

    Srikanth,

    Can you respond to Narasimha's latest response?



  • 5.  Re: Getting SSH "Connection failed" error

    Broadcom Employee
    Posted Jun 30, 2017 05:45 PM

    Narasimharao,  can you copy and paste the entire stack trace of the error from the Workstation log.  Wondering if the properties did not get resolved in the step.  



  • 6.  Re: Getting SSH "Connection failed" error

    Posted Jul 02, 2017 11:51 PM

    Hi Shiney,

    There are no errors present in Workstation logs. I have directly  passed values in SSH step and the result is same. Following is the error.

    Note: I have copied these jars in workstation and running it in ITR (These jars are not present on server)

     

    ============================================================================
    | There was a problem while connecting to <<SERVER_NAME>>
    ============================================================================
    | Step:        SSH Step
    ----------------------------------------------------------------------------
    | Message:     There was a problem while connecting to <<SERVER_NAME>>
    ----------------------------------------------------------------------------
    | Trapped Exception: There was a problem while connecting to <<SERVER_NAME>>
    | Trapped Message:   

     

    ============================================================================
    | Exception:
    ============================================================================
    | Message:     There was a problem while connecting to <<SERVER_NAME>>
    ----------------------------------------------------------------------------
    | Trapped Exception: There was a problem while connecting to <<SERVER_NAME>>
    | Trapped Message:   java.io.IOException: There was a problem while connecting to <<SERVER_NAME>>
    ----------------------------------------------------------------------------
    STACK TRACE
    java.io.IOException: There was a problem while connecting to <<SERVER_NAME>>
        at com.trilead.ssh2.Connection.connect(Connection.java:791)
        at com.trilead.ssh2.Connection.connect(Connection.java:563)
        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.createNewConnection(TrileadConnectionFactory.java:158)
        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.makeObject(TrileadConnectionFactory.java:276)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.getConnection(TrileadConnectionFactory.java:97)
        at com.lisa.utils.controller.trilead.SSHStep.execute(SSHStep.java:236)
        at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
        at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
        at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
        at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
        at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
        at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
        at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:92)
        at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:230)
        at com.trilead.ssh2.Connection.connect(Connection.java:743)
        ... 15 more
    Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
        at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:413)
        at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:754)
        at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:469)
        ... 1 more
    ============================================================================

     


    ----------------------------------------------------------------------------
    STACK TRACE

     


    ============================================================================
    | Exception:
    ============================================================================
    | Message:     There was a problem while connecting to <<SERVER_NAME>>
    ----------------------------------------------------------------------------
    | Trapped Exception: There was a problem while connecting to <<SERVER_NAME>>
    | Trapped Message:   java.io.IOException: There was a problem while connecting to <<SERVER_NAME>>
    ----------------------------------------------------------------------------
    STACK TRACE
    java.io.IOException: There was a problem while connecting to <<SERVER_NAME>>
        at com.trilead.ssh2.Connection.connect(Connection.java:791)
        at com.trilead.ssh2.Connection.connect(Connection.java:563)
        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.createNewConnection(TrileadConnectionFactory.java:158)
        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.makeObject(TrileadConnectionFactory.java:276)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.getConnection(TrileadConnectionFactory.java:97)
        at com.lisa.utils.controller.trilead.SSHStep.execute(SSHStep.java:236)
        at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
        at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
        at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
        at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
        at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
        at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: Key exchange was not finished, connection is closed.
        at com.trilead.ssh2.transport.KexManager.getOrWaitForConnectionInfo(KexManager.java:92)
        at com.trilead.ssh2.transport.TransportManager.getConnectionInfo(TransportManager.java:230)
        at com.trilead.ssh2.Connection.connect(Connection.java:743)
        ... 15 more
    Caused by: java.io.IOException: Cannot negotiate, proposals do not match.
        at com.trilead.ssh2.transport.KexManager.handleMessage(KexManager.java:413)
        at com.trilead.ssh2.transport.TransportManager.receiveLoop(TransportManager.java:754)
        at com.trilead.ssh2.transport.TransportManager$1.run(TransportManager.java:469)
        ... 1 more
    ============================================================================

     


        at com.lisa.utils.controller.trilead.TrileadConnectionFactory.getConnection(TrileadConnectionFactory.java:103)
        at com.lisa.utils.controller.trilead.SSHStep.execute(SSHStep.java:236)
        at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1288)
        at com.itko.lisa.test.TestCase.execute(TestCase.java:1203)
        at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1188)
        at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1058)
        at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:71)
        at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:965)
        at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
        at java.lang.Thread.run(Unknown Source)
    ============================================================================



  • 7.  Re: Getting SSH "Connection failed" error

    Broadcom Employee
    Posted Jul 10, 2017 12:21 PM

    Narasimharao, from the logs,  it looks like  its something with your Host Key Algorithm verification. 

     

    You can look at the below link  Google Groups 

    probably  delete the known_hosts entry and create a new one via

     

    ssh -o HostKeyAlgorithms=ssh-rsa slave2.example.com

     

     

    hope this helps.



  • 8.  Re: Getting SSH "Connection failed" error

    Broadcom Employee
    Posted Jul 10, 2017 01:13 PM

    Please turn on  logging in DEBUG mode and try to test this again  and Attach your workstation logs.  



  • 9.  Re: Getting SSH "Connection failed" error

    Posted Jul 10, 2017 08:21 PM

    Hi Shiney,

    Thanks for looking into this issue. Please find below error details from Workstation.log

     

    2017-07-11 00:09:54,160Z (10:09) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:09:55,627Z (10:09) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:09:55,658Z (10:09) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:09:55,658Z (10:09) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:09:56,141Z (10:09) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:02,789Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:03,600Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:03,600Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:04,599Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:04,646Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:04,646Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:06,003Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:06,003Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:06,018Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:08,515Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:08,515Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:09,029Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:09,029Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:09,139Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:09,154Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:11,931Z (10:10) [ProcDlgThreadCallbk@789fa364] WARN  com.itko.lisa.test.LisaException - LisaException detail There was a problem while connecting to <<SERVERNAME>>:22 exception is java.io.IOException: There was a problem while connecting to <<SERVERNAME>>u:22
    2017-07-11 00:10:13,990Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:13,990Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:13,990Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:14,006Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:14,006Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:16,705Z (10:10) [AWT-EventQueue-0] INFO  com.itko.lisa.test.TestCase    - Name: POC_FunctionalServerRestart Version: 5 created with LISA 9.5.1 (9.5.1.6)
    2017-07-11 00:10:16,876Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:16,876Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:18,858Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:18,858Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:18,889Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:18,904Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:18,920Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:18,920Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:18,951Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:18,951Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:18,967Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:18,967Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:18,982Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:18,998Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:19,014Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:19,029Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:19,045Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:19,060Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:19,076Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:19,092Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:19,107Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:19,107Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:19,138Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:19,138Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:19,154Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:10:19,170Z (10:10) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.
    2017-07-11 00:10:20,433Z (10:10) [ProcDlgThreadCallbk@5e59c0f9] WARN  com.itko.lisa.test.LisaException - LisaException detail There was a problem while connecting to <<SERVERNAME>>:22 exception is java.io.IOException: There was a problem while connecting to <<SERVERNAME>>:22
    2017-07-11 00:12:36,667Z (10:12) [AWT-EventQueue-0] INFO  com.itko.lisa.test.TestCase    - Name: POC_FunctionalServerRestart Version: 5 created with LISA 9.5.1 (9.5.1.6)
    2017-07-11 00:12:36,761Z (10:12) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_16.png was not found.
    2017-07-11 00:12:36,761Z (10:12) [AWT-EventQueue-0] ERROR com.itko.lisa.resources.ResourceLoader - The image/icon named ssh_64.png was not found.

     

    Thanks,

    Narasimha.



  • 10.  Re: Getting SSH "Connection failed" error
    Best Answer

    Broadcom Employee
    Posted Jul 14, 2017 02:45 PM

    Narasimha ,  please open a ticket with CA support..  From the logs,  it looks like the  properties are not getting resolved.  I would have to look at this issue in a webex.  

     

    the host is still saying  <<SERVERNAME>>:

     

    Thanks

     

    Shiney 



  • 11.  Re: Getting SSH "Connection failed" error

    Posted Jul 14, 2017 08:22 PM

    Hi Shiney,

    I have replaced actual server name with <<SERVERNAME>> from the VSE logs. It was showing my server name properly in the logs.

     

    Thanks,

    Narasimha