You are not logged in.
Hello.
I wrote this Systemd service that I would like to run as normal user.
[Unit]
Description=Google Drive mount
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/bin/google-drive-ocamlfuse -m '/home/egidio/Google Drive'
ExecStop=/usr/bin/fusermount -u '/home/egidio/Google Drive'
[Install]
WantedBy=default.target
I start it and everything seems fine, but when I try to access the mounted point, I get this error.
[egidio@egidiolaptop user]$ ls -la ~/Google\ Drive
ls: cannot access /home/egidio/Google Drive: Transport endpoint is not connected
If I run the ExecStart command manually everything works perfectly.
Can you please help me?
Last edited by Aegidius (2015-05-13 18:17:12)
Offline
Not a Sysadmin issue, moving to NC...
Offline
How (specifically) did you enable the service?
Is there any interesting information left in the journal after it tries to start?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I enabled it with
systemctl --user enable googledrive.service
Well, in journalct I can see these lines, but it's starts correctly executing /usr/bin/google-drive-ocamlfuse -m '/home/egidio/Google Drive' directly.
May 11 22:39:19 egidiolaptop systemd[756]: Started Google Drive mount.
May 11 22:39:19 egidiolaptop systemd[756]: Starting Google Drive mount...
May 11 22:39:19 egidiolaptop fusermount[17879]: /usr/bin/fusermount: failed to
May 11 22:39:19 egidiolaptop systemd[756]: googledrive.service: control process
May 11 22:39:19 egidiolaptop systemd[756]: Unit googledrive.service entered fai
May 11 22:39:19 egidiolaptop systemd[756]: googledrive.service failed.
Offline
Okay, there are clues in there, but journalctl truncated the output -- fusermount failed to do something there is a journalctl switch that tells it not to truncate lines, but I am not in front of a linux machine right now, and I don't recall the exact incantation.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
I think the truncation is a function of the pager rather than journalctl, so maybe run it with -a and --no-pager?
Here are
See the entry for "--no-full, --full, -l" in man journalctl for more details.
Regards,
Offline
This is the output of journalctl --all
May 12 20:55:04 egidiolaptop /usr/lib/gdm/gdm-x-session[19552]: Activating service name='org.gnome.Terminal'
May 12 20:55:04 egidiolaptop /usr/lib/gdm/gdm-x-session[19552]: Successfully activated service 'org.gnome.Terminal'
May 12 20:55:26 egidiolaptop gnome-session[19563]: 1431456926458 addons.update-checker WARN Update manifest for {972ce4c6-7e08-4474-a285-3208198ce6fd} did not contain an updates property
May 12 20:56:03 egidiolaptop systemd[19544]: [/home/egidio/.config/systemd/user/googledrive.service:2] Unknown lvalue 'Type' in section 'Unit'
May 12 20:56:03 egidiolaptop systemd[19544]: Cannot add dependency job for unit network-online.target, ignoring: Unit network-online.target failed to load: No such file or directory.
May 12 20:56:03 egidiolaptop systemd[19544]: Created slice -.slice.
May 12 20:56:03 egidiolaptop systemd[19544]: Starting -.slice.
May 12 20:56:03 egidiolaptop systemd[19544]: Started Google Drive mount.
May 12 20:56:03 egidiolaptop systemd[19544]: Starting Google Drive mount...
May 12 20:56:03 egidiolaptop fusermount[20547]: /usr/bin/fusermount: failed to unmount /home/egidio/Google Drive: Device or resource busy
May 12 20:56:03 egidiolaptop systemd[19544]: googledrive.service: control process exited, code=exited status=1
May 12 20:56:03 egidiolaptop systemd[19544]: Unit googledrive.service entered failed state.
May 12 20:56:03 egidiolaptop systemd[19544]: googledrive.service failed.
Offline
Does it actually fork? Or is it more like a normal mount command that exits after the filesystem has been mounted? In that case Type=oneshot with RemainAfterExit=yes would be more appropriate.
Offline