Hello! I tried to connect by WinSCp. I got the following error:
***** Cannot get real path for '.'. General failure (server should provide error description). Error code: 4 Error message from server: Failure Request code: 16 ***** The problem was $HOME setting in SFTP tab of freeSSHd. I set it to c:\ and the problem has disappeared. dgü. On Sat, 1 Jun 2013 08:27:29 -0400, Danisment Gazi Unal <du...@ubtools.com> wrote: > Hello, > > JSch: 0.1.49/0.1.50 > SSH Server: freeSSHd 1.2.4 on Windows > > I got an exception with just "Failure" message. This is stack trace: > > *********************************** > 4: Failure > at > com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2629) > at com.jcraft.jsch.ChannelSftp._realpath(ChannelSftp.java:2160) > at com.jcraft.jsch.ChannelSftp.getHome(ChannelSftp.java:2230) > at com.jcraft.jsch.ChannelSftp.getCwd(ChannelSftp.java:2245) > at > com.jcraft.jsch.ChannelSftp.remoteAbsolutePath(ChannelSftp.java:2700) > > at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:354) > at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:338) > ..... > *********************************** > > This is the code of ChannelSftp._realpath: > ****************************************** > private byte[] _realpath(String path) throws SftpException, IOException, > Exception{ > sendREALPATH(Util.str2byte(path, fEncoding)); > > Header header=new Header(); > header=header(buf, header); > int length=header.length; > int type=header.type; > > fill(buf, length); > > if(type!=SSH_FXP_STATUS && type!=SSH_FXP_NAME){ > throw new SftpException(SSH_FX_FAILURE, ""); > } > int i; > if(type==SSH_FXP_STATUS){ > i=buf.getInt(); > throwStatusError(buf, i); <--- THIS IS LINE 2160 FROM WHICH > EXCEPTION > IS THROWN. > } > i=buf.getInt(); // count > > byte[] str=null; > while(i-->0){ > str=buf.getString(); // absolute path; > if(server_version<=3){ > byte[] lname=buf.getString(); // long filename > } > SftpATTRS attr=SftpATTRS.getATTR(buf); // dummy attribute > } > return str; > } > ****************************************** > > As I understand if type is SSH_FXP_STATUS, this problem occurs. > > What does this probleam mean ? How can I solve it ? > > thanks in advance. ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users