发行管道中的FTP上传失败,并显示FTPError:500语法错误,命令无法识别

时间:2020-02-17 14:53:32

标签: azure azure-devops ftp

我已经在Azure Devops中创建了一个发布管道,该发布管道首先存档了两个文件,然后尝试将这些zip文件上传到FTP服务器。

归档工作正常,但是上传任务始终失败。我收到以下控制台输出:

2020-02-13T10:28:03.9716469Z ##[section]Starting: FTP Upload: $(Build.ArtifactStagingDirectory)
2020-02-13T10:28:03.9792841Z ==============================================================================
2020-02-13T10:28:03.9792892Z Task         : FTP upload
2020-02-13T10:28:03.9792921Z Description  : Upload files using FTP
2020-02-13T10:28:03.9792964Z Version      : 2.157.0
2020-02-13T10:28:03.9792992Z Author       : Microsoft Corporation
2020-02-13T10:28:03.9793020Z Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/ftp-upload
2020-02-13T10:28:03.9793049Z ==============================================================================
2020-02-13T10:28:04.9536900Z connecting to: mydomain.com:21
2020-02-13T10:28:05.1325089Z ##[error]FTPError: 500 Syntax error, command unrecognized.
2020-02-13T10:28:05.1333616Z ##[error]Ftp Upload failed
2020-02-13T10:28:31.5036758Z ##[error]The operation was canceled.
2020-02-13T10:28:31.5040435Z ##[section]Finishing: FTP Upload: $(Build.ArtifactStagingDirectory)

这是我的YAML:

steps:
- task: FtpUpload@2
  displayName: 'FTP Upload: $(Build.ArtifactStagingDirectory)'
  inputs:
    credentialsOption: inputs
    serverUrl: 'ftp://mydomain.com'
    username: usr
    password: pwd
    rootDirectory: '$(Build.ArtifactStagingDirectory)'
    remoteDirectory: '/files/upload-Test/'
    trustSSL: true

我也尝试连接到其他SFTP服务器,但是收到了类似的结果:FTPError: 550 SSL/TLS required on the control channel

您对我可以做些什么建议以使这项工作成功吗?

编辑:现在具有调试输出:

expanding braces
pattern: 'D:/a/r1/a/$(Build.ArtifactStagingDirectory)/**'
applying include pattern against original list
1 matches
1 final results
Found total matches: 1
adding file:   D:\a\r1\a\$(Build.ArtifactStagingDirectory)\FILENAME.zip
connecting to: domain.com:21
Connected to MY-IP
< 220 Speak friend, and enter
Login security: No encryption
> USER usr
< 331 FTP login okay, send password.
> PASS ###
< 230 User logged in, proceed.
> TYPE I
< 200 Using BINARY mode to transfer data.
> STRU F
< 500 Syntax error, command unrecognized.
FTPError: 500 Syntax error, command unrecognized.
Processed: ##vso[task.issue type=error;]FTPError: 500 Syntax error, command unrecognized.
task result: Failed
Ftp Upload failed
Processed: ##vso[task.issue type=error;]Ftp Upload failed
Processed: ##vso[task.complete result=Failed;]Ftp Upload failed

1 个答案:

答案 0 :(得分:0)

对于此问题,最近发生了Azure DevOps可用性下降的事件,这可能是此错误的原因。

AT的短缺导致AT上的CPU过多,从而导致板,存储库,管道和测试计划中的命令缓慢且失败。

enter image description here

如果您想了解更多详细信息,请参阅此report。此问题现已完全缓解。

相关问题