Return-Path: X-Original-To: apmail-oodt-dev-archive@www.apache.org Delivered-To: apmail-oodt-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 20383D694 for ; Mon, 6 Aug 2012 15:11:37 +0000 (UTC) Received: (qmail 79734 invoked by uid 500); 6 Aug 2012 15:11:37 -0000 Delivered-To: apmail-oodt-dev-archive@oodt.apache.org Received: (qmail 79539 invoked by uid 500); 6 Aug 2012 15:11:36 -0000 Mailing-List: contact dev-help@oodt.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@oodt.apache.org Delivered-To: mailing list dev@oodt.apache.org Received: (qmail 79523 invoked by uid 99); 6 Aug 2012 15:11:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2012 15:11:36 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [128.149.139.106] (HELO mail.jpl.nasa.gov) (128.149.139.106) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2012 15:11:31 +0000 Received: from mail.jpl.nasa.gov (ap-ehub-sp01.jpl.nasa.gov [128.149.137.148]) by smtp.jpl.nasa.gov (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q76FB7r0017766 (using TLSv1/SSLv3 with cipher AES128-SHA (128 bits) verified NO); Mon, 6 Aug 2012 08:11:08 -0700 Received: from AP-EMBX-SP20.RES.AD.JPL ([169.254.8.6]) by ap-ehub-sp01.RES.AD.JPL ([169.254.3.35]) with mapi id 14.02.0298.004; Mon, 6 Aug 2012 08:11:07 -0700 From: "Mattmann, Chris A (388J)" To: YunHee Kang CC: Brian Foster , "" , "" Subject: Re: The problem occurred when downloading a file by using a protocol "sftp" in pushpull Thread-Topic: The problem occurred when downloading a file by using a protocol "sftp" in pushpull Thread-Index: AQHNc5Q/jqr06EZ2KE61IuAtGhbYmZdM6PcAgABxQAA= Date: Mon, 6 Aug 2012 15:11:07 +0000 Message-ID: <49A9EDF6-D2F9-475B-AEFD-82AB89625E8F@jpl.nasa.gov> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [128.149.137.114] Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Source-Sender: chris.a.mattmann@jpl.nasa.gov X-AUTH: Authorized X-Virus-Checked: Checked by ClamAV on apache.org Hi YunHee, Great job. Can you please file a JIRA issue for this and upload a patch file? Thank you! Cheers, Chris On Aug 6, 2012, at 1:28 AM, YunHee Kang wrote: > Hi Brian, >=20 > I just have fixed the problem I had related with sftp protocol in > pushpull framework. > To fix it, I just added the following statement in the method > connect() in the file JschSftpProtocol.java. > session.setConfig("StrictHostKeyChecking", "no"); >=20 > You can get more details about the above statement in the following: > http://www.mail-archive.com/jsch-users@lists.sourceforge.net/msg00393.htm= l >=20 > Thanks, > Yunhee >=20 >=20 >=20 >=20 > 2012/8/6 YunHee Kang : >> Hi Brian, >>=20 >> I tried to download a file with sftp protocol in pushpull framework >> and got two warnings and a severe error message as follows: >> WARNING: Error occurred while connecting to RemoteSite: alias =3D >> 'SCPTESL2CO2' url =3D 'sftp://agent.bu.ac.kr' username =3D 'yhkang' >> cdTestDir =3D 'null' maxConnections =3D '-1' : Failed to connect to host >> agent.bu.ac.kr : reject HostKey: agent.bu.ac.kr >> Aug 6, 2012 2:13:48 PM >> org.apache.oodt.cas.pushpull.protocol.ProtocolHandler >> getAppropriateProtocolBySite >> WARNING: ProtocolFactory >> org.apache.oodt.cas.protocol.sftp.JschSftpProtocolFactory is not >> compatible with server at sftp://agent.bu.ac.kr >> Aug 6, 2012 2:13:48 PM >> org.apache.oodt.cas.pushpull.retrievalsystem.RetrievalSetup >> retrieveFiles >> SEVERE: Failed to finish downloading per property files >> /home/yhkang/oodt-0.5/cas-pushpull/etc/examples/DirStructXmlParserFiles/= SCPTESL2CO2.xml >> : Failed to get appropriate protocol for RemoteSite: alias =3D >> 'SCPTESL2CO2' url =3D 'sftp://agent.bu.ac.kr' username =3D 'yhkang' >> cdTestDir =3D 'null' maxConnections =3D '-1' >> org.apache.oodt.cas.protocol.exceptions.ProtocolException: Failed to >> get appropriate protocol for RemoteSite: alias =3D 'SCPTESL2CO2' url = =3D >> 'sftp://agent.bu.ac.kr' username =3D 'yhkang' cdTestDir =3D 'null' >> maxConnections =3D '-1' >> at org.apache.oodt.cas.pushpull.protocol.ProtocolHandler.getAppro= priateProtocolBySite(ProtocolHandler.java:166) >> at org.apache.oodt.cas.pushpull.retrievalsystem.FileRetrievalSyst= em.changeToDir(FileRetrievalSystem.java:304) >> at org.apache.oodt.cas.pushpull.retrievalmethod.RemoteCrawler.pro= cessPropFile(RemoteCrawler.java:104) >> at org.apache.oodt.cas.pushpull.retrievalsystem.RetrievalSetup.re= trieveFiles(RetrievalSetup.java:109) >> at org.apache.oodt.cas.pushpull.daemon.Daemon$1.run(Daemon.java:2= 18) >> at java.lang.Thread.run(Thread.java:662) >> Aug 6, 2012 2:13:48 PM org.apache.oodt.cas.pushpull.daemon.Daemon$1 run >> INFO: Daemon with ID =3D 90121 on RMI registry port 9012 is shutting dow= n >>=20 >> I think the warning message is related with an exception occurred in >> the method connect() of JschSftpClient.java: >> protected void connect(String host, final String username, >> final String password) throws ProtocolException { >> try { >> System.out.println(System.getProperty("user.home") + "/.ssh/known_h= osts"); >> jsch.setKnownHosts(System.getProperty("user.home") + "/.ssh/known_h= osts"); >> session =3D jsch.getSession(username, this.getRemoteSite().getURL() >> .getHost(), 22); >> session.setPassword(password); >> session.connect(); >> sftpChannel =3D (ChannelSftp) session.openChannel("sftp"); >> sftpChannel.connect(); >> } catch (Exception e) { >> throw new ProtocolException("Failed to connect to host " + host + "= : " >> + e.getMessage()); >> } >> } >>=20 >> I make sure that there is no problem when downloading a file by scp >> command without any password as follows: >> scp yhkang@agent.bu.ac.kr://home/yhkang/oodt-0.5/TL2CO2N.005/2004.09.20/= TES-Aura_L2-CO2-Nadir_r0000002147_F06_09.he5 >> . >> TES-Aura_L2-CO2-Nadir_r0000002147_F06_09.he5 100% 88MB 87.9MB/s 00= :01 >>=20 >> Let me know how to fix the problem. >>=20 >> Thanks, >> Yunhee ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Chris Mattmann, Ph.D. Senior Computer Scientist NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA Office: 171-266B, Mailstop: 171-246 Email: chris.a.mattmann@nasa.gov WWW: http://sunset.usc.edu/~mattmann/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Adjunct Assistant Professor, Computer Science Department University of Southern California, Los Angeles, CA 90089 USA ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++