Error: read ECONNRESET (data socket)
Bug Description I don't know why, but recently I always get the following error.
My Action Config
name: Deployment Development
on:
push:
branches: [ dev ]
jobs:
web-deploy:
name: Deploy Fullstack Application
runs-on: ubuntu-latest
steps:
- name: setup php
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
- name: get code
uses: actions/checkout@v3
- name: install backend dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: setup node.js
uses: actions/setup-node@v3
with:
node-version: "22"
- name: install frontend dependencies
run: |
npm ci
- name: setup frontend
run: |
npm run build
- name: push files to server
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.ftp_server }}
username: ${{ secrets.ftp_username }}
password: ${{ secrets.ftp_password }}
server-dir: ${{ secrets.dev_dir }}
exclude: |
**/.git*
**/.git*/**
.github/**
.idea/**
database/**
**/node_modules/**
tests/**
.env**
phpunit*
docker-compose.yml
My Action Log
##[debug]Evaluating condition for step: 'push files to server'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: push files to server
##[debug]Loading inputs
##[debug]Evaluating: secrets.ftp_server
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'ftp_server'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.ftp_username
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'ftp_username'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.ftp_password
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'ftp_password'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating: secrets.dev_dir
##[debug]Evaluating Index:
##[debug]..Evaluating secrets:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'dev_dir'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Loading env
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
----------------------------------------------------------------
Last published on 📅 Monday, November 11, 2024 at 4:02 PM
----------------------------------------------------------------
Local Files: 19,497
Server Files: 19,486
----------------------------------------------------------------
Calculating differences between client & server
----------------------------------------------------------------
🔁 File replace: <-- hundreds of files
⚖️ File content is the same, doing nothing: <-- hundreds of files
creating folder "vendor/filament/tables/resources/lang/az/filters/"
creating folder "vendor/friendsofphp/php-cs-fixer/src/Runner/Event/"
uploading "app/Exceptions/KonzertmeisterException.php"
uploading "app/Services/KonzertmeisterIntegration/ICalAdapter.php"
uploading "app/Services/KonzertmeisterIntegration/ICalInterface.php"
uploading "app/Services/KonzertmeisterIntegration/ICalMockAdapter.php"
uploading "vendor/althinect/filament-spatie-roles-permissions/resources/lang/pt_PT/filament-spatie.php"
----------------------------------------------------------------
-------------- 🔥🔥🔥 an error occurred 🔥🔥🔥 --------------
----------------------------------------------------------------
----------------------------------------------------------------
---------------------- full error below ----------------------
----------------------------------------------------------------
Error: read ECONNRESET
at TCP.onStreamRead (node:internal/stream_base_commons:218:20) {
errno: -104,
code: 'ECONNRESET',
syscall: 'read'
}
Error: Error: read ECONNRESET (data socket)
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: push files to server
Full file: 8_push_files_to_server[1].txt
Here are the full logs after adding the log-level: verbose to the deployment step
logs_31783051152.zip
I also get this issue:
Error: Client is closed because read ECONNRESET (data socket)
at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.5/dist/index.js:5208:29
at new Promise (
@Mavv3006 I also got same issue in a laravel project deployment.
Error: read ECONNRESET at TCP.onStreamRead (node:internal/stream_base_commons:218:20) { errno: -104, code: 'ECONNRESET', syscall: 'read' } Error: Error: read ECONNRESET (data socket).
how did you resolved it?
@realbroking - We didn't
We also got that error message every time, especially on the first deploy. What seems to help with us if you manually create or place an empty file called .ftp-deploy-sync-state.json on the FTP. Then the upload process does seem to do just fine.
Creating an empty .ftp-deploy-sync-state.json on the server solved the problem for me as well!