“格式不正确” FTP 后 XML 文件中出现错误

发布于 2024-08-15 04:18:20 字数 651 浏览 2 评论 0原文

使用 WS_FTP Professional,我有一个每晚运行的备份过程。

WS_FTP 基本上通过 Windows 调度程序设置 FTP 到远程服务器的过程。 具体来说,它将一个大约 2.5 兆的 XML 文件发送到服务器以供下载。

我在 FTP 之前检查 XML 文件的格式是否正确,而且始终如此。我遇到的问题是,通过我的备份过程将 get 上传到服务器后,xml 文件变得格式不正确。如果我下载文件并检查发生错误的行号,通常要么只是随机数字/字母、损坏的标签或“NULL”符号。

我检查过 WS_FTP 在发送文件之前没有压缩或加密文件,并且它以 ASCII 模式发送文件。

它发生了,看似随机。有时上传工作正常,有时会出现错误。

如果我上传同一个文件 10 次,那么其中大约 8 次该文件将出现错误,并且它们总是出现在同一行上 (6481)。文件每天都会更新,所以明天如果我上传文件,我会收到相同数量的错误,但它可能位于不同的行上,几乎就像错误发生在一定数量的字符之后(如果这使得任何错误)感觉)。

如果有人能理解这一点,我将不胜感激。这让我抓狂。

更新

我刚刚运行了几个测试,看起来它实际上发生在同一个字节上。

更新 2

问题出在 WS_FTP 上。不太确定它是什么,但我尝试了另一个 FTP 客户端,它可以工作。

Using WS_FTP Professional, I have a backup process that runs every night.

WS_FTP basically sets up the process to FTP to a remote server through windows scheduler.
Specifically, It sends an XML file that is approximately 2.5 megs to a server for download.

I check that the XML file is well-formed before the FTP and it always is. The problem I am having is that after is get's uploaded to the server through my backup process, the xml file becomes not well-formed. If I download the file and check the line number where the error/s occur there is usually either just random numbers/letters, a broken tag, or a "NULL" symbol.

I've checked that WS_FTP isn't compressing or encrypting the file before sending it, and it's sending the file in ASCII mode.

It happens, seemingly random. Sometimes the upload works fine, other times the errors occur.

If I upload the same file 10 times then about 8 of those times the file will have the errors and they will always occur on the same line (6481). The file get's updated daily, so tomorrow if I upload the file, I'll get the same number of errors but it may be on a different line, almost as if the error is occurring after a set number of characters (if that makes any sense).

If anybody can make sense of this I'd greatly appreciate it. It's driving me nuts.

UPDATE

I just ran a couple of tests and it looks like it is in fact happening on the same byte.

UPDATE 2

The problem was with WS_FTP. Not exactly sure what it was but I tried a different FTP client it worked.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

倚栏听风 2024-08-22 04:18:20

尝试使用二进制传输模式自动如果其中有一些UTF8并且ASCII传输有时会搞砸。

祝你好运。

Try using Binary transfer mode or automatic If there's some UTF8 in there and ASCII transfer screws it up sometimes.

good luck.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文