FTP-Deploy-Action
FTP-Deploy-Action copied to clipboard
FTP Upload Fails Every Time
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/[email protected]
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/[email protected]
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
----------------------------------------------------------------
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/[email protected]
----------------------------------------------------------------
π 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
@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.
try to use this version uses: SamKirkland/[email protected] instead
try to use this version uses: SamKirkland/[email protected] 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
@austin-sanga I don't understand. Could you please explain how to solve the problem I'm deploying to a shared hosting server
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.
I am fetching this problem ... folder created but not file uplode
I have the same problem. deploy laravel project folder created but not file uploaded. please help
please solve my issue
try to update to 4.3.5