Nautilus does not handle FTP timeouts well

Bug #410288 reported by Fabian
304
This bug affects 63 people
Affects Status Importance Assigned to Milestone
Nautilus
Invalid
Undecided
Unassigned
gvfs
Fix Released
Low
gvfs (Ubuntu)
Fix Released
Low
Unassigned
Nominated for Lucid by Light-
Nominated for Maverick by Rubén Caro

Bug Description

Binary package hint: gvfs

I connected to a FTP server via gvfs in Nautilus. After some time the FTP connection is closed automatically, as I observed with wireshark (421 No transfer timeout (300 seconds): closing control connection).

After that, everytime I open a folder on the FTP server I get only an "unexpected end of stream" error. To access the FTP server again I have to disconnect and then connect again. Nautilus does not seem to know that the connection closed.

A better behaviour IMHO would be to try and reconnect to the FTP server.

ProblemType: Bug
Architecture: i386
Date: Fri Aug 7 15:16:05 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/bin/nautilus
LiveMediaBuild: Ubuntu 9.10 "Karmic Koala" - Alpha i386 (20090722.2)
Package: nautilus 1:2.27.4-0ubuntu4
ProcEnviron:
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-5.24-generic
SourcePackage: nautilus
Uname: Linux 2.6.31-5-generic i686

Revision history for this message
Fabian (fabian-h) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. The issue is an upstream one and it would be nice if somebody having it could send the bug the to the people writting the software (https://wiki.ubuntu.com/Bugs/Upstream/GNOME)

Changed in gvfs (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Wishlist
Fabian (fabian-h)
Changed in gvfs:
importance: Undecided → Unknown
status: New → Unknown
Changed in gvfs (Ubuntu):
status: New → Triaged
Changed in gvfs:
status: Unknown → New
Revision history for this message
Andrew Keyes (akeyes) wrote :

Confirming that this affects me as well now that 9.10 has been released.

I keep getting:

There was an error copying the file into ftp://...
Host closed connection

Revision history for this message
Magnus Olsson (xeroxer) wrote :

I get the exact same problem in Ubuntu 9.10.
The problem did not exist in 9.04 and the gvfs connections worked like a charm then.

Revision history for this message
Ceriak (ceriak) wrote :

Same as the last two comments describe here. Very annoying.

Revision history for this message
killrobot (owentom) wrote :

I have the same issue, in 9.04 I could leave nautilus connected to an ftp all day and never get disconnected. In 9.10 it seems to lose it's connection after a few minutes and I have to manually unmount then reconnect.

Revision history for this message
moadin (moadin) wrote :

I have the same problem after I upgraded to Ubuntu 9.10.
Usually I edit the files I opened via a Nautilus FTP connection in Gedit.
Since upgrading I get a red warning box in gedit and have to save one or two times more until it is saved via FTP.

Revision history for this message
Ixtao (ixtao) wrote :

I thought I finally got myself a functional file sharing solution through ftp, but this is totally annoying. I open a file and before I knwo it I have to manually reconnect before I can save the file..

Revision history for this message
KishCom (akish-launchpad) wrote :

Can confirm this problem. It's a complete deal breaker for Ubuntu for me... interestingly enough Mint Linux 8 (based on Ubuntu 9.10) does NOT suffer the same problem.

Revision history for this message
ambrosa (ambrosa) wrote :

That's incredible :-((

I've just made e clean installation of 10.04 amd64 on my desktop computer and it has the SAME problem.
Really, for me it's a pain. Usually I've opened with Nautilus 3 or 4 ftp connections and after some minutes they closed.
I cannot do my job in this way.

10.04 Lucid works very fine but for this problem I need to find another distro.... sigh.

Revision history for this message
Sebastien Bacher (seb128) wrote :

other distributions will have the same issue the code is GNOME one

Revision history for this message
marcosdsanchez (marcosdsanchez) wrote :

This bug shouldn't be marked as "wishlist" it should be marked as a very important one.
Ftp is unusable in Ubuntu Lucid amd64 updated 20-May-2010

Changed in gvfs (Ubuntu):
importance: Wishlist → Low
Revision history for this message
Ben Green (ben-latenightsketches) wrote :

I can confirm this bug happening on 10.04 and when it times out sometimes it clears the contents of the files that I have worked on. If it times out and I am editing a file in gedit, it sometimes saves a 0 byte file on the server for no apparent reason. This is a BIG problem!

Revision history for this message
Pep (teleki-farkas-peter) wrote :

This is a pain in the head for me too. Please at least tell me how to raise the timeout limit! Thx

Revision history for this message
Thomas Hansen (thomasphansen) wrote :

I can confirm it on 10.04 32 and 64 bits. This does not seem to be a low priority bug, guys... we are loosing files here!
On the other hand: I am not sure if this bug is exactly on gvfs: I've experienced other strange net issues since 9.10; for example, I had to DISABLE passive mode on my ftp client (filezilla) running on Ubuntu since 9.10 - it would loose connection after a few Kb download. And after some idle time, I've experienced ssh sessions to freeze with no apparent reason. Maybe some major problem on lower net layers?

Revision history for this message
Removed by request (removed1016696) wrote :

This is extremely annoying, you have my vote!

Revision history for this message
Troy Hirni (troyhirni-gmail) wrote :

In Ubuntu 10.04 here's what happens... I open a file via FTP, edit for a while in gedit, then save and get a red bar with a "could not save" message along the top.

I curse a bit, then go back to the folder, click the Refresh button once or twice until it doesn't give an error, then go back into gedit and save again (and it works).

I'm dying for a fix here, too... or even some workaround. Does anyone know a good FTP client that works like WinSCP or CyberDuck to let you edit remote (FTP) files on a local text editor?

Changed in gvfs:
importance: Unknown → Low
Revision history for this message
Alex (alex-1992) wrote :

Problems connecting after timeout and sometimes difficult or impossible to disconnect. When I edit files over FTP, files are often overwritten with a blank file, which creates a lot of extra work for web developers.

Please fix it : '(

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

I have the same problem but it's easy to just restart the connection from nautilus and then save the file again from gedit and every thing would be fine, i agree that it's annoying but i never got the 0byte file problem, i just refresh from nautilus twice then the connection is back up.
And i don't think its a hard problem to fix either, just sending a 'NOOP' signal to the ftp server and let the user choose how often it would be sent shouldn't be that hard. ( that's just what i think, might be wrong though )
I add my vote for to the people who want this feature to be added.

Revision history for this message
Anders Aagaard (aagaande) wrote :

Sending a NOOP on the connection is such a small fix that this could almost be considered a breadcrumb.

And I've also seen the 0byte file problem. It does not happen using gedit (using gvfs), but it does happen using geany (using plain fuse). I suspect gedit reconnects and saves properly.

Revision history for this message
Rubén Caro (ruben-caro-estevez) wrote :

I'm suffering this annoying bug too. Ubuntu 9.10/10.04 amd64

I agree it's not a minor bug. Actually it disables Ubuntu/gedit as a reliable remote programming platform. This is too bad.

Revision history for this message
maurizio de santis (izietto) wrote :

Please solve this bug, it is so superficial its existence, and it is so frustrating coexisting with it at work that I'm considerating to change text editor!

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

ok i don't know if this has any relation with this or not, but for some reason SFTP works just fine with GVFS, though I used some other ftp clients before, they seemed to drop the connection after a while, but nautilus seems to keep the connection alive for a long time, if it's possible maybe you could some how check what's the difference and makes the problem disappear in the SFTP mode..

Revision history for this message
Bálint Magyar (balintm) wrote :

This is still a problem in Natty.

Revision history for this message
Pierre Quillery (dandelionmood) wrote :

Indeed, the bug is still present in Natty.

To solve the problem, I wrote a little shell script that will do a `ls` on each FTP mounted with gvfs every 15 seconds, and that seems to do the trick. I attached it to my message, hopefully it will help someone else. Just launch the script and forget it ;).

Revision history for this message
Jonas Jacek (jabz-deactivatedaccount) wrote :

I just installed Ubuntu 11.10. with Gnome Shell and still have this problem. Please fix this bug. I finally want to ditch Filezilla for a neat in-build solution: Nautilus. Can't we elevate this? I know some people who moved away from Ubuntu because of this bug.

Revision history for this message
Pierre Quillery (dandelionmood) wrote :

As a side note, I just noticed that with the new version of gnome/gvfs, mounted FTP directories changed name (FTP is now in caps), and that prevents my script from working properly. Here's an updated version.

Revision history for this message
Sean Storer (t7v-slz7-lzh) wrote :

i just wanted to get this documented somewhere -- im having the same problem -- im hoping this script will do more than the last one i tried which didnt seem to do much at all... lol (not yours, btw, different script)

this is confirmed still an issue on ubuntu 11.10 x64

another WORKAROUND that I found, and apparently no one else has noticed:

INSTEAD OF needing to go back to nautilus (or reopen) and try and refresh the ftp connection..

if u have the file-browser side panel addon for gedit -- if youre browsing the correct ftp location, (or right-click and hit 'set root to active document') refreshing the pane IN GEDIT will awaken the ftp connection enough to save your file. WITHOUT SWITCHING TO/OPENING NAUTILUS!

at times you can just hit save again, and the initail failed attempt will have had been enoough (i know most of u --and i at first-- wouldnt have 'tried again' after the red banner pops up displaying error)

other times, if you hit the refresh button anywhere inside the correct ftp hierarchy, should do it! hit save again, voila!

and futhermore, if that still doesnt work -- the most times ive ever had to refresh was THREE. and it works fine.

im hoping some python programmer will see this, and realize how SIMPLE a gedit plugin COULD BE -- just with some "refresh" toggleing..

this bug has been driving us all nuts for a lonng time..

--------------
(also complete side-topic, related to ftp-ing in nautilus):

has anyone else noticed if you are to browse through nautilus into an ftp server (doesnt seem to work locally, thank god, but this is still VERY SCARY!)

and create a file named (any filetype, any name!) -but for example purposes, im calling it:
"FIRST.php" fill that with some phony-content.

then create another file, with different content. (i would just make one larger than the other, different sizes, so u can see whats happening in nautilus)

ill call that one "SECOND.php"

now. if you rename 'SECOND.php' to 'FIRST.php' the original file is OVER-WRITTEN, and COMPLETELY GONE!!! (even if the over-written file is marked READ-ONLY!!)

ive never posted a bug-report, nor do i currently have any time to address this issue more than what ive just written, so if anyone wants to submit that seperately, be my guest, even copy and paste, use my words, whatever you'd like, but either way please at least reference me :P

thanks all, and good luck...

Revision history for this message
Mohammad AbuShady (coalwater) wrote :

@Sean,
About the renaming issue, I wouldn't call it a bug, at least not in the code, it's more like just a case that needs handling, the ftp protocol it self - i think- doesn't check if the destination file exists or not, it's the ftp client's job to make sure that the file doesn't exist before doing the renaming,
I think this could be filed as a bite-size bug, i'd prefer a question popup like in file's copying, the one that asks if to overwrite or rename.

Revision history for this message
Andy (theonlyandy) wrote :

Still present in 12.04

Revision history for this message
magowiz (magowiz) wrote :

Even worst in 12.10 , I got ftp/sftp timeouts in early phases of transferring a file . I tried both PCManFM and Nautilus , both of them relies on gvfs to handle ftp and sftp .
I noticed this timeout while transferring a file from a remote server to local machine both sftp and ftp protocols, no problems while doing the inverse (local -> server) .

Revision history for this message
Adam Niedling (krychek) wrote :

I'm not sure if I have the same issue, but a few seconds later I start copying files over FTP with nautilus I get a time limit reached error message. However the file transfer does not stop, the files will arrive successfully. I don't have this problem with Filezilla with the same FTP server.

Revision history for this message
lvelden (l-j-j-vandervelden) wrote :

This is still a bug in present 12.04 nautilus/gvfs

after connection to ftp server (mounting it) the connections gets closed when/during:
1 - copying of multiple files (hangs up between files)
2 - a period of idle use
3 - after a low amount of read/stream operations

super annoying, my android phone is a better ftp client at the moment :)

Revision history for this message
Daniel Scholtus (sdeonline) wrote :

I can't believe this isn't solved yet...
The scripts posted in the comments neither work...
Would you please fix this? Already passed 3 years for a less than half hour coding fix...

Revision history for this message
Daniel Scholtus (sdeonline) wrote :

I've made an update for the keepalive script posted.
Here's the attachment.

Revision history for this message
new4u (new4u) wrote :

It's still in 13.04 (beta)...

Revision history for this message
walec51 (me-adamwalczak) wrote :

Still 13.10 ...

this actually makes it FTP support useless. Beside the fact that nautilus can totally crash because of this

Revision history for this message
Shu Hung (Koala) (koalay) wrote :

I recently added a bug report on Gnome's bug tracker.

Please help pumping that up so developer may notice:
https://bugzilla.gnome.org/show_bug.cgi?id=707103

Revision history for this message
Adam Niedling (krychek) wrote :

I was copying some large files over FTP with nautilus and after one hour the connection got disconnected. Nautilus should have kept the connection open during the copying. Ubuntu 13.10.

tags: added: saucy
Revision history for this message
Richard Casemore (skarard) wrote :

In Ubuntu 13.10 instead of gvfs using /run/user/USERNAME it changed to /run/user/USERID. The file attached represents those changes.

Revision history for this message
Ahmed Hosny (ahmed-hosny-badr) wrote :

This affects me on Ubuntu 13.10.

I'm currently trying to use the Richard's workaround, hope that helps.

Revision history for this message
Ahmed Hosny (ahmed-hosny-badr) wrote :

OK, Seems that Richard's workaround is working for me.

Hope this bug get fixed very soon, as it's very annoying.

Changed in gvfs (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
Revision history for this message
Christian González (droetker) wrote :

Still affecting 14.04.1 LTS...
Bug report was 5 years ago
ping...

Changed in gvfs:
status: New → Confirmed
Changed in gvfs:
status: Confirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

The issue has been fixed in the upstream vcs

Changed in gvfs (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
CRAFT (craft37) wrote :

Seems like it affects me in Ubuntu 14.10.
Nautilus version 3.10.1

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :
Mathew Hodson (mhodson)
tags: added: karmic
removed: saucy
Changed in gvfs (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Andrew Silvers (airbus) wrote :

I've updated gvfs on Ubuntu Gnome 14.10 to 1.20.3 via trusty-proposed (with libplist1 from trusty as dependency for gvfs-backends) and the issue is still there. Even worse, now an ftp folder with pictures can't load if it is told to generate thumbnails (on 1.20.1 from utopic it generated nearly 50 of them without problems).

If I remove thumbnails, it loads any branch of folders, loads any number of pictures, but unmounts as soon as I return to previous directory or to ftp root.

Revision history for this message
Andrew Silvers (airbus) wrote :

Switching both server and client to sftp solved all problems, somehow.

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

If you want to help, please run the following in a terminal:
pkill gvfs; GVFS_DEBUG=all `find /usr/lib* -name 'gvfsd'` &> ~/log.txt
and then upload log.txt in your home directory so we can see a log of what is happening.

sftp is a completely different protocol so it's expected to be different.

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

Oh, after you run the command, mount the ftp share and reproduce the problem before uploading the log.

Revision history for this message
Andrew Silvers (airbus) wrote :

Here they are, each one just after reboot.

http://pastebin.com/izwtJ0N3 - with thumbnails (opened an ftp, opened a folder with non-generated thumbnails - was thrown out)
http://pastebin.com/7WZdSMuc - without thumbnails (opened an ftp, opened some folders, returned to previous - was thrown out)

Strangely, I don't have this problem on an Acer P633 with the same system, same packages (clean updated Ubuntu Gnome + vim, htop, guake). I can send more info on this "problematic" PC, if you want.

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

See the bottom of the log: "Attempt to unlock mutex that was not locked"

The problem is that glib 2.42, used in Ubuntu 14.10 became more strict about lock checking, and you're using a version of gvfs from a older version of GNOME which had a locking bug. See this commit https://git.gnome.org/browse/gvfs/commit/?id=2153d300f24d3388d7c4ab75a55451ad5a581b5a

Unfortunately, mixing and matching bits from different GNOME releases can cause problems...

For a solution, you could ask the Ubuntu maintainers to add that patch.

Revision history for this message
Andrew Silvers (airbus) wrote :

Looks like it was already included in gvfs (1.20.2-1ubuntu3) utopic from utopic-proposed:
https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1361906/comments/25)

and it's gone in 1.23.2-1ubuntu1 vivid, too. Thanks, must've been my fault somewhere.

Revision history for this message
Sebastien Bacher (seb128) wrote :

could somebody using trusty try the update and comment on bug #1416891 about whether it resolves their issues?

Mathew Hodson (mhodson)
Changed in nautilus:
status: New → Invalid
Revision history for this message
André Pirard (a.pirard) wrote :

Sebastien, bug #1416891 is about updating 12.04 LTS. to 1.20.3.
I sure would like to test it, but where can we get the fix?

The problem I see occurs when the server times out and closes the connection, looking like this on our side (netstat)
tcp 53 0 192.168.0.20:44879 xx.xxx.xxx.xxx:ftp CLOSE_WAIT
the 53 bytes to be read from the Recv-Q contain:
421 Timeout - try typing a little faster next time
gvfs-ftpd should close that connection (or read the bytes) but it tries to use it instead.
The operation gets an error and, depending on which it is, may or may not close the connection and clear the error.
The ls ~/.gvfs/FTP* command gets the connections in this state (input flushed and output blocked)
tcp 0 7 192.168.0.20:44879 62.210.182.224:ftp CLOSE_WAIT
This is not enough: the ls ~/.gvfs/FTP* command must be issued twice and the connection closes on second time.

Revision history for this message
Andy (theonlyandy) wrote : Re: [Bug 410288] Re: Nautilus does not handle FTP timeouts well

, "", and,,,, "" """, "" """,

Am 29.08.2015 23:42 schrieb André Pirard <email address hidden>:
>
> Sebastien, bug #1416891 is about updating 12.04 LTS. to 1.20.3.
> I sure would like to test it, but where can we get the fix?
>
> The problem I see occurs when the server times out and closes the connection, looking like this on our side (netstat)
> tcp       53      0 192.168.0.20:44879      xx.xxx.xxx.xxx:ftp      CLOSE_WAIT
> the 53 bytes to be read from the Recv-Q contain:
> 421 Timeout - try typing a little faster next time
> gvfs-ftpd  should close that connection (or read the bytes) but it tries to use it instead.
> The operation gets an error and, depending on which it is, may or may not close the connection and clear the error.
> The   ls ~/.gvfs/FTP*   command  gets the connections in this state (input flushed and output blocked)
> tcp        0      7 192.168.0.20:44879      62.210.182.224:ftp      CLOSE_WAIT
> This is not enough: the ls ~/.gvfs/FTP* command must be issued twice and the connection closes on second time.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/410288
>
> Title:
>   Nautilus does not handle FTP timeouts well
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gvfs/+bug/410288/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.