Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: SFTP "Error getting files from SCP"

  1. #1

    Default SFTP "Error getting files from SCP"

    Hello all...

    I have had huge success with Spoon as an ETL tool. I am attempting to use the Put SFTP functionality, but I get the following error..

    "Error getting file from SCP :
    Permission denied"

    I have triple checked the username/password/IP address. The port is correct. Am I missing something? Let me know if you need more information.

    Note: I have successfully transfered a file over SFTP using another SFTP client. I am using a Windows machine.

    In addition, if I specify a file name that does not exist in the Wild Card text box, the command finishes successfully. In other words, I only get the above error if the file that is to be transfered exists.

    Does this sound like a permission thing? Does anyone have any ideas what I could try next to come closer to a solution?

    -------UPDATE--------

    I have tried this job on a different machine, on a different network, and the error is still the same. Does anyone have any idea what this could be?
    Last edited by AB Travis; 01-10-2008 at 11:00 AM.

  2. #2

    Default

    Is there any settings on the remote site that pentaho requires before it can send a file? Does someone have a test ftp site that I can try to determine whether or not my problem is with Spoon, or if it is with the SFTP site?

  3. #3

    Default

    http://forums.pentaho.org/showthread...highlight=sftp

    Make sure your SSH keys are shared between the machines.

  4. #4
    Join Date
    Jan 2008
    Posts
    22

    Default

    Quote Originally Posted by dhartford View Post
    http://forums.pentaho.org/showthread...highlight=sftp

    Make sure your SSH keys are shared between the machines.
    How do we do that in Windows Xp ?

    Regards,

    Thunderbird

  5. #5
    DEinspanjer Guest

    Default

    create a .ssh directory in your %HOMEPATH% directory (use cmd or something. Windows Explorer won't let you create .dirs or .files).
    In that directory, create a .known_hosts file and copy in the host signature key. (I use cygwin to test SSH stuff so I just copy my .ssh directory from c:\cygwin\home\user\.ssh)
    If you want to use public key authentication instead of username and password, make sure you set up .authorized_keys in the same way (copying the cygwin dir works for that as well).

    If this is useful to you, I would love it if you could pay me by formalizing these steps and then writting it up in the Pentaho wiki AFAQ. I've been meaning to but haven't done so yet.

  6. #6
    Join Date
    Jan 2008
    Posts
    22

    Default

    Quote Originally Posted by DEinspanjer View Post
    create a .ssh directory in your %HOMEPATH% directory (use cmd or something. Windows Explorer won't let you create .dirs or .files).
    In that directory, create a .known_hosts file and copy in the host signature key. (I use cygwin to test SSH stuff so I just copy my .ssh directory from c:\cygwin\home\user\.ssh)
    If you want to use public key authentication instead of username and password, make sure you set up .authorized_keys in the same way (copying the cygwin dir works for that as well).

    If this is useful to you, I would love it if you could pay me by formalizing these steps and then writting it up in the Pentaho wiki AFAQ. I've been meaning to but haven't done so yet.
    Have done it but still got some errors, ok... I have detailed logs here. May be someone can help me ?

    008/02/07 19:22:00 - Spoon - Starting job...
    2008/02/07 19:22:00 - Thread[sftp_job (sftp_job (Thread-53)),5,main] - exec(0, 0, START.0)
    2008/02/07 19:22:00 - sftp_job (sftp_job (Thread-53)) - Sleeping: 0 minutes
    2008/02/07 19:22:00 - sftp_job - Starting entry [Get a file with SFTP 1]
    2008/02/07 19:22:00 - Thread[sftp_job (sftp_job (Thread-53)),5,main] - exec(1, 0, Get a file with SFTP 1.0)
    2008/02/07 19:22:00 - Get a file with SFTP 1 - Start of SFTP job entry
    2008/02/07 19:22:00 - Get a file with SFTP 1 - Opened SFTP connection to server [sample.com] on port [22] with username [user]
    2008/02/07 19:22:03 - Get a file with SFTP 1 - Changed to directory [/home/user]
    2008/02/07 19:22:05 - Get a file with SFTP 1 - Found 16 files in the remote directory
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : Error getting files from SFTP :
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) :
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.run (Job.java:208)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute (Job.java:257)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute (Job.java:389)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute (Job.java:331)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.JobEntrySFTP.execute (JobEntrySFTP.java:369)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.SFTPClient.get (SFTPClient.java:133)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at com.jcraft.jsch.ChannelSftp.get (null:-1)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : org.pentaho.di.core.exception.KettleJobException:
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) :
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.run (Job.java:208)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute (Job.java:257)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute (Job.java:389)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute (Job.java:331)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.JobEntrySFTP.execute (JobEntrySFTP.java:369)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.SFTPClient.get (SFTPClient.java:133)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at com.jcraft.jsch.ChannelSftp.get (null:-1)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) :
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.SFTPClient.get(SFTPClient.java:135)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.JobEntrySFTP.execute(JobEntrySFTP.java:369)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute(Job.java:331)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute(Job.java:389)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.execute(Job.java:257)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.Job.run(Job.java:208)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : Caused by:
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at com.jcraft.jsch.ChannelSftp.get(Unknown Source)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : at org.pentaho.di.job.entries.sftp.SFTPClient.get(SFTPClient.java:133)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : ... 5 more
    2008/02/07 19:22:05 - sftp_job - Finished jobentry [Get a file with SFTP 1] (result=false)
    2008/02/07 19:22:05 - Spoon - Job has ended.

    Thanks !

    Thunderbird

  7. #7
    DEinspanjer Guest

    Default

    Quote Originally Posted by thunderbird View Post
    Have done it but still got some errors, ok... I have detailed logs here. May be someone can help me ?
    ...
    Code:
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) : Caused by: 
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) :     at com.jcraft.jsch.ChannelSftp.get(Unknown Source)
    2008/02/07 19:22:05 - Get a file with SFTP 1 - ERROR (version 3.0.1, build 3 from 2008/01/14 20:22:48) :     at org.pentaho.di.job.entries.sftp.SFTPClient.get(SFTPClient.java:133)
    Hrm. Not a great stack trace there. :/ Looking at the source, it appears the most likely reasons that you would bomb out like that would be if somehow a file in the remote location matched the regex but then couldn't be retrieved for some reason, or the destination wasn't defined right or you didn't have adequate permissions to place the file in the destination location.

    Do you use cygwin? (because sometimes it can royally screw with ACL style permissions)
    Have you tried getting a different file?
    Have you tried getting the file to a different location?
    Last edited by DEinspanjer; 02-07-2008 at 09:48 AM.

  8. #8
    Join Date
    Jan 2008
    Posts
    22

    Default

    Quote Originally Posted by DEinspanjer View Post
    Have you tried getting the file to a different location?
    Yes... this solves the problem.

    Previously I used ${Internal.Job.Filename.Directory} variable and have values format "file:///..................". This seems to be the problem.

    After I remove the "file:///" part and used static value instead, it resolve.

    Is there anyway that I can use ${Internal.Job.Filename.Directory} file instead ?

    Regards,

    Thunderbird

  9. #9
    DEinspanjer Guest

    Default

    That sounds like the kinda bug you should definitely log in Jira.
    As a workaround maybe you could use the ${java.io.tmpdir} directory variable as the destination then use a Move Files job entry to move it to the job directory?

  10. #10
    Join Date
    Jan 2008
    Posts
    22

    Default

    Quote Originally Posted by DEinspanjer View Post
    That sounds like the kinda bug you should definitely log in Jira.
    As a workaround maybe you could use the ${java.io.tmpdir} directory variable as the destination then use a Move Files job entry to move it to the job directory?

    Will do that. Thank you very much DEinspanjer !

    Regards,

    Thunderbird

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.