【发布时间】:2013-12-12 05:57:10
【问题描述】:
使用 Mule 3.2.1,我们遇到了一个奇怪的问题,我们使用 SFTP 组件从服务器获取 pgp 加密报告文件。我们使用 SFTP 组件归档文件,然后使用 file:endpoint 生成工作副本以供进一步处理。
我们的问题是,文件的工作副本每隔一段时间就会损坏,但 SFTP 归档文件是好的。在十六进制编辑器中查看损坏的文件时,我们会看到好字节,然后突然间,我们看到文件其余部分的空字节。 Mule 复制时,基础文件似乎已被删除。
另一个令人困惑的信息是,我们尝试再次下载失败的文件,并且一切正常。这使我相信问题不是文件中的某些内容,但显然我们确实有一个文件似乎始终失败。所有这些事情都发生在生产服务器上,其中包含我无权访问的文件。
在不了解 Mule 的内部工作原理的情况下,我不知道什么条件会导致此问题。
有没有足够熟悉 Mule 内部运作的聪明人来冒险猜测一下?
另外,我们不是 Mule 专家,欢迎对我们的 Mule 配置提出任何批评。 (顺便说一句,下面的配置是生产中的修改版本和更频繁的轮询等)
<sftp:connector name="SftpConnector" validateConnections="true" autoDelete="true">
<file:expression-filename-parser />
</sftp:connector>
<file:connector name="FileConnector" pollingFrequency="1000" fileAge="1000" streaming="false"
autoDelete="false">
<service-overrides messageFactory="org.mule.transport.file.FileMuleMessageFactory" />
<file:expression-filename-parser />
</file:connector>
<sftp:endpoint name="SftpEndpoint" connector-ref="SftpConnector" host="localhost"
port="22" user="tdr" password="password" path="/opt/tdr/outbound" archiveDir="/home/cps/mule/sftp-archive"
responseTimeout="30000" sizeCheckWaitTime="2500" disableTransportTransformer="true">
<file:filename-wildcard-filter pattern="*.pgp,*.gpg" />
</sftp:endpoint>
<file:endpoint name="FileEndpoint" connector-ref="FileConnector" path="/home/cps/mule/input" />
<flow name="DfrFileGrabber">
<quartz:inbound-endpoint jobName="ptDfrGrabber" cronExpression="0/2 * * * * ?">
<quartz:endpoint-polling-job>
<quartz:job-endpoint ref="SftpEndpoint" />
</quartz:endpoint-polling-job>
</quartz:inbound-endpoint>
<file:outbound-endpoint ref="FileEndpoint" outputPattern="#[header:originalFilename]" />
</flow>
【问题讨论】:
标签: mule