通过JSch的SFTP引发错误4:失败 [英] SFTP via JSch is throwing error 4: Failure

查看:1064
本文介绍了通过JSch的SFTP引发错误4:失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在尝试将文件从Windows SFTP传输到Unix服务器时,我遇到一个特殊的问题.错误堆栈跟踪"为-

I am facing a peculiar issue while trying to SFTP a file from Windows to Unix server. The error "stack trace" is -

4: Failure
    at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2846)
    at com.jcraft.jsch.ChannelSftp.checkStatus(ChannelSftp.java:2459)
    at com.jcraft.jsch.ChannelSftp._sendCLOSE(ChannelSftp.java:2465)
    at com.jcraft.jsch.ChannelSftp._put(ChannelSftp.java:683)
    at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:475)
    at com.jcraft.jsch.ChannelSftp.put(ChannelSftp.java:365)

我在其他论坛上进行了很多搜索,但无法找到根本原因.我还观察到另一件事-我尝试使用SFTP的文件名是* .xml,当我将其更改为* .XML时,SFTP是成功的".很奇怪,无法确定问题所在.我正在尝试使用JSch Java API.但是在尝试WinSCP前端时,我也遇到了同样的问题.

I have searched a lot on other forums but could not get to the root cause. I have observed one more thing - the file name, I am trying to SFTP, is *.xml when I change it to *.XML the SFTP is "successful". Very weird could not identify the issue. I am trying this using JSch Java API. But I have seen the same issue while trying the WinSCP front end.

推荐答案

它是 OpenSSH常见的SFTP服务器出于多种原因返回代码4(失败),但未提供任何详细信息.

您必须查看 SFTP服务器日志来查找更多信息.

You would have to check SFTP server log to find more.

尽管最常见的原因是缺少可用磁盘或用户配额空间-通常可以通过创建大小为零的文件来识别.

Though the most usual cause is a lack of free disk or user quota space – Which can usually be identified by the file being created with zero size.

这篇关于通过JSch的SFTP引发错误4:失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆