SamKirkland / FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions
MIT License
3.58k stars 362 forks source link

Ftps protocol is closing on deployment #260

Open vedatunlu opened 2 years ago

vedatunlu commented 2 years ago

Bug Description

Hi, When I was trying to deploy my project to server, I kept getting this error all the time. The problem have stopped when I turned protocol to ftp. Here is my config and logs.

My Action Config

on:
  push:
    branches:
      - development
      - stage
name: 🚀 Deploy website on push
jobs:
  web-deploy:
    name: 🎉 Deploy
    runs-on: ubuntu-latest
    steps:
      - name: 🚚 Get latest code
        uses: actions/checkout@v2

      - name: 📂 Sync files
        uses: SamKirkland/FTP-Deploy-Action@4.2.0
        with:
          server: ${{ secrets.ftp_server }}
          username: ${{ secrets.ftp_username }}
          password: ${{ secrets.ftp_password }}
          server-dir: ${{ secrets.ftp_stage_dir }}
          protocol: ftps
          log-level: verbose
          exclude: | 
            .git/**
            .git**
            .git*/**
            **/.git*
            **/.git*/**
            ./vendor
            ./node_modules
            storage/app/public/**
            public/storage/**
            .env
            .well-known
            cgi-bin
            public/error_log
            public/yandex**

My Action Log

   # ----------------------------------------------------------------
--------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
----------------------------------------------------------------

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

FTPError: 425 Unable to build data connection: Operation not permitted
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4744:39)
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4585:44)
    at TLSSocket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:286:13)
    at TLSSocket.Readable.push (_stream_readable.js:224:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23) {
  name: 'FTPError',
  code: 425
}
Error: FTPError: 425 Unable to build data connection: Operation not permitted
   # you may want enable verbose logging with   log-level: verbose
jeffcGit commented 2 years ago

Remove this line might help server-dir: ${{ secrets.ftp_stage_dir }}

emeth- commented 2 years ago

Ditto - same error, FTPS, occurs after uploading around 80% of my files. Curiously, it reliably occurs at the same spot everytime, and if I delete some files the location it fails at shifts (again staying around 80%, and still failing everytime at that same new spot).


uploading "example.php"
400 level error from server when performing action - retrying...
FTPError: 425 Unable to build data connection: Operation not permitted
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4744:39)
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4585:44)
    at TLSSocket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:286:13)
    at TLSSocket.Readable.push (_stream_readable.js:224:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23) {
  name: 'FTPError',
  code: 425
}

----------------------------------------------------------------
--------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
----------------------------------------------------------------

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

FTPError: 425 Unable to build data connection: Operation not permitted
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4744:39)
    at TLSSocket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.2.0/dist/index.js:4585:44)
    at TLSSocket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:286:13)
    at TLSSocket.Readable.push (_stream_readable.js:224:10)
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:182:23) {
  name: 'FTPError',
  code: 425
}
Error: FTPError: 425 Unable to build data connection: Operation not permitted
sajath-45 commented 1 week ago

any fix for this?

gregorsart commented 2 days ago

I used the latest versions:

uses: actions/checkout@v4 uses: SamKirkland/FTP-Deploy-Action@v4.3.5

Now I get at least a different error. By the way, if you update the vesion, do not fotget the v in front of 4.3.5


PS: After about 5 not successful deployments via github actions, I am back at this error. : /