Error: Timeout (control socket) SamKirkland/[email protected]
Hi, anyone facing this issue? I got Timeout Error while deploying into cpanel hosting.
Try this #106 (comment)
Halo Bang, saya sudah coba solusi dari abang tapi masih error. mungkin ada yang kurang ya?
`AggregateError` [ECONNREFUSED]:
at internalConnectMultiple (node:net:1116:18)
at afterConnectMultiple (node:net:1683:7) {
code: 'ECONNREFUSED',
message: ' (control socket)',
[errors]: [
Error: connect ECONNREFUSED ::1:21
at createConnectionError (node:net:1646:14)
at afterConnectMultiple (node:net:1676:16) {
errno: -4078,
code: 'ECONNREFUSED',
syscall: 'connect',
Try this #106 (comment)
Halo Bang, saya sudah coba solusi dari abang tapi masih error. mungkin ada yang kurang ya?
`AggregateError` [ECONNREFUSED]: at internalConnectMultiple (node:net:1116:18) at afterConnectMultiple (node:net:1683:7) { code: 'ECONNREFUSED', message: ' (control socket)', [errors]: [ Error: connect ECONNREFUSED ::1:21 at createConnectionError (node:net:1646:14) at afterConnectMultiple (node:net:1676:16) { errno: -4078, code: 'ECONNREFUSED', syscall: 'connect',
saya beralih menggunakan git-ftp, tapi saya menggunakan gitlab, jika menggunakan github tinggal sesuaikan saja
deploy-to-cpanel:
image: bitnami/laravel
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_FORCE_HTTPS: "true"
stage: deploy
script:
# Install git-ftp
- apt update && apt-get install -y git-ftp
# Check version tools used
- git-ftp --version
- php --version
- composer --version
- node --version
- npm --version
# Copy .env.example to .env
- cp .env.example .env
# Remove build folder
- rm -rf public/build && rm -rf bootstrap/ssr
# Install and build project
- composer install
- npm install
- npm run build
# Select ftp host, username and password based on branch
- if [ "$CI_COMMIT_REF_NAME" == "main" ]; then
export FTP_HOST=$PROD_FTP_HOST;
export FTP_USERNAME=$PROD_FTP_USERNAME;
export FTP_PASSWORD=$PROD_FTP_PASSWORD;
fi
- if [ "$CI_COMMIT_REF_NAME" == "development" ]; then
export FTP_HOST=$DEV_FTP_HOST;
export FTP_USERNAME=$DEV_FTP_USERNAME;
export FTP_PASSWORD=$DEV_FTP_PASSWORD;
fi
# Sync file using git-ftp
- if curl --silent --show-error --ftp-ssl -u $FTP_USERNAME:$FTP_PASSWORD -k ftp://$FTP_HOST/website/.git-ftp.log; then
echo "file .git-ftp.log found, doing git-ftp push...";
git-ftp push -u $FTP_USERNAME -p $FTP_PASSWORD -v $FTP_HOST/website/ --syncroot .;
else
echo "file .git-ftp.log not found, doing git-ftp init...";
git-ftp init -u $FTP_USERNAME -p $FTP_PASSWORD -v $FTP_HOST/website/;
fi
only:
- main
- development
karena saya menggunakan inerita maka buat buat file .git-ftp-include pada root project yang berisi seperti dibawah ini untuk tetap mengupload file hasil build
!./public/build
!./bootstrap/ssr
semoga berhasil
I had the same issue, and it is resolved with timeout under the with section:
Important note: timeout is in milliseconds
Here is my complete yml file:
name: 🚀 Deploy bot on push
on:
push:
branches:
- deploy
jobs:
build-and-deploy:
name: 🎉 Build and Deploy Website
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v4
- name: 📂 Sync files via FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.CPANEL_URL }}
username: ${{ secrets.CPANEL_USERNAME }}
password: ${{ secrets.CPANEL_PASS }}
local-dir: server/
server-dir: /public_html/
timeout: 190000