connection closed gracefully_kalilinux中文乱码

connection closed gracefully_kalilinux中文乱码使用FTPClient向linux上传文件出现这个错误org.apache.commons.net.ftp.FTPConnectionClosedException:Connectionclosedwithoutindication. atorg.apache.commons.net.ftp.FTP.__getReply(FTP.java:317) atorg.apache….

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

使用FTPClient向linux上传文件出现这个错误

org.apache.commons.net.ftp.FTPConnectionClosedException: Connection closed without indication.
	at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:317)
	at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294)
	at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:483)
	at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:608)
	at org.apache.commons.net.ftp.FTP.cwd(FTP.java:828)
	at org.apache.commons.net.ftp.FTPClient.changeWorkingDirectory(FTPClient.java:1128)
	at com.taotao.test.FTPTest.testFTP(FTPTest.java:22)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)

最终通过修改服务器上文件的权限得以顺利执行,用此方法存文件需要文件对这个用户开放执行(x)的权限我直接设置的(rwx)

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/180172.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • javaweb中getRealPath()的理解

    javaweb中getRealPath()的理解        getServletContext().getRealPath("/fbb.jpg");动态的得到WebRoot中文件在磁盘中的位置。打印一下发现:文件被全部拷贝了部署的文件夹下,不是我们开发环境中的。写全路径,getServletContext()是继承自父类HttpServlet的父类中的方法!getRealPath();不仅可以获得文件,还可以获得文件夹!不管存不存在,只要逻…

    2022年9月15日
    0
  • 用python3实现粒子群优化算法(PSO)

    用python3实现粒子群优化算法(PSO)粒子群优化算法(ParticleSwarmOptimization,PSO)属于进化算法的一种,是通过模拟鸟群捕食行为设计的。从随机解出发,通过迭代寻找最优解,通过适应度来评价解的品质。设想这样一个场景:一群鸟在随机搜索食物。在这个区域里只有一块食物。所有的鸟都不知道食物在那里。但是他们知道当前的位置离食物还有多远。那么找到食物的最优策略是什么呢。最简单有效的就是搜寻目前离食物最近的鸟的周围区…

    2022年5月24日
    39
  • Docker实践(二):容器的管理(创建、查看、启动、终止、删除)

    Docker实践(二):容器的管理(创建、查看、启动、终止、删除)

    2021年6月7日
    148
  • 写web后端经验总结

    写web后端经验总结1.在写后台程序的时候,主要是增删改,这时候要做好前端发来的数据的校验

    2022年6月21日
    25
  • 大学四年嵌入式学习心得体会

    大学四年嵌入式学习心得体会我所在学校是普通的本科院校,从大一开始加入嵌入式实验室,一直在实验室呆了三年半,从大一的懵懂无知,天天看着C语言书自己敲代码,到后来学习51单片机,STM32,做过3-4个项目,参加各种比赛,轻轻松松搞定毕业设计。在此写的这篇Chat主要是针对大学学习嵌入式的童鞋的,嵌入式不容易学,牵扯的内容,知识点太多,你是否不知道如何下手呢?是否在迷茫为什么我学的这么吃力呢?下面作为过来人的我为您解…

    2022年6月12日
    28
  • java 文件转inputstream_把文本转换成表格

    java 文件转inputstream_把文本转换成表格以下是一些将InputStream转换为FileJava示例手动将InputStream复制到FileOutputStreamApacheCommonsIO–FileUtils.copyInputStreamToFileJava1.7NIOFiles.copy1.FileOutputStream1.1我们必须将数据从InputStream手动复…

    2022年9月21日
    1

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号