Rclone fails on reboot - as well with mergerfs

Hi guys.

I have had some problems with my Intel NUC , so I reinstalled my entire setup.

OS: Im running Ubuntu Desktop 18.04LTS .

Rclone version:
rclone v1.53.1

  • os/arch: linux/amd64

  • go version: go1.15

I have Torguard Openvpn install which connect on reboot .
But somehow my rclone won't start and come with errors.

rclonemount.service - RClone Service

Loaded: loaded (/etc/systemd/system/rclonemount.service; enabled; vendor preset: enabled)

Active: failed (Result: exit-code) since Sat 2020-10-24 12:07:10 CEST; 32s ago

Process: 1458 ExecStart=/usr/bin/rclone mount --allow-other --dir-cache-time 1000h --log-level INFO --log-file /home/plex/logs/rclone.log --bwlimit-file 16M Googlecrypt: /home/plex/mnt

Main PID: 1458 (code=exited, status=1/FAILURE)

Oct 24 12:07:09 Intelnuc systemd[1]: Starting RClone Service...

Oct 24 12:07:10 Intelnuc systemd[1]: rclonemount.service: Main process exited, code=exited, status=1/FAILURE

Oct 24 12:07:10 Intelnuc systemd[1]: rclonemount.service: Failed with result 'exit-code'.

Oct 24 12:07:10 Intelnuc systemd[1]: Failed to start RClone Service.

rclonemount.service

[Unit]

Description=RClone Service

After=network-online.target

Wants=network-online.target

[Service]

Type=notify

ExecStart=/usr/bin/rclone mount --allow-other --dir-cache-time 1000h --log-level INFO --log-file /home/plex/logs/rclone.log --bwlimit-file 16M Googlecrypt: /home/plex/mnt

ExecStop=/bin/fusermount -uz /home/plex/mnt

Restart=on-abort

User=plex

Group=plex

[Install]

WantedBy=default.target

Mergerfs won't run because the mount isn't present.

So I restart rclone manually and its running, and after that I restart mergerfs.

Mergerfs is running, but have an error though:

mergerfs.service - Megerfs Service
Loaded: loaded (/etc/systemd/system/mergerfs.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-10-24 12:09:43 CEST; 32s ago
Process: 2545 ExecStop=/home/plex/mnt (code=exited, status=203/EXEC)
Process: 2765 ExecStart=/usr/bin/mergerfs /home/plex/move:/home/plex/mnt /home/plex/media -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=p
Main PID: 2770 (mergerfs)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/mergerfs.service
└─2770 /usr/bin/mergerfs /home/plex/move:/home/plex/mnt /home/plex/media -o rw,use_ino,allow_other,func.getattr=newest,category.action=all,category.create=ff,cache.files=partial,dropcacheonclose=true

Oct 24 12:09:43 Intelnuc systemd[1]: Starting Megerfs Service...
Oct 24 12:09:43 Intelnuc systemd[1]: Started Megerfs Service.

Maybe you can give me some pointers @Animosity022 ?

Thanks

Morphy

What's the error in the rclone log?

plex@Intelnuc:~/logs$ cat rclone.log

2020/10/24 00:47:30 Failed to create file system for "Googlecrypt:": failed to make remote "Google:Private" to wrap: 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 xxxxxxx:443: connect: invalid argument

2020/10/24 00:50:01 INFO : Signal received: terminated

2020/10/24 00:50:01 INFO : Exiting...

2020/10/24 00:55:34 Failed to create file system for "Googlecrypt:": failed to make remote "Google:Private" to wrap: 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 [xxxxx]:443: connect: no route to host

2020/10/24 01:04:20 Failed to create file system for "Googlecrypt:": failed to make remote "Google:Private" to wrap: 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 xxxxx:443: connect: invalid argument

2020/10/24 12:06:39 INFO : Signal received: terminated

2020/10/24 12:06:39 INFO : Exiting...

2020/10/24 12:07:10 Failed to create file system for "Googlecrypt:": failed to make remote "Google:Private" to wrap: 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 xxxxxx:443: connect: invalid argument

Looks like you don't have a network when you are starting up the service.

Is there anyway to delay rclone to start ?

Do you know what causes the exit error on /home/plex/mnt on merger? Its running, but the error is present if I do a systemctl status mergerfs.service

I have network-online setup on my Ubuntu box:

● network-online.target - Network is Online
     Loaded: loaded (/lib/systemd/system/network-online.target; static; vendor preset: enabled)
     Active: active since Thu 2020-10-22 13:49:58 EDT; 1 day 17h ago
       Docs: man:systemd.special(7)
             https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

Oct 22 13:49:58 gemini systemd[1]: Reached target Network is Online.

Hmm I have that one as well :confused: ..

● network-online.target - Network is Online
Loaded: loaded (/lib/systemd/system/network-online.target; static; vendor preset: enabled)
Active: active since Sat 2020-10-24 12:07:09 CEST; 1h 16min ago
Docs: man:systemd.special(7)
https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget

Oct 24 12:07:09 Intelnuc systemd[1]: Reached target Network is Online.

Should I use multi-user.target instead of default.target ?

Oh the error is gone in mergerfs - don't know how . Haven't made any changes: See :slight_smile:

mergerfs.service - Megerfs Service
Loaded: loaded (/etc/systemd/system/mergerfs.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-10-24 12:09:43 CEST; 1h 18min ago
Main PID: 2770 (mergerfs)
Tasks: 5 (limit: 4915)
CGroup: /system.slice/mergerfs.service
└─2770 /usr/bin/mergerfs /home/plex/move:/home/plex/mnt /home/plex/media -o rw,use_ino,allow_other,func.getattr=newest,category.

Oct 24 12:09:43 Intelnuc systemd[1]: Starting Megerfs Service...
Oct 24 12:09:43 Intelnuc systemd[1]: Started Megerfs Service.