Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FTP Upload Fails Every Time #442

Open
mazureth opened this issue Feb 29, 2024 · 10 comments
Open

FTP Upload Fails Every Time #442

mazureth opened this issue Feb 29, 2024 · 10 comments

Comments

@mazureth
Copy link

Bug Description
Every time I run the upload it fails in the same place with a connection refused error. The odd part is that it is able to create all the folders and upload 1 file before it fails. So I know the connection works at first. The same file fails every time, a font file. I'm not sure if I am hitting some limit or running into an unsupported filetype? I am able to manually FTP the project from my local machine using the same host and credentials with FileZilla. Any help would be greatly appreciated.

Also I noticed a typo:
"No file exists on the server "/debook-app/.ftp-deploy-sync-state.json" - this much be your first publish! 🎉"
---------------------------------------------------------------------------------------^
Probably should be:
"No file exists on the server "/debook-app/.ftp-deploy-sync-state.json" - this must be your first publish! 🎉"
---------------------------------------------------------------------------------------^

My Action Config

name: Auto Deploy to Live

on:
  workflow_dispatch:

jobs:
  web-deploy:

    name: Deploy Anuglar
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Set up Node.js
      uses: actions/setup-node@v3
      with:
        node-version: 20

    - name: Build Angular app to live
      working-directory: ./
      run: npm install && npm run build

    - name: FTP Files to Ionic
      uses: SamKirkland/FTP-Deploy-Action@4.0.0
      with:
        server: ${{ secrets.IONOS_FTP_SERVER }}
        username: ${{ secrets.IONOS_FTP_USER }}
        password: ${{ secrets.IONOS_FTP_PASS }}
        local-dir: ./dist/debook.app/
        server-dir: /debook-app/
        # to remove older JS files with hashed names (main-[hash].js)
        dangerous-clean-slate: true

My Action Log

Run SamKirkland/FTP-Deploy-Action@4.0.0
  with:
    server: ***
    username: ***
    password: ***
    local-dir: ./dist/debook.app/
    server-dir: /debook-app/
    dangerous-clean-slate: true
----------------------------------------------------------------
🚀 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
----------------------------------------------------------------
🗑️ Removing all files on the server because 'dangerous-clean-slate' was set, this will make the deployment very slow...
----------------------------------------------------------------
No file exists on the server "/debook-app/.ftp-deploy-sync-state.json" - this much be your first publish! 🎉
The first publish will take a while... but once the initial sync is done only differences are published!
If you get this message and its NOT your first publish, something is wrong.
----------------------------------------------------------------
Local Files:	35
Server Files:	35
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------
➕ Upload: 3rdpartylicenses.txt
📁 Create: browser
📁 Create: browser/assets
📁 Create: browser/assets/fonts
➕ Upload: browser/assets/fonts/Satoshi-Black.ttf
➕ Upload: browser/assets/fonts/Satoshi-Light.ttf
➕ Upload: browser/assets/fonts/Satoshi-Medium.ttf
➕ Upload: browser/assets/fonts/Satoshi-Regular.ttf
📁 Create: browser/assets/media
➕ Upload: browser/assets/media/debookFavicon.png
➕ Upload: browser/assets/media/example.mp4
➕ Upload: browser/assets/media/iconLogo.svg
➕ Upload: browser/assets/media/textLogo.svg
➕ Upload: browser/favicon.ico
➕ Upload: browser/index.html
➕ Upload: browser/main-7TGU3GQM.js
📁 Create: browser/media
➕ Upload: browser/media/Satoshi-Black-CLK2FY4C.ttf
➕ Upload: browser/media/Satoshi-Light-CINRKHM2.ttf
➕ Upload: browser/media/Satoshi-Medium-QIL3OLQH.ttf
➕ Upload: browser/media/Satoshi-Regular-UEXLJ65B.ttf
➕ Upload: browser/polyfills-RT5I6R6G.js
➕ Upload: browser/scripts-LGHYJXS5.js
➕ Upload: browser/styles-CXEURODC.css
➕ Upload: prerendered-routes.json
📁 Create: server
➕ Upload: server/chunk-AZIHRZDC.mjs
➕ Upload: server/chunk-CKY3Q2WY.mjs
➕ Upload: server/chunk-O73ZHKXN.mjs
➕ Upload: server/chunk-VVCT4QZE.mjs
➕ Upload: server/index.server.html
➕ Upload: server/main.server.mjs
➕ Upload: server/polyfills.server.mjs
➕ Upload: server/render-utils.server.mjs
➕ Upload: server/server.mjs
----------------------------------------------------------------
Making changes to 35 files to sync server state
Uploading: 9.12 MB -- Deleting: 0 B -- Replacing: 0 B
----------------------------------------------------------------
creating folder "browser/"
creating folder "browser/assets/"
creating folder "browser/assets/fonts/"
creating folder "browser/assets/media/"
creating folder "browser/media/"
creating folder "server/"
uploading "3rdpartylicenses.txt"
uploading "browser/assets/fonts/Satoshi-Black.ttf"
Error: connect ECONNREFUSED 217.160.233.24:50880
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '217.160.233.24',
  port: 50880
}
Error: connect ECONNREFUSED 217.160.233.24:50880
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '217.160.233.24',
  port: 50880
}
----------------------------------------------------------------
Time spent hashing:               45 milliseconds
Time spent connecting to server:  1 second
Time spent deploying:             5 seconds (1.79 MB/second)
  - changing dirs:                2.9 seconds
  - logging:                      45 milliseconds
----------------------------------------------------------------
Total time:                       7.3 seconds
----------------------------------------------------------------
@austin-sanga
Copy link

Hope you will circle back if you ever get a solution, getting same issue but mine just starts on the start of sync process, was working before but eversince intergrating cloudflare i get this .

Run SamKirkland/FTP-Deploy-Action@v4.3.4
----------------------------------------------------------------
🚀 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
Failed to connect, are you sure your server works via FTP or FTPS? Users sometimes get this error when the server only supports SFTP.

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

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

Error: Timeout (control socket)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.4/dist/index.js:5288:33)
    at Object.onceWrapper (node:events:627:28)
    at Socket.emit (node:events:513:28)
    at Socket._onTimeout (node:net:550:8)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
Error: Error: Timeout (control socket)

I am still using the same server so i know the issue is not the stiff about FTP or SFTP

@rroberrt
Copy link

@austin-sanga Experiencing the same error when it starts uploading the differences after the sync calculation—gets randomly stuck on uploading files. I tried setting a longer timeout for FTP operations of 10 minutes, but it simply fails the job after those 10 minutes anyway, as you can see per the timestamps:

2024-03-10T21:26:37.4794960Z uploading "contact.html"
2024-03-10T21:26:37.5328700Z uploading "contact/__data.json"
2024-03-10T21:26:37.5905440Z uploading "favicon.png"
2024-03-10T21:26:37.6433420Z uploading "franchise.html"
2024-03-10T21:26:37.7139930Z uploading "franchise/__data.json"
2024-03-10T21:26:37.7739670Z uploading "index.html"
2024-03-10T21:26:37.8412120Z uploading "kaart.png"
2024-03-10T21:26:37.9281700Z uploading "logo/blue.png"
2024-03-10T21:36:37.9708390Z 
2024-03-10T21:36:37.9713860Z ----------------------------------------------------------------
2024-03-10T21:36:37.9717290Z --------------  🔥🔥🔥 an error occurred  🔥🔥🔥  --------------
2024-03-10T21:36:37.9719290Z ----------------------------------------------------------------
2024-03-10T21:36:37.9720870Z 
2024-03-10T21:36:37.9722060Z ----------------------------------------------------------------
2024-03-10T21:36:37.9724000Z ----------------------  full error below  ----------------------
2024-03-10T21:36:37.9725920Z ----------------------------------------------------------------
2024-03-10T21:36:37.9726980Z 
2024-03-10T21:36:37.9746950Z Error: Timeout (control socket)
2024-03-10T21:36:37.9749720Z     at Socket.<anonymous> (/Users/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5299:33)
2024-03-10T21:36:37.9752020Z     at Object.onceWrapper (node:events:628:28)
2024-03-10T21:36:37.9753280Z     at Socket.emit (node:events:514:28)
2024-03-10T21:36:37.9754460Z     at Socket._onTimeout (node:net:589:8)
2024-03-10T21:36:37.9756630Z     at listOnTimeout (node:internal/timers:573:17)
2024-03-10T21:36:37.9758270Z     at process.processTimers (node:internal/timers:514:7)
2024-03-10T21:36:37.9848570Z ##[error]Error: Timeout (control socket)

In this instance, it uploaded all the files to the remote web server up until logo/blue.png. It only created a logo/blue.png file of 0 bytes in total, after which the job failed. logo/blue.png was not the last file to be uploaded.

When I tried to rerun the failed jobs—it worked... And it's been working since, I am not able to reproduce this issue anymore.

@markoeltiger
Copy link

try to use this version uses: SamKirkland/FTP-Deploy-Action@v4.3.4 instead

@austin-sanga
Copy link

try to use this version uses: SamKirkland/FTP-Deploy-Action@v4.3.4 instead

Fixed this issue with someones comment here on the same issue, cant find it but i put a stackoverflow response for it
https://stackoverflow.com/a/78118219/16273234

@DevHolako
Copy link

@austin-sanga
I don't understand. Could you please explain how to solve the problem I'm deploying to a shared hosting server

@dampee
Copy link

dampee commented Mar 29, 2024

Pretty sure this has to do with a passive vs active FTP connection for the original question. I don't think there is an option in the action to choose the mode. Check with your host if both are supported.

@mosta5617
Copy link

I am fetching this problem ... folder created but not file uplode

@mosta5617
Copy link

I have the same problem. deploy laravel project folder created but not file uploaded. please help

@mosta5617
Copy link

WhatsApp Image 2024-04-30 at 6 17 44 PM
WhatsApp Image 2024-04-30 at 6 18 13 PM

WhatsApp Image 2024-05-12 at 2 38 38 PM
WhatsApp Image 2024-05-12 at 2 38 12 PM
please solve my issue

@DevHolako
Copy link

try to update to 4.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants