2

We are trying to deploy file to remote server using CopyFilesOverSSH service Copy Files Over SSH task in Azure DevOps through build pipeline but getting error which is "##[error]Unhandled: handle is not a Buffer" see below image (Error). Even though File has been uploaded on remote server with Zero bytes. So we don't know why getting this error is there any permission issue on agent-job?

We would appreciate your help.

Error: enter image description here

hirenpatel
  • 47
  • 1
  • 7

2 Answers2

1

Received the same error message from a consistently smooth running pipeline as well. Turned out to be a disk space issue for us.

adam
  • 307
  • 3
  • 10
0

Please check if the folder is created on the target machine and what permissions it has. The issue may be related to folder permissions. Check the similar issue below:

https://github.com/Microsoft/azure-pipelines-tasks/issues/3190

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • We have already referred this [link](https://github.com/Microsoft/azure-pipelines-tasks/issues/3190) and given full permission but getting same error. One more things this SSH(sftp) working fine with FileZilla Client tool. – hirenpatel Jun 16 '20 at 06:53
  • Do you use Microsoft-hosted build agent or Self-hosted build agent? What OS the build agent is running on? What OS is your remote machine? – Cece Dong - MSFT Jun 16 '20 at 09:34
  • We are using Microsoft-hosted build agent. OS the build agent is windows-latest. About remote machine, they are used custom java-based SSH server so does it work with Azure DevOps or "Copy Files Over SSH task" ? – hirenpatel Jun 17 '20 at 04:34
  • This [documentation](https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/copy-files-over-ssh?view=azure-devops#is-this-task-supported-for-target-machines-running-operating-systems-other-than-linux) indicates "Copy Files Over SSH task" is intended for target machines running Linux. Is the custom java-based SSH server running Linux? You may deploy a self-hosted agent to see whether you can copy files. – Cece Dong - MSFT Jun 17 '20 at 07:43
  • This custom java-based SSH server running on Linux. It's working fine with these tools WinSCP, FileZilla Client. – hirenpatel Jun 17 '20 at 09:57
  • I'm afraid Microsoft-hosted build agent can not be able to access your remote machine. You may deploy a self-hosted agent which can access your remote your machine to see whether you can copy files. – Cece Dong - MSFT Jun 18 '20 at 10:25