rclone: systemctl can't auto mount after version 1.50 when boot. (it's normal by manual exec.)

What is your rclone version (output from rclone version)

I have tested version 1.49.5 is normal. version after 1.51.0 has this issue. I don’t change any settings below, just change the version of rclone binary file .

Which OS you are using and how many bits

fedora 33

Which cloud storage system are you using? (e.g. Google Drive)

Google Drive

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

/usr/local/bin/rclone mount Google_Drive:/ /home/jason/Google_Drive --vfs-cache-mode full --default-permissions --allow-non-empty --daemon --allow-other --config /home/jason/.config/rclone/rclone.conf

rclone.service - rclone Loaded: loaded (/etc/systemd/system/rclone.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2020-11-22 01:52:08 CST; 58s ago Process: 1026 ExecStart=/usr/local/bin/rclone mount Google_Drive:/ /home/jason/Google_Drive --vfs-cache-mode full --default-permissions --allow-non-empty --daemon --allow-other --config /home/jason/.config/rclone/rclone.conf (code=exited, status=1/FAILURE) CPU: 53ms

11月 22 01:52:08 coding.jason systemd[1]: Starting rclone… 11月 22 01:52:08 coding.jason rclone[1026]: 2020/11/22 01:52:08 Failed to create file system for “Google_Drive:/”: couldn’t find root directory ID: Get “https://www.googleapis.com/drive/v3/files/root?alt=json&fields=id&prettyPrint=false&supportsAllDrives=true”: dial tcp: lookup www.googleapis.com on 127.0.0.53:53: server misbehaving 11月 22 01:52:08 coding.jason systemd[1]: rclone.service: Control process exited, code=exited, status=1/FAILURE 11月 22 01:52:08 coding.jason systemd[1]: rclone.service: Failed with result ‘exit-code’. 11月 22 01:52:08 coding.jason systemd[1]: Failed to start rclone.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 27 (14 by maintainers)

Most upvoted comments

--allow-other \ followed by empty line is unclean

@jjasoncool Please post here your final config after monitoring for some time in prod (especially boots). It’s gonna help others. Thanks

neofetch /:-------------:\ jason@coding.jason :-------------------:: ------------------ :-----------/shhOHbmp—:\ OS: Fedora 33 (Thirty Three) x86_64 /-----------omMMMNNNMMD —: Kernel: 5.9.10-200.fc33.x86_64 :-----------sMMMMNMNMP. —: Uptime: 10 mins :-----------:MMMdP------- —\ Packages: 2318 (rpm) ,------------:MMMd-------- —: Shell: bash 5.0.17 :------------:MMMd------- .—: Resolution: 1920x1080, 1920x1080, 2560x144 :---- oNMMMMMMMMMNho .----: DE: Cinnamon 4.6.7 :-- .+shhhMMMmhhy++ .------/ WM: Mutter (Muffin) :- -------:MMMd--------------: WM Theme: qob (Mint-Y-Dark) :- --------/MMMd-------------; Theme: Mint-Y-Dark-Aqua [GTK2/3] :- ------/hMMMy------------: Icons: Mint-Y-Aqua [GTK2/3] :-- :dMNdhhdNMMNo------------; Terminal: gnome-terminal :—:sdNMMMMNds:------------: CPU: AMD Ryzen 7 2700 (16) @ 4.000GHz :------:😕/:-------------:: GPU: NVIDIA GeForce GTX 1070 Ti :---------------------😕/ Memory: 2873MiB / 32069MiB

[Unit]
Description=RClone Service
After=network-online.target
Wants=network-online.target

[Service]
User=jason
Group=jason
Type=notify
Restart=1

ExecStart=/usr/local/bin/rclone \
mount Google_Drive:/ \
/home/jason/Google_Drive \
--config /home/jason/.config/rclone/rclone.conf \
--vfs-cache-mode full \
--default-permissions \
--allow-non-empty \
--allow-other

ExecStop=/usr/bin/fusermount -uz /home/jason/Google_Drive

[Install]
WantedBy=multi-user.target

@jjasoncool Please post here your final config after monitoring for some time in prod (especially boots). It’s gonna help others. Thanks

I suggest in the document should write --daemon flag will need to change service Type=forking

And recommend against it 😃

  1. I see the problem here:
dial tcp: lookup www.googleapis.com on 127.0.0.53:53: server misbehaving

Either your mount starts slightly before the network is up (configured, finished DHCP if any) or systemd-resolved is slow starting / misbehaving.

  1. Make sure you have this in your /etc/systemd/system/rclone.service file:
[Unit]
....
After=network-online.target
Wants=network-online.target
  1. Please paste here your .service file for further analysis. Redact Environment= stanzas with secrets if any.