FTP response 421 received. Server closed connection
现象:
在springboot的定时器轮询去下载ftp文件时,报以下错误:
org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421 received. Server closed connection.
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:367)
at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:294)
at org.apache.commons.net.ftp.FTP._connectAction_(FTP.java:400)
at org.apache.commons.net.ftp.FTPClient._connectAction_(FTPClient.java:924)
原因分析:
1.Connection closed without indication.//FTP服务器服务有故障,或是是网络问题。
2. FTP response 421 received. Server closed connection.//错误原因就是FTP服务器端连接数满了
故得知是因为原因2造成ftp的连接数满了,又查看vsftp.log得到:too many sessions for this address
证实了就是连接数满造成。
解决方案:
将FTPClient.connect();
改成:
if(!FTPClient.isConnected()){
FTPClient.connect();
}
故此解决。希望能帮到大家。
FTP response 421 received. Server closed connection的更多相关文章
- nginx error: upstream prematurely closed connection while reading response header from upstream
本篇文章由:http://xinpure.com/nginx-error-upstream-prematurely-closed-connection-while-reading-response-h ...
- FTPClient TLS 与 FTP 进行数据传输异常:Remote host closed connection during handshake
环境:java JDK 1.8.org.apache.commons-net-3.6.jar.端口已放开 FTPClient ftpClient = new FTPClient(protocol, f ...
- 解决flask的502错误:upstream prematurely closed connection while reading response header from upstream
我在使用 tiangolo/uwsgi-nginx-flask 部署flask应用的时候,经常运行一会儿就出现502错误,重新启动容器后,就恢复. 且经常会出现数据更新后,刷新结果不一致. docke ...
- The message port closed before a response was received.
问题描述:Chrome控制台报错:Unchecked runtime.lastError: The message port closed before a response was received ...
- Chrome 控制台报错Unchecked runtime.lastError: The message port closed before a response was received
Chrome浏览器控制台报错提示 Unchecked runtime.lastError: The message port closed before a response was received ...
- upstream prematurely closed connection while reading response header from upstream
upstream prematurely closed connection while reading response header from upstream nginx配置uwsgi的时候 ...
- Nginx" upstream prematurely closed connection while reading response header from upstream"问题排查
问题背景 我们这边是一个基于Nginx的API网关(以下标记为A),最近两天有调用方反馈,偶尔会出现502错误,我们从Nginx的error日志里看,就会发现有" upstream prem ...
- RemoteDisconnected: Remote end closed connection without response
- SharePoint Error - An unrecognized HTTP response was received when attempting to crawl this item
SharePoint 2013爬网报错 An unrecognized HTTP response was received when attempting to crawl this item. V ...
随机推荐
- java SE 入门之控制语句&方法&递归算法(第五篇)
一 控制语句(选择结构) 在学习控制语句之前,我们要先明确两件事情,什么是顺序结构(也叫做顺序执行),什么是选择结构 (分支结构或分支执行或选择执行),我们的代码执行是分为先后顺序的,就像我们之前写的 ...
- Ubuntu使用心得
因为开发学习需要,也接触了一些Ubuntu系统,玩崩了两次系统之后,也学到了一些东西. -------------------------------------------------------- ...
- POJ1426(KB1-E 暴力搜索)
Find The Multiple Description Given a positive integer n, write a program to find out a nonzero mu ...
- C语言程序设计基础知识点概括
C语言程序设计基础知识点概括 C语言程序设计基础知识点1.函数是C语言的基本构成单位.main函数是C语言程序的唯一入口.2.C语言程序开发过程. 编译过程:将以.c或.cpp结尾的源程序文件经过编译 ...
- html打造动画【系列3】- 小猫笑脸动画
猫咪容器 咱们每次画一个图片,肯定先要确定一个容器,几确定一下图形的位置和大小. <div class="mao_box"> <div class="m ...
- AI在网管中的运用
- Andoid多语言国际化策略
目前手上的项目,为了普及覆盖更多的用户群,也已经开始实现了多语言设置这样的功能,不过今天我要说的不是微信,而是我们自己项目中的实现策略. 直接附上关键代码: package com.huolonglu ...
- canvas验证码 - 滑块拼图
滑块拼图型的验证方式已经流行起来,多数的实现方式是直接加载两张分割好的图片.现在用canvas去自动修剪图片,节省修图工作量和http请求: 加载一张整图,用canvas切割缺口,缺口位置在固定范围内 ...
- redis介绍(2)简单安装
我分两种方式讲解 window 下载地址:https://github.com/MSOpenTech/redis/releases. Redis 支持 32 位和 64 位.这个需要根据你系统平台的实 ...
- UBUNTU16.04 连接不了cn.archive.ubuntu.com
ubuntu系统更换源 更换源的方法非常简单:修改/etc/apt/sources.list文件即可 进入目录 /etc/apt cd /etc/apt修改sources.list文件 sudo vi ...