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

None of the available transfer modes work #229

Closed
posbank2 opened this issue Oct 12, 2021 · 39 comments · Fixed by #313
Closed

None of the available transfer modes work #229

posbank2 opened this issue Oct 12, 2021 · 39 comments · Fixed by #313

Comments

@posbank2
Copy link

on: push
name: Deploy website on push 1
jobs:
web-deploy:
name: 🎉 Deploy
runs-on: ubuntu-latest
steps:
- name: 🚚 Get latest code
uses: actions/checkout@v2

- name: 📂 Sync files
  uses: SamKirkland/FTP-Deploy-Action@4.1.0
  with:
    server:  myhostname 
    username: username 
    password: password 
    server-dir : www/ 

1 set up job ok
2.Get latest code ok
3. sync files error
📁 Create: admin
➕ Upload: admin/404.html
➕ Upload: admin/blank.html
➕ Upload: admin/buttons.html
➕ Upload: admin/cards.html
➕ Upload: admin/charts.html
📁 Create: admin/ckeditor
10867 uploading "admin/404.html"

Error: None of the available transfer modes work.
at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3494:19)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Error: Error: None of the available transfer modes work.

All firewalls allow port 21.
The file transfer is interrupted.

Its file permissions are the same as all other files.
Could a lot of files be a problem?

I keep getting an error from a specific file.

@posbank2
Copy link
Author

In dry-run mode, it works fine.

@emyu01
Copy link

emyu01 commented Nov 13, 2021

Having same issue

@manuelescrig
Copy link

Same issue for me.

@bertugmete
Copy link

Same issue :(

@emyu01
Copy link

emyu01 commented Feb 21, 2022

Downgrading to v4.0.0 solved the issue for me

@GaelCodes
Copy link

I had the same issue, make sure ports for data channel are open.
You need to open port for command channel, but also for the range of ports that you specified to your ftp server to use when passive mode is requested.

It works for me.

@kingyue737
Copy link

Same issue for me.

@kingyue737
Copy link

kingyue737 commented Mar 2, 2022

Here is my error log:

Trying to find optimal transfer mode...
> EPSV
< 229 Entering Extended Passive Mode (|||40003|).

Transfer mode failed: "Can't open data connection in passive mode: connect ECONNREFUSED 101.37.28.143:40003", will try next.
> PASV
< 227 Entering Passive Mode(127,0,0,1,156,75).

Transfer mode failed: "Can't open data connection in passive mode: connect ECONNREFUSED 127.0.0.1:40011", will try next.

Here is the log of filezilla which can successfully transfer file with ftp server. May be the issue is related to server address?

Command:	PASV
Trace:	CFtpControlSocket::OnReceive()
Response:	227 Entering Passive Mode(127,0,0,1,156,81).
Trace:	CFtpRawTransferOpData::ParseResponse() in state 2
Status:	Server sent passive reply with unroutable address. Using server address instead.
Trace:	  Reply: 127.0.0.1, peer: 101.37.28.143

@kingyue737
Copy link

I've located the issue! The problem is that 127.0.0.1 is not considered as private address:

https://github.com/patrickjuchli/basic-ftp/blob/e1acee0215bf8e39c490a470e98cdaa0898460b3/src/netUtils.ts#L55

@patrickjuchli
Copy link

@SamKirkland, this should be fixed with basic-ftp 5.0.0.

@SamKirkland
Copy link
Owner

@patrickjuchli you rock! ♥️🚀
I'll upgrade asap

@mhasanmeet
Copy link

Error: None of the available transfer modes work.
    at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4323:19)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error: Error: None of the available transfer modes work.

This issue happens. Can you please solve the issue? Thank you so much for your contributing time, sir.

@SamKirkland SamKirkland changed the title None of the available transfter mode swork None of the available transfer modes work Aug 22, 2022
@KimpShreyan
Copy link

KimpShreyan commented Sep 29, 2022

This error shows up latest version please help

Error: None of the available transfer modes work. at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.2/dist/index.js:4803:19) at processTicksAndRejections (internal/process/task_queues.js:97:5)

@harry2712
Copy link

i also get the same
Error: None of the available transfer modes work.

@ibilalfaizz
Copy link

ibilalfaizz commented Dec 23, 2022

Tried the latest as well as the 4.3.1v, but the issue is still there for me.
p.s: it occurs in the last 1% of the files.
image

@DEV-BDM
Copy link

DEV-BDM commented Jan 16, 2023

Anybody found solutions for [None of the available transfer modes work]. SamKirkland/FTP-Deploy-Action@4.3.3

image

@inventorDrizzt
Copy link

inventorDrizzt commented Jan 29, 2023

just downgrade to version 4.6.6 , it works
https://www.npmjs.com/package/basic-ftp/v/4.6.6

@SamKirkland
Copy link
Owner

Had a bug on my side. This should be fixed in v4.3.4

@awaidus
Copy link

awaidus commented Mar 31, 2023

Same error:

image

@SamKirkland
Copy link
Owner

@awaidus can you post your config?

Looking at your log it appears you're still on a old version (4.3.0)

@awaidus
Copy link

awaidus commented Mar 31, 2023

@awaidus can you post your config?

Looking at your log it appears you're still on a old version (4.3.0)

I previously tried with 4.3.4 but still not working so I tried again with some older version as it was working fine before. but now none of any working

@awaidus
Copy link

awaidus commented Mar 31, 2023

one more thing it is also not recognizing " .ftp-deploy-sync-state.json " whereas this file is already there.

image

@SamKirkland
Copy link
Owner

@awaidus Can you switch back to the latest version 4.3.4 and try excluding files that start with . see readme for how. You also need to change your state-name to a file that does NOT start with . see readme for how.

What I suspect is happening: Your FTP account does not have access to special files (files that start with .) - which is why the upload fails on .editorconfig and the script cannot see the .ftp-deploy-sync-state.json file

@awaidus
Copy link

awaidus commented Mar 31, 2023

@awaidus Can you switch back to the latest version 4.3.4 and try excluding files that start with . see readme for how. You also need to change your state-name to a file that does NOT start with . see readme for how.

What I suspect is happening: Your FTP account does not have access to special files (files that start with .) - which is why the upload fails on .editorconfig and the script cannot see the .ftp-deploy-sync-state.json file

Thank @SamKirkland for your muck quicker and needed answer. I have changed my config.

image

would it be worked ? is config is correct ?

@SamKirkland
Copy link
Owner

state-name is relative. So no need to re-specify /public_html/laravel-app/

state-name: ftp-deploy-sync-state.json

If you make that change it should work - assuming the problem is limited FTP access.


If you want to test your config out you can add

dry-run: true

dry-run will output paths/files that WOULD be uploaded. But doesn't attempt to make the uploads. So its useful for testing what files would be excluded.

@awaidus
Copy link

awaidus commented Mar 31, 2023

dry-run: true

Thank you again. with your help I can manage to exclude all files staring from " . " and test the upload using dry-run. it works. but still it could not recognize ftp-deploy-sync-state.json. Well let's see what happened after upload completed as it takes a while.

image

@SamKirkland
Copy link
Owner

@awaidus state-name only works after the initial sync.

@SamKirkland
Copy link
Owner

@awaidus did the upload work?
After the first upload it should be MUCH faster (only changes will be uploaded going forward)

@Atahar-Hossain
Copy link

workflows

after completing this commit i got success message. But when i am going to cpanel there have all folders without file. That means all folders uploaded to cpanel but folders are empty. Secondly files are not uploading which are with (.) like, package.json.

@theJohnCode
Copy link

This is still a problem in version 4.3.4

@Sharifur
Copy link

same problem in version 4.3.4

@presidonaycs
Copy link

Same Issue with version 4.3.4 I have tried all the solutions above @SamKirkland please help

@presidonaycs
Copy link

The Error I get

Error: None of the available transfer modes work.
at Client.prepareTransfer (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.0/dist/index.js:4323:19)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Client._uploadFromStream (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.0/dist/index.js:4011:13)
at async Client._uploadLocalFile (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/v4.3.0/dist/index.js:3997:20)
Error: Error: None of the available transfer modes work.
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: 📂 Sync files

@presidonaycs
Copy link

It works fine with dry-run, but nothing shows up on the server, not even the empty folders

@Sharifur
Copy link

I have solved my problem by downgrade to version 4.1.0

@presidonaycs
Copy link

@Sharifur I have tried that as well, I have also tried 4.0.0, 4.3.0, non worked

@Sharifur
Copy link

@Sharifur I have tried that as well, I have also tried 4.0.0, 4.3.0, non worked

Did you try to change your FTP host url to IP address?
example: ftp.yourftp.com to 123.123.123.123

@presidonaycs
Copy link

Screenshot 2023-10-28 174942

This is my current configuration

@presidonaycs
Copy link

@Sharifur I just tried that, still didn't work

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

Successfully merging a pull request may close this issue.