SamKirkland / FTP-Deploy-Action

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

Error: Error: getaddrinfo ENOTFOUND *** (control socket) #400

Open ckobasti77 opened 1 year ago

ckobasti77 commented 1 year ago

Bug Description Getting My Action Log error when i try to connect it with my cPanel. Its React app with NodeJS backend that is hosted on free hosting service. So React app on cPanel with backend on free service.

My Action Config

on: 
  push:
    branches:
      - main
name: πŸš€ Deploy website on push

jobs:
  web-deploy:
    name: πŸŽ‰ Deploy
    runs-on: ubuntu-latest
    steps:
    - name: 🚚 Get latest code
      uses: actions/checkout@v3

    - name: Use Node.js 16
      uses: actions/setup-node@v2
      with:
        node-version: '16'

    - name: πŸ”¨ Build Project
      run: |
        npm install
        npm run build

    - name: πŸ“‚ Sync files
      uses: SamKirkland/FTP-Deploy-Action@v4.3.4
      with:
        server: ${{ secrets.GIT_CPANEL_REACT_SERVER }}
        username: ${{ secrets.GIT_CPANEL_REACT_USER }}
        password: ${{ secrets.GIT_CPANEL_REACT_PWD }}
        protocol: ${{ secrets.GIT_CPANEL_REACT_PROTOCOL }}
        local-dir: ./src/

My Action Log

  Error: Error: getaddrinfo ENOTFOUND *** (control socket)
talhaa99 commented 1 year ago

I also got the same error

----------------------------------------------------------------
πŸš€ 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

----------------------------------------------------------------
---------------  πŸ”₯πŸ”₯πŸ”₯ A error occurred  πŸ”₯πŸ”₯πŸ”₯  --------------
----------------------------------------------------------------
The server "***" doesn't seem to exist. Do you have a typo?

----------------------------------------------------------------
----------------------  Full Error below  ----------------------
Error: getaddrinfo ENOTFOUND *** (control socket)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:[26](https://github.com/Astrosteem/Astrosteem-Backend/actions/runs/4958576036/jobs/8871619717#step:6:27)) {
  errno: 'ENOTFOUND',
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: '***'
}
Error: Error: getaddrinfo ENOTFOUND *** (control socket)

This is the .yml file

on:
  push:
    branches:
      - dev
name: πŸš€ Deploy website on push (DEV)
jobs:
  web-deploy:
    name: πŸŽ‰ Deploy
    runs-on: ubuntu-latest
    steps:
      - name: 🚚 Get latest code
        uses: actions/checkout@v2

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.1

      - name: Cache Composer packages
        id: composer-cache
        uses: actions/cache@v2
        with:
          path: vendor
          key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
          restore-keys: |
            ${{ runner.os }}-php-

      - name: Install dependencies
        run: composer install --prefer-dist --no-progress

      - name: πŸ“‚ Sync files
        uses: SamKirkland/FTP-Deploy-Action@4.0.0
        with:
          server: ${{ secrets.FTP_SERVER }}
          username: ${{ secrets.FTP_USERNAME }}
          password: ${{ secrets.FTP_PASSWORD }}
Mohammed-Sameer-Inamdar commented 10 months ago

same issue, any luck?

talhaa99 commented 10 months ago

same issue, any luck?

Till now, nothing!

Arman091 commented 9 months ago

is there any update for this,i am also going through same issue. problem is with connection with server

1.if i provide additional key that is protocol that error message always indicate you provided your protocol as ***(whatever i chose) insted chose (ftps or ftps-legecy or ftp) whatever i don't choose.

having said that it always through error with whatever protocol i choose for my key.

Arman091 commented 9 months ago

Yes!! I GOT IT ,Problem was with secret Keys i was providing secret keys as "keyvalue" also i changed my password to alphanumeric chracter and no special character because github action throws error if you provide any secret key with special characters i think that's it.

1.give username no special charachter just plain text while creating new ftp account 2.create your own password with text and numbers 3.make sure your username and host name are at right place

Also protocol is not necessary to provide as key but,i provided all 4 keys and values,so you should also use all 4 keys. 1.USER_NAME 2.SERVER_NAME 3.PASSWORD 4.PROTOCOL

jarrencampos commented 8 months ago

https://github.com/SamKirkland/FTP-Deploy-Action/issues/293#issuecomment-1305617390

Worked for me changing the server name to the ip address of the server.

Kwenziwa commented 3 months ago

Using the IP address for the FTP server and ensuring the password contains only letters and numbers (no special characters) worked for me.