Service Virtualization

Expand all | Collapse all

Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

Jump to Best Answer

Anon Anon09-21-2015 09:21 AM

Josh_Hendrick09-21-2015 10:41 AM

Josh_Hendrick05-12-2017 12:12 PM

  • 1.  Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-16-2015 10:17 AM

    Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP



  • 2.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.
    Best Answer

    Posted 09-16-2015 05:08 PM

    FTP is not supported for VS recording currently.  There is an FTP test step that is available as a product extension.  This could be used to construct an FTP/SFTP VS manually.  If you need this extension please feel free to reach out and I can e-mail it to you for the version of LISA you are using.



  • 3.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-18-2015 10:22 PM

    Hi Josh,

     

    Can you please mail me in arsh.warsi@gmail.com , these below two jar files mentioned in lisa help guide but not available in installer.

     

    "the FTPCustJavaNode described previously has been packaged for you at LISA_HOME/doc/DevGuide/lisaint-examples.jar. This custom Java test step depends on the FTP client that is packaged at LISA_HOME/doc/DevGuide/lib/ftp.jar"

     

    Thanks in Advance.

    Arsh

     

    Please ignore above message, I got it from link : https://wiki.ca.com/display/DTS84/Using%20the%20SDK

     

    Thanks..



  • 4.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-20-2015 05:01 PM

    Ok, no problem.  Thanks.  Feel free to let me know if you'd like the SSH/SCP/FTP step.



  • 5.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 04:56 AM

    Hi Josh,

     

    Please send me FTP step for LISA 7.5 . How to set up FTP connection and use it .

    Rd00424421@techmahindra.com<mailto:Rd00424421@techmahindra.com>

     

    Regards

    Rohan Doshi

    9527319798



  • 6.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 08:32 AM

    Hi Josh,

     

    Please send SSH/SCP step extension in my above mail id.

     

    @RohanDoshi : I have mailed you FTP example.

     

    Regards,

    Arsh



  • 7.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 08:52 AM

    Hi Tausif,

     

    I didn’t received your email . Please can you share in the link itself or resend again .



  • 8.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 08:54 AM

    We have attachment blocking policy in our company so it will not come into my inbox .

     

    Please share to rohandoshi_friends@yahoo.co.in<mailto:rohandoshi_friends@yahoo.co.in>

     

    OR share it in our discussion forum itself , it will be better .



  • 9.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 09:21 AM

    Attached the jar.



  • 10.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 10:38 AM
      |   view attached

    Attached is the SSH Utils extension which contains support for SSH/SCP/SFTP/FTP.  You'll need to import this project into Eclipse and/or build with Ant against the version of LISA you have installed.  It will create libraries in the "dist" folder which can then be dropped into your hotDeploy folder.  The new steps should appear in the right click menu under "Custom Extensions".  You see an SSH Step and SFTP step.

    Attachment(s)

    zip
    ssh-utils.zip   947K 1 version


  • 11.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 10:41 AM

    Screen Shot 2015-09-21 at 9.40.28 AM.png



  • 12.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 11:19 AM

    Received your jar file . thanks. But I don’t know how to use it.

    I have deployed it into hotdeploy folder ….how to us eit ?

    It wil be really helpful if you send me an example of FTP with test case how to use it , what details we need to enter in fields of FTP step extension etc.

     

    Regards

    Rohan Doshi



  • 13.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-21-2015 12:50 PM
      |   view attached

    Attached is an example project which has a virtual service example.  This should show you how you can piece together FTP steps to develop a custom virtual service with the extension.

    Attachment(s)

    zip
    FTP_Virtualization.zip   13K 1 version


  • 14.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 10:24 AM
      |   view attached

    Hi Josh,

     

    Thanks for sharing the sample project . Actually I tried to open it on LISA 7.5 but unable to open due to some classpath missing . Do we need to add some jar files or clas path ? I tried to add jar file which you sent earlier of examples in hot deploy folder but still unable to open .

     

    Can you plz provide missing file to open this project .

     

    Also can we have call tomorrow regarding this set up , its very new to me so it would be better to have call and discuss if possible for you .

     

     

     

    Regards,

    Rohan Doshi

    Tech Mahindra | IBU TUS-05 | TB-Test –Dispatch-EDGE

    Mobile: +91-9527319798 | Ext: 6-256536

      Email: RD00424421@TechMahindra.com<mailto:RD00424421@TechMahindra.com>



  • 15.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 10:39 AM

    This project is on DevTest 8.0.2 so you would need to have that version to open this project.  That being said as long as you've built/compiled your extension with LISA 7.5 you should have no problems adding the SFTP steps to a new test case you create.  I'm currently onsite with a customer so a call may be tough.  Can you please provide more details around the error you're receiving?



  • 16.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 10:51 AM

    I cannot open it in LISA 7.5 ?

    I have DevTest 8.4 installed on my machine . I have copied the error in my previous email I am getting the same error classpath not found . this may be bcoz of any missing jar files ?

     

    Also any jar file we get we have to paste it in hotdeploy folder only right ?

     

    Regards,

    Rohan Doshi

    Tech Mahindra | IBU TUS-05 | TB-Test –Dispatch-EDGE

    Mobile: +91-9527319798 | Ext: 6-256536

      Email: RD00424421@TechMahindra.com<mailto:RD00424421@TechMahindra.com>



  • 17.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 11:04 AM

    Hi Rohan,

     

    Download the ssh-utils.zip and extract the same , find the below mentioned jars in "\ssh-utils\dist" folder and place the same in hotDeply and restart the workstation.

    itkoext-ssh-utils-6.0.jar

    itkoext-ssh-utils-tests-6.0.jar

     

    Regards

    Nandeesha



  • 18.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 11:09 AM

    This will work for LISA 7.5 and DevTest 8.4 ? I am trying to do it .

     

    Regards,

    Rohan Doshi

    Tech Mahindra | IBU TUS-05 | TB-Test –Dispatch-EDGE

    Mobile: +91-9527319798 | Ext: 6-256536

      Email: RD00424421@TechMahindra.com<mailto:RD00424421@TechMahindra.com>



  • 19.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 11:12 AM

    Yes, the extension will work for any version, just be sure that you've built the extension files against the version of DevTest you are using.

     

    The project that I attached was created using DevTest 8.0.2 so you may have issues if you try to open that project on an earlier version of DevTest.



  • 20.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-23-2015 12:24 AM

    ___hi Josh ,

    I tried to build for Lisa 7.5 extension files but unable to create and open it . Can U suggest any Oder way to create extension files for specific version ? I tried thru eclipse . Can we do it on any developers machine ? Where to enter Lisa version while creating .

    Sorry I am new to FTP so alsing some basic questions



  • 21.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-23-2015 09:23 AM

    Please let me know the exact version of LISA you're using and I'll build it for you and send it.  Is it 7.5, 7.5.1, or 7.5.2?



  • 22.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-23-2015 10:33 AM

    Hi Josh,

     

    I am able to open in LISA 7.5 with the jar files shared earlier itkoext-ssh-utils-6.0 and itkoext-ssh-utils-tests-6.0 .not sure how I was able to open .

     

    I will check with my current details for SFTP step with your vsm model . Just one question , You have created this vsm model manually right ? How are you mapping the request as I see there is no name for request in vsi .

     

    Thanks a lot for your help .

     

    Regards,

    Rohan Doshi

    Tech Mahindra | IBU TUS-05 | TB-Test –Dispatch-EDGE

    Mobile: +91-9527319798 | Ext: 6-256536

      Email: RD00424421@TechMahindra.com<mailto:RD00424421@TechMahindra.com>



  • 23.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-23-2015 10:43 AM

    No problem.  Make sure you have trilead-ssh2-build213.jar on your classpath as well.

     

    Yes, this VSM was created manually.  The VSI was from a customer so I just replaced this with a sample VSI.  The key point here is that we pull a file from a file location, use a custom script step to create a VSE Request object which is what the VSI step will expect, then convert the SI lookup response back to a string so we can publish the response back to a file on the file system.



  • 24.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 09-22-2015 10:57 AM

    Just saw that you had attached the error message.  It looks like you don't have the jars setup properly on your CLASSPATH.  Ensure you've done the following:

     

    1) Build the extension against LISA 7.5

     

    2) A folder should be created called "dist".  In that folder copy the following files to LISA_HOME/hotDeploy - dist/itkoext-ssh-utils-x.x.jar, dist/lib/trilead-ssh2-build213.jar.

     

    3) Restart the LISA Workstation.

     

    4) You should then see the steps added in the Custom Extensions right click menu

     

    If you're still experiencing errors after the following, drop me an e-mail and we can try to set something up later in the evening US time.

     

    Josh



  • 25.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 01-27-2017 02:20 AM

    Hi Josh,

     

    I am using the 9.1 version and I'm trying to connect to one of the servers using the SSH step, however it is giving error as connection failed :

     

    | Trapped Message: java.io.IOException: There was a problem while connecting to xx.***.xx.xx:22
    ----------------------------------------------------------------------------
    STACK TRACE
    java.io.IOException: There was a problem while connecting to xx.***.xx.xx:22
    at com.trilead.ssh2.Connection.connect(Connection.java:791)
    at com.trilead.ssh2.Connection.connect(Connection.java:563)
    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.createNewConnection(TrileadConnectionFactory.java:159)
    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.makeObject(TrileadConnectionFactory.java:278)
    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)
    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.getConnection(TrileadConnectionFactory.java:98)
    at com.itko.lisa.ext.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:1283)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1050)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:70)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:963)
    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

     

    My email Id is vibhashhpathak@gmail.com.  Any inputs will be helpful.



  • 26.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 10-06-2015 02:36 AM

    Hi Josh,

     

    Thanks for the inputs . I tried to implement your vsm in my project few things are not clear ….

    1)      My scenario is I want to check if file is present at “X” location . This I can do by SFTP step by get command .

    2)      Once I validate if file is present then the testing team will do the validation part of the file .

    3)      I don’t have VSI as of now, I am only doing this in vsm manually . Now I am confused when I deploy my vsm to console then how the testing team will be able to test there scenarios ?

    4)      Once I test commands in LISA and get the file is it recorded in LISA ? later tester will only test der validation part ?

    5)      Later dey will not connect to live server and port no ? directly test wid lisa ?

     

     

    Actually this is very diff from MQ , HTTP so confusion . MQ and HTTP I am well versed now .

    Kindly request you to please explain



  • 27.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 10-06-2015 01:53 PM

    Hi Rohan,

     

    I'm not quite sure what you are looking to accomplish with this statement: " Once I validate if file is present then the testing team will do the validation part of the file ."


    The example I sent to you does the following:

    1) Picks up a file via FTP from a remote server

    2) Reads the file and chooses the proper response from the SI

    3) Places the response chosen from the SI in the correct file location

     

    This is simulating a remote FTP process which was unavailable to the customer.  In your case, if you need to do something similar you'll need to build your own SI - you could do this by building an SI from request/response pairs.

     

    Essentially your FTP virtual service is just listening for files to be dropped into a particular folder, picks them up, and then places another file.  This is not like MQ where users would place a message onto a queue or HTTP where users would send a request to a new host/port.  You configure your FTP service to pick up files from a folder on a server somewhere - users are not connecting into this service like other protocols.

     

    Josh



  • 28.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 10-07-2015 03:43 AM

    Hi Josh,

     

    I got your point , however here in my project people are saying we want to FTP Virtualization . But as I see

     

    1)      We connect to live server , Get the File

     

    2)      Verify if File is present in specific folder , Verify if there is some content in file , that’s it . Actual Validation of file is done by Tester i.e file verification scnarios (in my project)

     

    3)      Now if I do this once manually by executing VSM  through ITR and deploy in on server console , does the file content gets recorded in VSM (all data is stored in vsm after executing once in ITR ) ?after deploying can we test the content in our file ? Actually initially while recording I will give hard coded file name do step 1 and 2 and deploy .

     

    4)      Now once I deploy my vsm . how will the testing team connect to LISA ? I understand its not like MQ or HTTP then how they can connect to LISA to test there scenarios .

     

    Actually I don’t see any use of Virtualization in FTP because when new file comes in folder we have to get that file name first (and this file name has to be provided by testing team to us), we have to check only the file is present or not . If testing team needs the latest file to test there scenarios So whats the use of Virtualization ?

     

     

    Regards,

    Rohan Doshi

    Tech Mahindra | IBU TUS-05 | TB-Test –Dispatch-EDGE

    Mobile: +91-9527319798 | Ext: 6-256536

      Email: RD00424421@TechMahindra.com<mailto:RD00424421@TechMahindra.com>



  • 29.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 10-07-2015 12:51 PM

    It sounds like the FTP step doesn't fit your scenario.  If the team needs an FTP server to connect into, why not just install one of the free FTP servers such as FileZilla?



  • 30.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 12-15-2015 02:19 AM

    Hello Josh,

     

    The solution that you have described here fits the FTP requirements from our client . I was successfully able to deploy the jar files as well import the sample virtualization project(FTP_virtualization.zip) that you had provided.

     

     

    We expect multiple files to be available at the incoming folder. Your model seems to be built only for sending response for one file(Pls correct me if I am wrong).

     

    Which step in the model checks for loop back to select specific response for (n+1)th file after it has sent response for (n)th file.

    For e.g if there are 2 input files. File 1 should be mapped to  image xyz, ftp it and then file 2 should mapped to image abc and ftp it.

     

    I am not able to figure that out.



  • 31.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 12-15-2015 09:22 AM

    That's a good question, and we can definitely handle something like that.  I intentionally simplified the project that I attached here so as not to confuse anyone looking at it.  The original project had an additional extension which picked up a single file, "locked that file" to indicate that it's being worked on, then continually looped back to get the next file ensuring that it doesn't pick up a file that is locked.

     

    What version of DevTest are you on?  I can build the "locking" extension mechanism for you and then send you the more complex version of the project for you to take a look at.



  • 32.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 12-15-2015 06:42 PM
      |   view attached

    Thanks Josh for the prompt response. Appreciate it.

     

    Yes pls do send me the code once you have completed it. It would be of great help.

    I use CA LISA 7.5.1

     

    I would also like to add that that FTP files that we receive would be zipped and encrypted. So for processing, I would have to unzip them and decrypt.

    And while FTPing the responses, they again need to be encrypted and zipped.  Do you have any existing piece of custom steps that I can reuse here. OR any suggestions/pointers are welcome too.

     

     

    Many thanks once again.

     

     

    Regds,

    Hozefa Vakanerwala



  • 33.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 12-15-2015 08:21 PM

    Hi Hozefa,

     

    I've attached the complete FTP project.  Also attaching the FTP-Utils jar which you'll need to open the project.  I've also attached a zip of the original extension code.

     

    The extension is for a custom assertion written to check if a file being processed is "locked", or in the middle of processing.  The VSM uses the SharedModelMap class to store the files currently being processed (adds a file at the beginning and then unlocks it at the end).  The rest of the steps are for reading a file, moving/archiving, and putting a proper responses in a specific folder after doing a Service Image lookup.

     

    For unzipping and encryption, you'll likely need to write an additional custom Java Script step to handle those tasks as part of the VSM flow.  Or you're welcome to drop libraries into hotDeploy that can handle those tasks if you have existing Java code which handles that.

     

    Thanks,

    Josh

    Attachment(s)

    zip
    ftp-utils.zip   19K 1 version


  • 34.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 12-17-2015 05:51 PM

    Thanks Josh for the module. I am awaiting FTP server access for client side.

    Shall do the shakeout with your code soon.

     

    Many thanks for the prompt response.

     

     

     

    Regards,

    Hozefa



  • 35.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 02-10-2016 04:31 AM

    Hi Josh.

     

    I am not able to get Jar files in the network where I am working.   I have FTp Jar file for SFTP step but due to some custome assertion or something I am not able to open this VSM  file. Can you please remove this custome Assertions/Filters and send me plain VSm with FTP step?

     

     

    Thanks in advance.

     

    Piyush



  • 36.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 02-10-2016 11:04 AM

    Hi Piyush,

     

    The custom assertion you can find attached to the post above:

     

     

    The source code is in ftp-utils.zip otherwise the jar is attached there as well which you can use built against LISA 7.  You can use the source code to build the jar and drop it into your hotDeploy.

     

    Josh



  • 37.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 10-06-2015 02:42 PM

    We don't have inbuilt FTP. But we can customize and create VSM for the same. Need to add dummy listening step, then write java snipplets to pick and drop files. Need to create transient response as well

     

    Thanks

    Ranjith



  • 38.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 10-07-2015 03:11 AM

    Hi Gopalan,

     

    Can you please share the model with us .

     

    Regards,

    Rohan Doshi

    Tech Mahindra | IBU TUS-05 | TB-Test –Dispatch-EDGE

    Mobile: +91-9527319798 | Ext: 6-256536

      Email: RD00424421@TechMahindra.com<mailto:RD00424421@TechMahindra.com>



  • 39.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 02-02-2016 11:40 AM

    Hi Can someone please tell me what a "Dummy Listen Step" is? I need to pick a file from the FTP server as and when it comes in. Can I just have the external FTP step inside a vsm and deploy it to achieve what is needed?



  • 40.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 02-02-2016 07:18 PM

    You can add in an FTP step in your VSM - this would need to be custom build which can pick up a file from an FTP server.  Yes, you would put this FTP step inside a VSM.  You can try to take a look at the sample project I attached above as an example.



  • 41.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 04-06-2016 05:15 PM

    Hi Josh,

     

    Can I get this Jar for Lisa 8.3.0. or Can you please share me steps to build the jar file using the eclipse project which is shared against DevTest8.3



  • 42.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 04-06-2016 08:50 PM

    Here are the 8.3 jar files attached.  Please drop these into your LISA_HOME/hotDeploy folder.



  • 43.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-03-2016 02:08 PM

    Josh,

     

    I am trying to do an SFTP step using the extension above. I am trying to authenticate with a public key and in ITR I am getting the exception below.

     

    I had generated the SSH keys using PuttyGen. I realized that probably the error is thrown because Lisa might be expecting an Open SSH private key and got the PPK converted to OpenSSH. I am still receiving the same exception.

    If I use the SSH keys on WINSCP, they work perfectly fine and I am able to connect to the target machine.Any troubleshooting steps would help.

     

    ============================================================================

    | Exception:

    ============================================================================

    | Message:     Publickey authentication failed.

    ----------------------------------------------------------------------------

    | Trapped Exception: Publickey authentication failed.

    | Trapped Message:   java.io.IOException: Publickey authentication failed.

    ----------------------------------------------------------------------------

    STACK TRACE

    java.io.IOException: Publickey authentication failed.

      at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:262)

      at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:443)

      at com.itko.lisa.ext.trilead.TrileadConnectionFactory.checkAuth(TrileadConnectionFactory.java:199)

      at com.itko.lisa.ext.trilead.TrileadConnectionFactory.createNewConnection(TrileadConnectionFactory.java:165)

      at com.itko.lisa.ext.trilead.TrileadConnectionFactory.makeObject(TrileadConnectionFactory.java:276)

      at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)

      at com.itko.lisa.ext.trilead.TrileadConnectionFactory.getConnection(TrileadConnectionFactory.java:97)

      at com.itko.lisa.ext.trilead.SFTPEngine.execute(SFTPEngine.java:55)

      at com.itko.lisa.ext.trilead.SFTPStep.execute(SFTPStep.java:92)

      at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)

      at com.itko.lisa.test.TestCase.execute(TestCase.java:1295)

      at com.itko.lisa.test.TestCase.execute(TestCase.java:1210)

      at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1195)

      at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1057)

      at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:70)

      at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:964)

      at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)

      at java.lang.Thread.run(Unknown Source)

    Caused by: java.io.IOException: Invalid PEM structure, '-----BEGIN...' missing

      at com.trilead.ssh2.crypto.PEMDecoder.parsePEM(PEMDecoder.java:138)

      at com.trilead.ssh2.crypto.PEMDecoder.decode(PEMDecoder.java:313)

      at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:171)

      ... 17 more

     

    Thank You,

    Arun



  • 44.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-03-2016 09:10 PM

    Hi Arun,

     

    It looks like the root message there is that it's not finding a valid PEM structure.  It looks like it's missing the BEGIN tags which need to be present.  Does your PEM have something like the following:

     

    -----BEGIN ENCRYPTED PRIVATE KEY-----

    MIIFDjBABgkqhkiG9w0BBQ0wM........

    ......

    -----END ENCRYPTED PRIVATE KEY-----

     

    Josh



  • 45.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-03-2016 09:18 PM

    Josh,

     

    Yes. The private key I have follows the structure expected.I am copy pasting part of the private key below.

     

    -----BEGIN RSA PRIVATE KEY-----

    Proc-Type: 4,ENCRYPTED

    DEK-Info: DES-EDE3-CBC,10614DECA196B5B2

     

     

    fMIHjLXqeVWHLU07a4HQ5g/Im7orzjLgX4mOcXdsAeqbt7bFh1TPw8Z2L98dBvEp

    Wr+Kzncfqcc707PlMIivJPFyT5dI6+rKYV2xiNDy9UBTwWeK3l3ZYinmPCLvQbf5

    kJYa19H92qKrK3ZLlxMdE4Uo4/0ykct/ODhW4fbF/ep5wDRtplF4haeIB9FvnFNp

    muyZNb7ius9dYyRUK5EPF7gJdNH/crY5gXSn2e0czcshZnmpTxbKYr3kE49VJaSW

    ........................................................................

    -----END RSA PRIVATE KEY-----

     

    Thank You,

    Arun



  • 46.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-03-2016 10:53 PM

    Josh,

     

    Just to make sure that it is not an issue with the private key, I ran sftp from the command line using the private key. Please find the command line screenshot and SFTP step screenshot

     

     

    SFTP_withOpensshPrivatekey.PNG

     

    Lisa_SFTP_step.PNG

     

    Thank You,

    Arun



  • 47.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 04:51 PM

    Hi Arun,

     

    After looking at the code, we're executing this statement when public key encryption is used:

     

    else if (auth.equalsIgnoreCase(AUTH_PUBLIC_KEY)) {

                // Authenticate with private key

                isAuthenticated = conn.authenticateWithPublicKey(username, privateKey.toCharArray(), privateKeyPass);

    }

     

    What we're doing here is pulling the privateKey itself from the field and converting it to a character array to pass to the authenticate method.

     

    Can you please try pasting the private key content into that field?

     

    Thanks,
    Josh



  • 48.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 05:50 PM

    Josh,

     

    I ran the test and I still got an exception.

     

     

     

    ============================================================================

    | Exception:

    ============================================================================

    | Message:     Publickey authentication failed.



  • 49.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 06:39 PM

    Josh,

     

     

    It seems like my last message was not completely captured.Sorry.Here is the exception I am getting in ITR.

     

     

    ============================================================================

    | Exception:

    ============================================================================

    | Message:     Publickey authentication failed.

    ----------------------------------------------------------------------------

    | Trapped Exception: Publickey authentication failed.

    | Trapped Message:   java.io.IOException: Publickey authentication failed.

    ----------------------------------------------------------------------------

    STACK TRACE

    1. java.io.IOException: Publickey authentication failed.

    at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:262)

    at com.trilead.ssh2.Connection.authenticateWithPublicKey(Connection.java:443)

    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.checkAuth(TrileadConnectionFactory.java:199)

    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.createNewConnection(TrileadConnectionFactory.java:165)

    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.makeObject(TrileadConnectionFactory.java:276)

    at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1148)

    at com.itko.lisa.ext.trilead.TrileadConnectionFactory.getConnection(TrileadConnectionFactory.java:97)

    at com.itko.lisa.ext.trilead.SFTPEngine.execute(SFTPEngine.java:55)

    at com.itko.lisa.ext.trilead.SFTPStep.execute(SFTPStep.java:92)

    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)

    at com.itko.lisa.test.TestCase.execute(TestCase.java:1295)

    at com.itko.lisa.test.TestCase.execute(TestCase.java:1210)

    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1195)

    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1057)

    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:70)

    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:964)

    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)

    at java.lang.Thread.run(Unknown Source)

    Caused by: java.io.IOException: Invalid PEM structure, -----END RSA PRIVATE KEY----- missing

    at com.trilead.ssh2.crypto.PEMDecoder.parsePEM(PEMDecoder.java:162)

    at com.trilead.ssh2.crypto.PEMDecoder.decode(PEMDecoder.java:313)

    at com.trilead.ssh2.auth.AuthenticationManager.authenticatePublicKey(AuthenticationManager.java:171)

    ... 17 more

    ============================================================================

     

     

    Thank You,

    Arun

     

     



  • 50.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 08:20 PM

    Ok, well it looks like that got us further along and we have a different message.  I saw that you created a support case for this.  Do you have some time to do a 30 minute webex to review?



  • 51.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 08:27 PM

    Hi Josh,

     

    Thanks for the response.

     

    I am available for the webex. I am available till 7:00 PM PST today or you can pick any convenient schedule for tomorrow. I am usually available from 8:00 AM PST to 7:00 PM PST.

     

    Thank You,

    Arun



  • 52.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 09:25 PM

    I can do it now if you drop me an e-mail.



  • 53.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-04-2016 10:17 PM

    This was resolved by providing a patched version of the SSH Util jar which reads the RSA Private key from a file path.



  • 54.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-05-2016 11:45 PM

    Josh,

     

    Thanks so much for the help on above issue. I have a follow up question on the topic.

     

    I had downloaded the sample FTP virtualization project you had provided in this thread earlier. My question is regarding the "archive" step that was part of the project. You had used responseBody as the content to be written to the archived file.

    When I tested on my local machine I notice that the property is not being set.Any troubleshooting steps that you can suggest to identify the issue would help.

     

    Thank You,

    Arun



  • 55.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-06-2016 10:39 AM

    The responseBody variable is being set in the Get VSE Response step.  It's using this script:

     

    --

    import com.itko.lisa.vse.stateful.model.TransientResponse;

     

    responseList = testExec.getStateObject("lisa.vse.response");

     

    //response is a list so we'll get the first one

    response = responseList.get(0);

    testExec.setStateObject("responseBody", response.getBodyAsString());

    --

     

    You'll need to figure out what's going on with this method and if you are properly getting back your lisa.vse.response object.  This will get set after doing the lookup in your VSI.



  • 56.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    Posted 05-11-2016 07:27 PM

    Josh,

     

    I want to bring to your attention an issue I faced while deploying the SFTP Virtual Service I had created. Essentially my intention was to SFTP a flat file , parse it using a custom parser to create a response and SFTP the response back.The VSM worked perfectly fine when run in ITR but deployment into VSE generated java.lang.IllegalArgumentException: The deployed model archive does not contain a deployable virtual service.

     

    I had to add a "Messaging Virtualization Marker" step which was unattached to the VSM flow to get the solution deployed on to the VSE. Can you please explain why this step is needed for the deployment of an SFTP Virtual Service and what does the step do to make the VSM a deployable service?

     

    Thank You,

    Arun



  • 57.  Re: Can we do FTP recording in LISA ? How to create virtual services using FTP ? Is there any protocol like FTP.

    0