Clarity PPM

Expand all | Collapse all

SFTP Error: Could not parse responde code SSH... ftp:open

Jump to Best Answer
  • 1.  SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-10-2018 09:40 AM

    Hi all,

    as I have a SFTP question I am posting my small issue (Could not parse responde code for ftp:open tag) here:

     

    org.apache.commons.jelly.JellyTagException: null:20:97: <ftp:open> Could not parse response code.

    Server Reply: SSH-2.0-OpenSSH_7.4

                             at com.niku.union.gel.tags.ftp.OpenTag.openFTP(OpenTag.java:78)

    Caused by: org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
    Server Reply: SSH-2.0-OpenSSH_7.4
                             at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:331)

    Here is my GEL script trying to write on our SFTP folder:

    <gel:parameter var="clarityURL" default="https://cppmXXXX-test.ondemand.ca.com"/>

    <gel:parameter var="clarityUser" default="admin"/>

    <gel:parameter var="claritypwd" default="***!" secure="true"/>

     

    <gel:parameter default="/Clarity" var="sharefolder"/>

    <gel:parameter default="/Clarity" var="docPath"/> 

     

    <gel:parameter default="10000" var="end"/>

    <gel:setDataSource dbId="niku"/>

    <gel:parameter default="C:\temp" var="inputfolder"/>

     

    <core:set value="${inputfolder}\test_ray.txt" var="file_read"/>

    <ftp:open hostName="sftp3.ondemand.ca.com" port="22" user="MUNXXXX" password="xyz">

                   <ftp:put fileName="${file_name}" localDir="${file_read}" remoteDir="/home/MUNXXXX/sftp/Development/SCP"/>

    </ftp:open>

     

    many thanks in advance for any kind of help!

    Olivier



  • 2.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-10-2018 10:17 AM

    I don't believe the jelly core ftp tag is available.  I think you need the gel ftp tag.  Try changing the core:ftp to gel:ftp

     

    V/r,

    Gene



  • 3.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-10-2018 03:05 PM

    Hello Gene,

    I am using the gel:ftp tag already I am not mistaken. just like all the samples I found online...

     

    <gel:script xmlns:core="jelly:core" xmlns:file="jelly:com.niku.union.gel.FileTagLibrary" xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
    xmlns:obj="http://www.niku.com/xog/Object" xmlns:soap="jelly:com.niku.union.gel.SOAPTagLibrary"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sql="jelly:sql"
    xmlns:util="jelly:util" xmlns:x="jelly:xml" xmlns:xog="http://www.niku.com/xog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ftp="jelly:com.niku.union.gel.FTPTagLibrary">

     

    <ftp:open hostName="sftp3.ondemand.ca.com" port="22" user="MUNXXXX" password="xyz">
    <ftp:put fileName="${file_name}" localDir="${file_read}" remoteDir="/home/MUNXXXX/sftp/Development/SCP"/>
    </ftp:open>

     

    I am using it wrong?  many thanks!



  • 4.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-10-2018 03:30 PM

    Sorry missed that.

     

    In looking at the error message and the FTPClient class, it doesn’t appear that sftp3.ondemand.ca.com is returning a valid reply.

     

    Have you successfully used port 22 with an SFTP client to test that sftp3.ondemand.ca.com is listening on 22 and that your username and password are working?

     

    V/r,

    Gene



  • 5.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-11-2018 08:00 AM

    Hello Gene,

    I am connecting successfully using Filezilla using SFTP SSH protocol with port 22 using my username and password supplied by the OnDemand Support Team. I even tried to connect via Telnet (command prompt) and the URL is listening to port 22. Secure FTP does not seem to be supported by gel ftp library as Stefano_Lazzarotto mentions below... As anyone been able to connect to SFTP folders  from GEL scripts using CASaaS environments?

    many thanks,

    Olivier



  • 6.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-11-2018 06:45 AM

    Hi Olivier.

    I'm not sure secure ftp is supported by gel ftp library.

    If you are on premise you can see and apply this:

    https://communities.ca.com/thread/241775418-sftp-on-ppm-onpremise?commentID=241972705&et=watches.email.thread#comment 

     

    Stefano



  • 7.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-11-2018 08:01 AM

    Ciao Stefano,

    unfortunately we are on SaaS and we cannot add libraries on the Server if I am not mistaken... or maybe through a Support Ticket maybe???

    Grazie mille!

    Oli



  • 8.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-11-2018 08:48 AM

    Are you trying to sendi files from one environment to another (dev/prod) or from one customer to another?



  • 9.  Re: SFTP Error: Could not parse responde code SSH... ftp:open

    Posted 12-11-2018 09:01 AM

    I simply wanted to upload cost plans in CSV format onto SaaS customer environment (via SFTP folder provided) and then load them into CA PPM via GEL scripts from within a process/job.



  • 10.  Re: SFTP Error: Could not parse responde code SSH... ftp:open
    Best Answer

    Posted 12-11-2018 08:47 AM

    Hi everyone,

     

    finally Support pointed me to the solution

     

    The files that you upload to the SFTP folder previously provided to you, will get automatically copied over to a location called "/fs0/clarity1/share". You will need to read your files using the file:read tag from this location. There is a similar discussion about this subject here in the communities: https://communities.ca.com/thread/99795196 .

     

    many thanks to all for your help!

    Olivier