FTP-Deploy-Action icon indicating copy to clipboard operation
FTP-Deploy-Action copied to clipboard

Similar issue as in #137: "Server sent FIN packet unexpectedly"

Open freakyshine opened this issue 3 years ago β€’ 16 comments

Bug Description Just like in #137 I'm not able to deploy to the FTP server however, I'm confident my hosting provider provides FTP (port 21) and an SFTP(port 5544). When attempting to connect I use the default port number 21 and therefore, as far as I understand connect over the normal FTP protocol. When using Filezilla with the credentials stored in the secrets it works as it should, but not with the action.

My Action Config

on:
  push:
    branches:
      - main
name: πŸš€ Deploy to production
jobs:
  web-deploy:
    name: πŸŽ‰ Prod Deployment
    runs-on: ubuntu-latest
    steps:
    - name: 🚚 Get latest code
      uses: actions/checkout@v2
    
    - name: πŸ“‚ Sync files
      uses: SamKirkland/[email protected]
      with:
        server: ${{ secrets.ftp_server }}
        username: ${{ secrets.ftp_user_prod }}
        password: ${{ secrets.ftp_password_prod }}

My Action Log

   Run SamKirkland/[email protected]
  with:
    server: ***
    username: ***
    password: ***
    log-level: verbose
----------------------------------------------------------------
πŸš€ Thanks for using ftp-deploy. Let's deploy some stuff!   
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a ⭐ on Github --> https://github.com/SamKirkland/FTP-Deploy-Action
or add a badge 🏷️ to your projects readme --> https://github.com/SamKirkland/FTP-Deploy-Action#badge
Creating local state at ./.ftp-deploy-sync-state.json
Local state created
Connected to 116.202.46.46:21 (No encryption)

----------------------------------------------------------------
---------------  πŸ”₯πŸ”₯πŸ”₯ A error occurred  πŸ”₯πŸ”₯πŸ”₯  --------------
----------------------------------------------------------------

----------------------------------------------------------------
----------------------  Full Error below  ----------------------
Error: Server sent FIN packet unexpectedly, closing connection.
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.0.0/dist/index.js:3602:56)
    at Socket.emit (events.js:215:7)
    at endReadableNT (_stream_readable.js:1184:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)
Error: Error: Server sent FIN packet unexpectedly, closing connection.

freakyshine avatar Jun 08 '21 20:06 freakyshine

I also have the same problem if I use SFTP. Moreover, 1&1 by Ionos does not offer FTP and FTPS anymore, but only SFTP. GitHub Actions are bad and unusable. I hope the author (@SamKirkland) will succeed in seducing us with new features.

Edit πŸ‘ Otherwise, with version 3.3.1 everything works fine! I can't wait for version 4 to be operational!

on: push name: πŸš€ DΓ©ployer le site web en push jobs: web-deploy: name: πŸŽ‰ DΓ©ployer runs-on: ubuntu-latest steps: - name: 🚚 Obtenir le code le plus rΓ©cent uses: actions/checkout@v2 with: lfs: true fetch-depth : 100

- name: πŸ“‚ Synchronisation des fichiers
  uses: SamKirkland/[email protected]
  with:
    ftp-server: sftp://${{ secrets.FTP_HOST }}
    ftp-username: ${{ secrets.FTP_USERNAME }}
    ftp-password: ${{ secrets.FTP_PASSWORD }}
    git-ftp-args: --insecure

- name: πŸ“½ Commande SSH de 1&1 by Ionos
  uses: garygrossgarten/github-action-ssh@release
  with:
    host: ${{ secrets.FTP_HOST }}
    username: ${{ secrets.FTP_USERNAME }}
    password: ${{ secrets.FTP_PASSWORD }}
    command: |
      curl -sS https://getcomposer.org/installer | /usr/bin/php7.4 -cli
      /usr/bin/php7.4 -cli composer.phar update

bryxfr avatar Jun 12 '21 20:06 bryxfr

fetch-depth : 100

What is 'fetch-depth'?

freakyshine avatar Jun 15 '21 11:06 freakyshine

@freakyshine > No idea, I tested with it works.

bryxfr avatar Jun 15 '21 20:06 bryxfr

Fair

freakyshine avatar Jun 18 '21 12:06 freakyshine

Thanks a lot @lecomteb27!

I had the same issue. I switched to version 3.1.1, and it works now.

I just figured out that the option --dry-run is not working in version 3.1.1 (especially in combination with the option --insecure). I added dry-run for testing purpose in the first place, when I removed that option, it works for me.

Henry31 avatar Jun 20 '21 10:06 Henry31

With pleasure, @Henry31 :)

Now we must wait for the developer to fix the malfunction in V4. I keep my fingers crossed :)

bryxfr avatar Jun 21 '21 07:06 bryxfr

Error: Server sent FIN packet unexpectedly, closing connection.

Tried 3 times. More than 2000 files got uploaded succesfully but then this error occurs.

This is not a hosting problem as I am deplying to my own root server with ProFTPD

1manfactory avatar Mar 27 '23 16:03 1manfactory

@1manfactory Hi, i have same issue.

FTPError: 421 No transfer timeout (300 seconds): closing control connection
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.3/dist/index.js:5254:39)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.3/dist/index.js:5095:44)
    at Socket.emit (node:events:527:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:285:11)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at TCP.onStreamRead (node:internal/stream_base_commons:190:23) {
  code: 421
}

----------------------------------------------------------------
--------------  πŸ”₯πŸ”₯πŸ”₯ an error occurred  πŸ”₯πŸ”₯πŸ”₯  --------------
----------------------------------------------------------------

----------------------------------------------------------------
----------------------  full error below  ----------------------
----------------------------------------------------------------

Error: Server sent FIN packet unexpectedly, closing connection.
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.3/dist/index.js:5097:56)
    at Socket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Error: Error: Server sent FIN packet unexpectedly, closing connection.

when i deployed ~200files, it worked fine. but when i deployed thousands files, i had same issue. do you have an idea?

hkhieudev avatar May 29 '23 06:05 hkhieudev

Hello,

same here

Error: Server sent FIN packet unexpectedly, closing connection.
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3788:56)
    at Socket.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
Error: Error: Server sent FIN packet unexpectedly, closing connection.

gonna try with v4.3.4 and a bigger timeout

simon387 avatar Jul 14 '23 19:07 simon387

I've faced with the same error. Version 4.3.4 fails with error "Server sent FIN packet unexpectedly". Downgraded it to 3.1.2 and it works as expected.

AlexKrupko avatar Sep 26 '23 18:09 AlexKrupko

Error: Server sent FIN packet unexpectedly, closing connection. at TLSSocket. (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.4/dist/index.js:5098:56) at TLSSocket.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Error: Error: Server sent FIN packet unexpectedly, closing connection.

facing same error

Sharifur avatar Oct 21 '23 17:10 Sharifur

Downgraded to SamKirkland/[email protected]

solved my problem

Sharifur avatar Oct 21 '23 18:10 Sharifur


Error: Server sent FIN packet unexpectedly, closing connection. at TLSSocket. (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.1.0/dist/index.js:3788:56) at TLSSocket.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21) Error: Error: Server sent FIN packet unexpectedly, closing connection.

kashif-pris avatar Feb 28 '24 06:02 kashif-pris

I was having the same issue and in my case, I had to disable the access filter from overseas in the host configuration screen since it blocks accesses from github.

tabarnouche avatar Mar 02 '24 23:03 tabarnouche

hello people i fixed this issue by doing this , uses: SamKirkland/[email protected] with: server: "Server Host" username: "FTP UserName" password: "FTP password" protocol: ftps

markoeltiger avatar Mar 16 '24 02:03 markoeltiger