Systemd not working

What is the problem you are having with rclone?

systemd service not working

What is your rclone version (output from rclone version)

1.52.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

CentOS 7

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

systemctl start rclone / journalctl -u rclone

The rclone config contents with secrets removed.

[gdriveadam]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = {"access_token":"XXX","toke$
team_drive = XXX

A log from the command with the -vv flag

Jun 11 02:46:52 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:46:52 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 02:47:33 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:47:33 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 02:49:21 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:49:21 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
-- Reboot --
Jun 11 02:51:42 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:51:42 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 02:53:41 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:53:41 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 02:55:22 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:55:22 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
-- Reboot --
Jun 11 02:58:22 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 02:58:22 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 03:37:00 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 03:37:00 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 03:42:31 CentOS-81-64-minimal systemd[1]: rclone.service: Starting requested but asserts failed.
Jun 11 03:42:31 CentOS-81-64-minimal systemd[1]: Assertion failed for Google Drive (rclone).
Jun 11 03:43:37 CentOS-81-64-minimal systemd[1]: /etc/systemd/system/rclone.service:4: AssertPathIsDirectory= path is not absolute, ignoring: ~/emby/media
Jun 11 03:43:45 CentOS-81-64-minimal systemd[1]: /etc/systemd/system/rclone.service:4: AssertPathIsDirectory= path is not absolute, ignoring: ~/emby/media
Jun 11 03:43:45 CentOS-81-64-minimal systemd[1]: Started Google Drive (rclone).

That looks like your error. Take a look at your systemd config.

# /etc/systemd/system/rclone.service
[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/media/emby
After=plexdrive.service

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
    --config=/root/.config/rclone/rclone.conf \
--allow-other \
--buffer-size= 256M \
--fast-list \

ExecStop=/bin/fusermount -uz /media/emby
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

This is my systemd config

There's no destination to mount defined nor a source. The command is wrong.

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gdriveadam: /media/emby
--config=/root/.config/rclone/rclone.conf
--allow-other
--buffer-size= 256M
--fast-list \

You probably want something like above...

Sorry. I thought it copy/pasted my newer one:

Description=RClone Service
RequiresMountsFor= /media/emby
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gdriveadam: /media/emby \
--config /home/nodrog742/.config/rclone/rclone.conf \
--allow-non-empty \
--allow-other \
--vfs-cache-mode writes \
--max-transfer 750G

ExecStop=/bin/fusermount -uz /media/emby
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

What are you trying to do with that?

You should change that to notify instead of simple.

You always want your mount location to be empty to prevent over mounting. You should remove this.

You should add a --log-file /tmp/rclone.log as well so you can get a log file.

Make those changes and reload systemd, start share the output of the rclone.log and the journalctl of the service.

It looks like I finally got it!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.