evanplaice / node-ftpsync

Intelligent file syncronization over FTP
http://evanplaice.github.io/node-ftpsync
MIT License
74 stars 21 forks source link

503 Bad Sequence of Commands #27

Open fily55 opened 8 years ago

fily55 commented 8 years ago

Hi there,

I'm getting a 503 bad sequence of commands error. I'm sending up quite a lot of files.

I think the issue is with the callbacks. I'm not sure if the issue lies here or in jsftp. This happens when ftp.put is called.

The only thing I noticed is that the sequence of response code changes when it gives the error. Another words, it is doing the following sequence: 227 150 226 227 150 226

This is all fine but then it does the following. 227 150 227 226 503.

Would you have any ideas?

evanplaice commented 8 years ago

Try reverting back to 0.1.7 and let me know if you still have the issue.

There have been 2 changes recently that may be to blame.

fily55 commented 8 years ago

Yep, version 0.1.7 is working fine. I'm actually using grunt-ftpsync which uses version ^0.1.7, which means it automatically gets 0.1.9. I had to create my own task (copy of grunt-ftpsync) which uses version 0.1.7 of this and that works fine.

fily55 commented 8 years ago

It seems that before this was opening up a connection per file transfer and now it is opening up one connection for all file transfers. If you do have multiple connections with a large number of files it also seems to hang so maybe one connection is right, I just don't know if its working correctly.

evanplaice commented 8 years ago

@fily55 The dependencies were updated following 0.1.7.

Looking at the jsftp issues, it looks like grunt-ftp-deply is experiencing the same issue so it's highly unlikely that changes in grunt-ftpsync are the cause.

The best course of action for now seems to be rolling back jsftp to an older version until a fix is available. I'll release 0.1.10 with the dep rolled back.

If you have direct access to the FTP server and it's running in PASV mode, try it with PASV disabled.

fily55 commented 8 years ago

Hi @evanplaice,

Disabling PASV mode isn't an option for me unfortunately. I tried upgrading node-ftpsync to the latest (0.1.1) and now I get a different issue.

'Collecting' Fatal error: Cannot read property 'on' of undefined

I just reverted back to using ftpsync 0.1.7 again.

evanplaice commented 8 years ago

@fily55 0.1.1 or 0.1.10? 0.1.10 should be the latest

fily55 commented 8 years ago

@evanplaice Apologies, I meant 0.1.10

evanplaice commented 8 years ago

@fily55 On of undefined? That doesn't make sense.

I ran the tests against 0.1.10 on my end without any issues.

I guess I'll just lock grunt-ftpsync to node-ftpsync@0.1.7 until I can get some better tests setup. Grunt-ftpsync has been stable for over a year on the previous versions.

fily55 commented 8 years ago

Yep, so now i have grunt-ftpsync 0.1.3 with ftpsync 0.1.7 and jsftp 1.1.1. This is giving me the undefined issue. I think what you need is grunt-ftpsync to use ftpsync 0.1.7 with jsftp ^1.5.3. That was the last that seemed to be working, I think you may have jumped jsftp back too far.

That's my guess anyway.

evanplaice commented 8 years ago

Wait, what? You previously that ftpsync 0.1.7 worked. In retrospect it probably shouldn't have because the version property was set to >=.

You said you have a copy that works stashed away. Could you crack it open it and see what version of jsftp it's using (ie not the dependency tag, the actual version in package.json)?

Thanks for your patience BTW.

fily55 commented 8 years ago

No problem.

Yes, so right now I am using my own version of grunt-ftpsync (identical to yours) but it uses ftpsync 0.1.7. "ftpsync": "0.1.7",

This is then using jsftp >=1.1.1 (which is 1.5.3).

evanplaice commented 8 years ago

I meant, open the actual jsftp folder and look at its package.json to get the version.

fily55 commented 8 years ago

Yep, 1.5.3 is the version in the package.json.