Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In caja (aka nautilus) on the Mate desktop I have created a "connect to server" bookmark which stores the location of another computer on my network and the appropriate credentials. If I open the file manager and click on the bookmark, the connection is made as expected and the appropriate directory on the remote machine opens in the file manager.
If I then disconnect from the remote machine by:
- clicking on the up arrow like (eject) symbol next to the network connection in the file manager or
- right click on the icon for the remote machine on the Desktop and choose "Unmount"
the connection is or at least seems to be closed.
If I again attempt to connect again I receive an error message
Quote:
Could not open location 'sftp://ken@10.42.0.20/"
Cache invalid, retry (internally handled)
If I close the error dialog and try again I am connected. I have observed this on CentOS 7.6 (with Mate Desktop installed ), Ubuntu Mate 18.04 but not on Linux Mint Mate 19. Mint reconnects every time.
In all cases the file manager is Caja 1.20.2. The machines are on a wired Ethernet network. The issue exists on virtual machines (VMWare Player/Workstation bridged NICs) and physical machines.
Any suggestions where I need to direct my investigation?
I guess it is not the right way to disconnect. It will force the system to disconnect, but nautilus still thinks it is connected.
That's why the first attempt failed.
The connection was made by nautilus (caja) and the eject icon is provided by the same program. If your guess is correct perhaps this is a bug which I should report. That said, I find no way to try a second disconnect before attempting to reconnect. Let me track down what the actual mount point is and try a command line umount.
I certainly hope NOT Actually, I have seen this error situation many times. Other than the Mint machine which "works" I always get the error after disconnecting unless I suspend the virtual machine or the host or if I reboot a physical machine.
The mount point seems to be
Quote:
/run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
If I try to manually un-mount I see this
Code:
[ken@vmProton75 Desktop]$ umount /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
umount: /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken: Permission denied
[ken@vmProton75 Desktop]$ sudo umount /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
[sudo] password for ken:
umount: /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken: block devices not permitted on fs
After searching I learned about gvfs-mount. It will unmount the remote machine
Code:
[ken@vmProton75 Desktop]$ gvfs-mount -u /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
This tool has been deprecated, use 'gio mount' instead.
See 'gio help mount' for more info.
but the issue on reconnecting remains. I tried
Code:
[ken@vmProton75 Desktop]$ gio mount -u /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
and again the remote machine was unmounted. Yet the error still occurs when I attempt to reconnect.
Ok, I just wondering whether there might be some other underlying process that was connected to the remote machine and that was being abnormally halted when you disconnected.
If it's of any help, the error appears to be produced by GVFS' client/gvfsdaemondbus.c:
and appears to be generated if the connection exists in the connection list but is marked as "closed" (the program therefore considers it to have died prematurely - that's my take on it anyway).
After I "close" the connection it seems that gio thinks it is gone
Code:
[ken@vmProton75 ~]$ gio info /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
gio: file:///run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken: Error when getting information for file “/run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken”: No such file or directory
I have not figured out the syntax to mount with gio (or if it is even possible)
Code:
[ken@vmProton75 ~]$ gio mount /run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken
gio: file:///run/user/1000/gvfs/sftp:host=10.42.0.20,user=ken: volume doesn’t implement mount
[ken@vmProton75 ~]$
I will have to look further into that. gio mount should perform a mount I would think.
As to some underlying process running... If the file manager is open and looking at the remote file system (?) I closed caja and then ran the gio unmnount command. Still no luck.
Thanks. I have to admit that this is well beyond my ken so I'm just trying to work with common sense here. You'd probably be best not treating my posts as having any form of authority whatsoever.
However, the problem appears to me to be that the GVFs daemon is not "forgetting" the unmounted filesystem in its cache. It would be nice to find a way to force this removal, if that exists. On the other hand, I did read somewhere that it can be difficult to properly unmount a remote filesystem if you don't have full permission access to the entire remote filesystem (you experienced this when you tried the umount command) and perhaps this is the reason that it is not removed from the cache? I was hoping that the gio mount -u -i command might throw an info message that would reinforce this possibility, but no dice.
On the other hand, perhaps if you can both mount and unmount with gio then, since you are using the same "low-level" command directly for both operations, it might manage the cache aspect better.
Have a search on the web for the error message "volume doesn’t implement mount" (in quotes) - you might find a way to mount that filesystem using gio.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.