Github actions lftp upload fails

47 views Asked by At

I'm attempting to upload two files to a vsftp server using lftp within a github action. One is a txt file of +-70 bytes. The other is a dll of +-20mb. The txt file succeeds to upload but the dll fails on a 426 Failure reading network stream. error. When doing these operations by hand (in powershell on the build node itself) the upload succeeds, but when running in Github actions it fails.

The (simplified) pipeline code:

#stuff for the trigger
jobs:
  Build-release:
    runs-on: [self-hosted, clr] #this is a windows server 2019 with lftp installed
    steps:
      #some steps for compiling and testing
      - name: Upload artifacts
        run: |
          lftp -d -c "set ssl:verify-certificate false; open -u ${{ vars.FTP_USER }},${{ secrets.FTP_PASS }} ${{ vars.FTP_URL }}; put -O plugins/ Plates-components.txt"
          lftp -d -c "set net:socket-maxseg 500; set ssl:verify-certificate false; open -u ${{ vars.FTP_USER }},${{ secrets.FTP_PASS }} ${{ vars.FTP_URL }}; put -O plugins/ Plates-components.dll"
        working-directory: ${{ github.workspace }}\src\Plates-components\bin\Release\netstandard2.0

a sample of the log from a failing build

Run lftp -d -c "set net:socket-maxseg 500; set ssl:verify-certificate false; open -u mc,*** ftps://hiddenurl:21; put -O plugins/ Plates-components.dll"
---- Resolving host address...
---- IPv6 is not supported or configured
---- 1 address found: 10.100.10.91
---- Connecting to hiddenurl (10.100.10.91) port 21
[hidden certificate]
Certificate verification: subjectAltName: ‘hiddenurl’ matched
<--- 220 MC plugins
---> FEAT
<--- 211-Features:
<---  AUTH SSL
<---  EPRT
<---  EPSV
<---  MDTM
<---  PASV
<---  PBSZ
<---  PROT
<---  REST STREAM
<---  SIZE
<---  TVFS
<--- 211 End
---> USER mc
<--- 331 Please specify the password.
---> PASS ***
<--- 230 Login successful.
---> PWD
<--- 257 "/" is the current directory
---> PBSZ 0
<--- 200 PBSZ set to 0.
---> PROT P
<--- 200 PROT now Private.
---> TYPE I
<--- 200 Switching to Binary mode.
---> PASV
<--- 227 Entering Passive Mode (10,100,10,91,82,13).
---- Connecting data socket to (10.100.10.91) port 21005
---- Data connection established
---> STOR plugins/Plates-components.dll
<--- 150 Ok to send data.
Certificate verification: subjectAltName: ‘hiddenurl’ matched
---- Closing data socket
<--- 426 Failure reading network stream.
---> QUIT
<--- 221 Goodbye.
---- Closing control socket

the client will just continue to loop this until a timeout or manual cancellation of the build

Things I tried to debug already:

  • Use Filezilla on my laptop to test if the vsftp server is working and I can upload large (1gb+) files: yes
  • Use lftp on my laptop to test if I can upload the same large file with the specific client: yes
  • Run the upload commands on the buildserver by hand to see if it works then: Yes I can upload the exact dll that is failing in the action.
  • Set net:socket-maxseg to some low number: did not help
  • Set strict_ssl_read_eof=NO on the vsftpd server: did not help

I don't know where the difference can be. It works when doing it manually, it fails when running as an action. Any suggestions would be appreciated

0

There are 0 answers