hello
im trying to set an rclone.service but keep getting the flowing error:
Failed to start rclone.service: Unit rclone.service is not loaded properly: Invalid argument.
See system logs and ‘systemctl status rclone.service’ for details.
[Unit]
Description=RClone Service
RequiresMountsFor=/home/abc/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount
–config=/home/abc/.rclone.conf
–allow-non-empty
–allow-other
–vfs-cache-mode writes
–max-transfer 750G
ExecStop=/bin/fusermount -uz /home/abc/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
You are missing the remote: and the place you want to mount it to.
ExecStart=/usr/bin/rclone mount
–config=/home/abc/.rclone.conf
–allow-non-empty
–allow-other
–vfs-cache-mode writes
–max-transfer 750G
someremotename: /somelocation
someremotename: /somelocation
gsuite: /home/abc/media/gsuite
like this ?
still get the error?!
[Unit]
Description=RClone Service
RequiresMountsFor=/home/abc/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount
–config=/home/abc/.rclone.conf
–allow-non-empty
–allow-other
–vfs-cache-mode writes
–max-transfer 750G
gsuite: /home/abc/media/gsuite
ExecStop=/bin/fusermount -uz /home/abc/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Start without the service file and run it as just on the command line.
I’m assuming you do have the \ at the end of the lines as well.
Mine looks like this as an example:
felix@gemini:/etc/systemd/system$ cat gmedia-rclone.service
[Unit]
Description=RClone Service
PartOf=gmedia.service
RequiresMountsFor=/data
[Service]
Type=notify
Environment=RCLONE_CONFIG=/data/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount gcrypt: /GD \
--allow-other \
--bind 192.168.1.30 \
--buffer-size 256M \
--dir-cache-time 72h \
--drive-chunk-size 32M \
--log-level INFO \
--log-file /home/felix/logs/rclone.log \
--timeout 1h \
--umask 002 \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off \
--rc
ExecStop=/bin/fusermount -uz /GD
Restart=on-failure
User=felix
Group=felix
[Install]
WantedBy=gmedia.service
i did its working.
this is my file exactly:
[Unit]
Description=RClone Service
RequiresMountsFor=/home/abc/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount
–config=/home/abc/.rclone.conf
–allow-non-empty
–allow-other
–vfs-cache-mode writes
–max-transfer 750G
gsuite: /home/abc/media/gsuite
ExecStop=/bin/fusermount -uz /home/abc/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
[Unit]
Description=RClone Service
RequiresMountsFor=/home/mfmaa03/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount \
–config=/home/mfmaa03/.rclone.conf \
–allow-non-empty \
–allow-other \
--vfs-cache-mode writes \
--max-transfer 750G \
gsuite: /home/mfmaa03/media/gsuite
ExecStop=/bin/fusermount -uz /home/mfmaa03/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Can you run a status on the service to show the error?
felix@gemini:/etc/systemd/system$ systemctl status gmedia-rclone
● gmedia-rclone.service - RClone Service
Loaded: loaded (/etc/systemd/system/gmedia-rclone.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-02-01 09:38:37 EST; 1 day 3h ago
Main PID: 557 (rclone)
Tasks: 30 (limit: 4915)
CGroup: /system.slice/gmedia-rclone.service
└─557 /usr/bin/rclone mount gcrypt: /GD --allow-other --bind 192.168.1.30 --buffer-size 256M --dir-cache-time 72h --drive-chunk-size 32M --log-level INFO --log-file /hom
felix@gemini:/etc/systemd/syste
mfmaa03
February 2, 2019, 11:39pm
9
root@onlines2m:~# systemctl status rclone
● rclone.service - RClone Service
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Feb 02 20:37:38 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
Feb 02 20:51:22 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 02 20:51:22 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Unknown lvalue '–config' in section 'Service'
Feb 02 20:51:22 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
Feb 02 20:51:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 02 20:51:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Unknown lvalue '–config' in section 'Service'
Feb 02 20:51:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
Feb 03 02:40:01 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 02:40:01 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Unknown lvalue '–config' in section 'Service'
Feb 03 02:40:01 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
root@onlines2m:~#
You have a few typos in there, I order it a little easier on the eyes and tested with this:
/usr/bin/rclone mount gsuite: /home/mfmaa03/media/gsuite \
--config /home/mfmaa03/.rclone.conf \
--allow-non-empty \
--allow-other \
--vfs-cache-mode writes \
--max-transfer 750G
I personally don’t like non-empty as it allows mounting over files.
mfmaa03
February 3, 2019, 7:08am
11
stil not working ?!`
root@onlines2m:~# systemctl status rclone
● rclone.service - RClone Service
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Feb 02 20:51:22 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Unknown lvalue '–config' in section 'Service'
Feb 02 20:51:22 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
Feb 02 20:51:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 02 20:51:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Unknown lvalue '–config' in section 'Service'
Feb 02 20:51:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
Feb 03 02:40:01 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 02:40:01 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Unknown lvalue '–config' in section 'Service'
Feb 03 02:40:01 onlines2m systemd[1]: /etc/systemd/system/rclone.service:10: Missing '='.
Feb 03 10:07:20 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Missing '='.
Feb 03 10:07:44 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Missing '='.
root@onlines2m:~#
[Unit]
Description=RClone Service
RequiresMountsFor=/home/mfmaa03/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gsuite: /home/mfmaa03/media/gsuite \
--config /home/mfmaa03/.rclone.conf \
--allow-non-empty \
--allow-other \
--vfs-cache-mode writes \
--max-transfer 750G
ExecStop=/bin/fusermount -uz /home/mfmaa03/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
rclone version shows what?
You need the “ExecStart=” in front of your /usr/bin/rclone etc.
mfmaa03
February 3, 2019, 1:31pm
15
root@onlines2m:~# systemctl status rclone
● rclone.service - RClone Service
Loaded: error (Reason: Invalid argument)
Active: inactive (dead)
Feb 03 16:30:21 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 16:30:21 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Missing '='.
Feb 03 16:30:28 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 16:30:28 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Missing '='.
Feb 03 16:30:31 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 16:30:31 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Missing '='.
Feb 03 16:31:13 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 16:31:13 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Missing '='.
Feb 03 16:31:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:8: Ignoring unknown escape sequences: "\"
Feb 03 16:31:26 onlines2m systemd[1]: /etc/systemd/system/rclone.service:9: Missing '='.
[Unit]
Description=RClone Service
RequiresMountsFor=/home/mfmaa03/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gsuite: /home/mfmaa03/media/gsuite \
--config /home/mfmaa03/.rclone.conf \
--allow-non-empty \
--allow-other \
--vfs-cache-mode writes \
--max-transfer 750G
ExecStop=/bin/fusermount -uz /home/mfmaa03/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
You need to run:
systemctl daemon-reload
after you make changes to the file. If that isn’t working you have a typo somewhere that I cant see as you have an extra space or something as I test with the same file and it works.
Feb 03 08:34:46 gemini systemd[1]: Started RClone Service.
Feb 03 08:34:46 gemini rclone[23640]: 2019/02/03 08:34:46 NOTICE: Config file "/home/mfmaa03/.rclone.conf" not found - using defaults
Feb 03 08:34:46 gemini rclone[23640]: 2019/02/03 08:34:46 Failed to create file system for "gsuite:": didn't find section in config file
Feb 03 08:34:46 gemini systemd[1]: test.service: Main process exited, code=exited, status=1/FAILURE
Feb 03 08:34:46 gemini fusermount[23647]: /bin/fusermount: bad mount point /home/mfmaa03/media/gsuite: No such file or directory
Feb 03 08:34:46 gemini systemd[1]: test.service: Control process exited, code=exited status=1
Feb 03 08:34:46 gemini systemd[1]: test.service: Unit entered failed state.
Feb 03 08:34:46 gemini systemd[1]: test.service: Failed with result 'exit-code'.
My version of your file looks like:
root@gemini:/etc/systemd/system cat test.service
[Unit]
Description=RClone Service
RequiresMountsFor=/home/mfmaa03/media/gsuite
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/bin/rclone mount gsuite: /home/mfmaa03/media/gsuite \
--config /home/mfmaa03/.rclone.conf \
--allow-non-empty \
--allow-other \
--vfs-cache-mode writes \
--max-transfer 750G
ExecStop=/bin/fusermount -uz /home/mfmaa03/media/gsuite
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Mine won’t actually load since I’m missing the config file and the actual mount points.
mfmaa03
February 3, 2019, 1:42pm
17
i have rclone installed on the user not the root can this make any problems ?
I don’t use the root user for rclone but if you want to install as a user, you need to add that to your system file.
User=felix
Group=felix
Those are my user and groups for my system.
You can run as root or non root as it doesn’t matter. The error you have is a typo somewhere.
You can also run journalctl -u rclone
and see the end of the output.
mfmaa03
February 3, 2019, 1:50pm
19
can i attach my rclone.service file so you can see what i did wrong because i can’t find anything wrong ?!