Java Spring集成-FTP出站网关LS在*unix上始终为空
我为ls、get、rm配置了一个简单的ftp出站网关Java Spring集成-FTP出站网关LS在*unix上始终为空,java,spring,spring-integration,Java,Spring,Spring Integration,我为ls、get、rm配置了一个简单的ftp出站网关 <int-ftp:outbound-gateway id="gatewayLS" cache-sessions="false" session-factory="incomingCachingSessionFactory" request-channel="inboundChannel" command="ls" command-options="-1" expressi
<int-ftp:outbound-gateway id="gatewayLS"
cache-sessions="false"
session-factory="incomingCachingSessionFactory"
request-channel="inboundChannel"
command="ls"
command-options="-1"
expression="'${ftp.pull.remote.directory}'"
reply-channel="toSplitter" />
<channel id="toSplitter">
<interceptors>
<wire-tap channel="logger" />
</interceptors>
</channel>
<logging-channel-adapter id="logger"
log-full-message="true" level="DEBUG" />
<splitter id="splitter" input-channel="toSplitter"
output-channel="toGet" />
<int-ftp:outbound-gateway id="gatewayGET"
cache-sessions="false"
local-directory="${ftp.pull.local.directory}"
session-factory="incomingCachingSessionFactory"
request-channel="toGet"
reply-channel="downloadedFileChannel"
command="get"
command-options="-P"
expression="headers['file_remoteDirectory'] + '/' + payload" />
“连接到服务器”和“发送回复消息”之间的时间也几乎是瞬间的
但是,一旦部署到2x Centos服务器(5.8和6.2),LS的回复通道始终为emtpy
e、 g
“连接到服务器”和“发送回复消息”之间的时间也异常长
更多信息:
- 所有3台机器都使用maven从相同的代码库构建WAR
- centos 2机器位于不同的数据中心
- 我尝试了多个不同的无关FTP服务器,结果相同
- ftp服务器上肯定有文件
- ftp服务器可在centos机箱上访问,使用“ncftp”和“ftp”确认
DefaultFtpSessionFactory上设置
我必须在我的DefaultFtpSessionFactory上设置
DEBUG: org.springframework.integration.ftp.session.DefaultFtpSessionFactory - Connected to server [ftp.domain.com:21]
DEBUG: org.springframework.integration.ftp.gateway.FtpOutboundGateway - handler 'org.springframework.integration.ftp.gateway.FtpOutboundGateway#0' sending reply Message: [Payload=[test_file.zip]][Headers={timestamp=1343143242030, id=56758ef9-57e5-43d6-b8b7-c36539d9fd0d, file_remoteDirectory=/images/}]
DEBUG: org.springframework.integration.ftp.session.DefaultFtpSessionFactory - Connected to server [ftp.domain.com:21]
DEBUG: org.springframework.integration.ftp.gateway.FtpOutboundGateway - handler 'org.springframework.integration.ftp.gateway.FtpOutboundGateway#0' sending reply Message: [Payload=[]][Headers={timestamp=1343143961046, id=31759d6f-201e-4028-8943-0a68ae64db81, file_remoteDirectory=/images/}]