.gvfs: Transport endpoint is not connected

Bug #890647 reported by Mark Andrew Wheadon
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am mounting an SMB share to AS/400 via the GUI (gvfs). Then running a multi-threaded Java program to copy files from the AS/400 to my PC hard disks. The Java program uses pathnames to access the files on the AS/400, e.g. /home/<me>/.gvfs/dira/dirb... All this works fine and it runs for many hours (say 18+). Then the connection is lost. the AS/400 is up the whole time and appears quite accessible.

The really strange thing is that the files and directories on the AS/400 can still be seen and accessed via Nautilus before and after the problem. What doesn't work is the pathname, so my Java program can't use the path, and if I open a terminal and try to cd to .gvfs I get:

cd .gvfs
bash: cd: .gvfs: Transport endpoint is not connected

The only way I can get out of this is to reboot (logging off and on again does not help).

As I have millions (not exaggerating) of files to copy a solution would be really helpful.

I was using 9.10, but upgraded yesterday to 11.10. Both have the same problem in the same way.

Thanks in advance.

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: gvfs 1.10.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Tue Nov 15 11:06:21 2011
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
SourcePackage: gvfs
UpgradeStatus: Upgraded to oneiric on 2011-11-14 (0 days ago)

Revision history for this message
Mark Andrew Wheadon (mark-wheadon) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Vancouverite (sethgilchrist) wrote :

Also reported in the Ubuntu forums: http://ubuntuforums.org/showthread.php?t=1803418

Revision history for this message
tekstr1der (tekstr1der) wrote :

I just ran into this for the first time today on oneiric 11.10.

I've use ~/.gvfs mount point regularly in rsync scripts and _need_ this to be functional.

Any update on this bug?

Revision history for this message
tekstr1der (tekstr1der) wrote :

FYI, a quick search found this workaround for now. No need to log out or reboot.

fusermount -zu ~/.gvfs
/usr/lib/gvfs/gvfs-fuse-daemon ~/.gvfs

Revision history for this message
Dimitry Verkholashin (dimitrygv) wrote :

here is the solution. however, keep in mind in mind it is sort of limp dick - without graphics nothing will kick in:

1) add $HOME/bin to PATH (/etc/environment)

2) make script bazbaz.sh and make it executable

#!/bin/bash
SOCKET=.gvfs
PIDOF=`pidof gvfs-fuse-daemon`
RETVAL=$?

if [ "$RETVAL" -eq 1 ]; then
  echo "Evaluating variables"
  eval `/usr/lib/gvfs/gvfs-fuse-daemon $HOME/.gvfs`
else
  echo "you be fortune."
fi

3) add to .bashrc

$HOME/bin/seahorse-agent-start.sh

it's been partially fused by the following solution:
http://blog.schiessle.org/2009/05/12/fedora-and-gpg-agent/

the solution discusses hogs and hoops of lost sessions and what happens to the missing socks(org.gnome.Seahorse and org.freedesktop.Secrets
)

it took me a while to figure it out and i feel it should be public

Revision history for this message
Dimitry Verkholashin (dimitrygv) wrote :

i was very excited to add this and that is why i posted sort of half baked solution hoping that you can figure out the rest.
to be fair I have to add the complete (working oob solution) rather than just variable evaluation.

1) the existing mount point needs to be disconnected. because it is session based you want to add unmount line to Default gdm PostSession and below is one of the ways to do accomplish it:

cat << EOF | sudo tee /etc/gdm/PostSession/Default >/dev/null
#!/bin/sh

/bin/fusermount -zu "$HOME/.gvfs" 1>/dev/null 2>&1 || true

exit 0
EOF

2) create ~/bin directory (mkdir ~/bin), add this directory to search path in /etc/environment so it looks roughly like this:
PATH=/home/<username>/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/<username>/.local/bin

3) .bashrc gets the following entry
$HOME/bin/gvfs-daemon-start

4) make gvfs-daemon-start executable and the script roughly it looks like this:

#!/bin/bash
MNT=.gvfs
PIDOF=`pidof gvfs-fuse-daemon`
RETVAL=$?

if [ "$RETVAL" -eq 1 ]; then
  # echo "Mounting $MNT"
  log_daemon_msg "Mouting $MNT"
  /usr/lib/gvfs//gvfs-fuse-daemon ~/$MNT
  log_end_msg 0
else
  echo "you be fortune."
fi

5)log off the session, log back in and make necessary adjustments if you feel like it.

cheers

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.