SublimeText2-FTPSync icon indicating copy to clipboard operation
SublimeText2-FTPSync copied to clipboard

FTPSync [default] > Upload failed {index.php} [Exception: [Errno 0] Error]

Open antimatterES opened this issue 9 years ago • 12 comments

Hi There, I'm not able to use FTP Sync with SublimeText since the last months. It's not working in SublimeText 2 nor SublimeText 3. The error that FTPSync shows in the console is: FTPSync [default] > Upload failed {index.php} [Exception: [Errno 0] Error].

Any idea about how to solve it?

Thanks in advance!

Alberto

antimatterES avatar Nov 02 '15 14:11 antimatterES

No one here to give me any help on this?

antimatterES avatar Nov 03 '15 08:11 antimatterES

Hi, I might have to add some more logging, since this error message is not very helpful so to say. Has it been working for you before? Can you think of anything that has changed in your environment or in the FTP?

Maybe try adding into the connection setting:

 "debug_extras": {
    "print_ensure_folders": true,
    "debug_remote_paths": true,
    "debug_get_local_path": true
}

https://github.com/NoxArt/SublimeText2-FTPSync/wiki/All-settings

if anything, it might make it clearer in which phase it occured

NoxArt avatar Nov 03 '15 08:11 NoxArt

Thank you so much for your fast answer. Here you can see below the message in the sublimeText console after trying to upload a file called test.php. It seems the problem is in the function that gets the metadata, isn't it?.

Looking forward your feedback,

Alberto


FTPSync > Loading config: cache hit (key: /Users/alberto/new_web/test.php) FTPSync > Checking {test.php} if up-to-date FTPSync > Loading config: cache hit (key: /Users/alberto/new_web/test.php) FTPSync [default] > Connected to: 170.22.37.112:21 (timeout: 30) (key: 9a615752fe71130f5cb5eaed3980b410) FTPSync [default] > Authentication processed FTPSync [default] > Logged in as: dreampack (using password: YES) (u'//public_html/', [u'public_html']) FTPSync list path /Users/alberto/new_web/test.php => /public_html/test.php FTPSync [default] > Getting metadata failed: {test.php} [Exception: ]

FTPSync > Exception in user code:

Traceback (most recent call last): File "./FTPSync.py", line 1838, in execute File "./ftpsyncwrapper.py", line 819, in list File "./ftpsyncwrapper.py", line 949, in __execute File "./ftpsyncwrapper.py", line 783, in action

FileNotFoundException

FTPSync > Closing connection FTPSync > No version of {test.php} found on any server FTPSync > Loading config: cache hit (key: /Users/alberto/new_web/test.php) Writing file /Users/alberto/new_web/test.php with encoding UTF-8 FTPSync [default] > Connected to: 170.22.37.112:21 (timeout: 30) (key: 9a615752fe71130f5cb5eaed3980b410) FTPSync [default] > Authentication processed FTPSync [default] > Logged in as: dreampack (using password: YES) FTPSync list path /Users/alberto/new_web/test.php => /public_html/test.php FTPSync [default] > Getting metadata failed: {test.php} [Exception: ]

FTPSync > Exception in user code:

Traceback (most recent call last): File "./FTPSync.py", line 1838, in execute File "./ftpsyncwrapper.py", line 819, in list File "./ftpsyncwrapper.py", line 949, in __execute File "./ftpsyncwrapper.py", line 783, in action

FileNotFoundException

FTPSync > Closing connection FTPSync > Loading config: cache hit (key: /Users/alberto/new_web/test.php) FTPSync [default] > Connected to: 170.22.37.112:21 (timeout: 30) (key: 9a615752fe71130f5cb5eaed3980b410) FTPSync [default] > Authentication processed FTPSync [default] > Logged in as: dreampack (using password: YES) FTPSync [default] > Upload failed: {test.php} [Exception: [Errno 0] Error]

FTPSync > Exception in user code:

Traceback (most recent call last): File "./FTPSync.py", line 1421, in action File "./ftpsyncwrapper.py", line 467, in put File "./ftpsyncwrapper.py", line 949, in __execute File "./ftpsyncwrapper.py", line 430, in action File "./ftpsyncwrapper.py", line 290, in retryingCommand File "./ftpsyncwrapper.py", line 284, in call File "./lib2/ftplib.py", line 753, in storbinary File "./lib2/ssl.py", line 258, in unwrap

error: [Errno 0] Error

FTPSync > Closing connection

antimatterES avatar Nov 03 '15 10:11 antimatterES

Hi NoxArt! Did you have the time to take a look on this? Thanks!

antimatterES avatar Nov 04 '15 07:11 antimatterES

Nothing to do with this? No solution yet?

Thanks!

antimatterES avatar Nov 04 '15 22:11 antimatterES

Hi, the initial issue is reported in "LIST -a " + path => str(e).find('No such file') Can you please enable the settings I posted above and post the results (or send them to me via mail)? Also check the results if they seem to be correct according to the paths in your FTP Thanks

NoxArt avatar Nov 04 '15 23:11 NoxArt

Hi there, you can see below the data inside my ftpsync.settings file. It seems to be correct, am I wrong?

What I send you in the previous messages are the lines that appears in the SublimeText console after trying to connect. Should I look for the debug information you need in another place inside SublimeText?

BTW, I have no idea on SublimeText programming, so for me "LIST -a " + path => str(e).find('No such file') has no meaning, I'm so sorry for that.

FYI, I haven't changed nothing in my enviroment, and as far as I know nothing changed in my FTP server. I'm connecting with no problem to my FTP server via Filezilla. At any case, this happens in several machines with different operative systems, and on every domain that I have hosted in the same server. All was working perfect until a couple of weeks. It's really weird!

Any idea?

Thank you soooo much for your help on this!


{

"default": {

    "host": "my host number",
    "username": "my username",  // or null for anonymous login
    "password": "my password",
    "path": "/public_html/",

    "upload_on_save": true, // set *false* if you do not want to upload on save!

    // "port": 21,
    "tls": true,
    // "timeout": 30, // [seconds]

    "passive": true,
    "download_on_open": true,
    "overwrite_newer_prevention": false,
    //"default_folder_permissions": "755",
    "max_threads": 1,

    "debug_extras": {
        "print_ensure_folders": true,
        "debug_remote_paths": true,
        "debug_get_local_path": true
    }
}

}

antimatterES avatar Nov 05 '15 22:11 antimatterES

I forgot to comment you one important thing that maybe has something to do with this issue. I'm not sure if FTPSync connect or not with my server, but I guess that Yes, it really does, because after trying to update a file this file in the server is completely empty. So that, each time I want to test if FTPSync works, I have to access via Filezilla to my server, copy the code of the file and put into the file again, because FTPSync removed all the code inside. Do you understand me?

So maybe, FTPSync connect with my server, but something happens in the update process that rermoves completely the code inside the file. At this moment FTPSync It's really dangerous for me, that's the reason I'm pretty interested ton solve this issue.

Thank you so much for your support!

antimatterES avatar Nov 05 '15 22:11 antimatterES

Hi there again! After some checkings with the people of my server, we determined that the problem is TLS. TLS is active and works fine with cPanel and Filezilla, but does not work at this moment with FTPSync. The cPanel is updated regulary, and maybe the SSL Certificate is not working now with FTPSync and has some conflict. Who knows?

My server has relaxed the need to make a Explicit TLS connection to connect via FTP to the server, and now, changing the TLS to false in the ftpsync.settings file I'm able to use FTPSync as before.

If you find more users having the same issue, please, write the solution here for me.

Thanks for all your time looking for a solution to this and for this awesome plugin that save a lot of time to me everyday!

antimatterES avatar Nov 06 '15 11:11 antimatterES

Hi, 'm glad you found the cause. FTPSync supports TLS in some cases, but it's not really perfect. I've tried extending the support, surprisingly found no library that would help out yet, and haven't finished my implementation, but I could give it another try. I am unfortunately short on time, but this is one of the highest priorities for me. I'll look into it tomorrow

NoxArt avatar Nov 06 '15 20:11 NoxArt

I think it might have something to do with some cPanel or Php updates actually, because one week ago everything was working perfectly with TLS = true. Who knows? Maybe something change in cPanel or its certificate that makes TLS protocol more restrictive, and that's all!

BTW, my cPanel version is: 1.0 (RC1), Hope it helps!

antimatterES avatar Nov 06 '15 21:11 antimatterES

I got a fix.

-You gotta be root, with WHM access- Service Configuration -> FTP Server Configuration -> Broken Clients Compatibility -> Change to YES

That'll do it. At least it worked for me.

carlesjavierre avatar Jan 28 '16 21:01 carlesjavierre