Rclone mount on boot ubuntu 18.04 not working for me

Can you please post your corrected service file and the updated log? It doesn't seem from the log you changed the file.

still no log file in /tmp

# Rclone mount on boot ( service file template - add aditional rclone parameters )
# Copy file to: /etc/systemd/system
# Set remote name (current acdcrypt), path to mount and User,Group (current plex)
# Register new service by typing:
# sudo systemctl daemon-reload
# sudo systemctl enable rclone-mount.service
# systemctl start rclone-mount.service
# systemctl enable NetworkManager-wait-online.service
# Usage:
# To unmount drive use
# systemctl stop rclone-mount.service
# To mount use:
# systemctl start rclone-mount.service

[Unit]
Description=rclone backup FUSE mount
Documentation=http://rclone.org/docs/
#AssertPathIsDirectory=/media/secure
After=multi-user.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount \
        --config=/root/.config/rclone/rclone.conf \
        --allow-other \
        --cache-tmp-upload-path=/tmp/rclone/upload \
        --cache-chunk-path=/tmp/rclone/chunks \
        --cache-workers=8 \
        --cache-writes \
        --cache-dir=/tmp/rclone/vfs \
        --cache-db-path=/tmp/rclone/db \
        --no-modtime \
        --drive-use-trash \
        --stats=0 \
        --dir-cache-time=60m \
        --log-level INFO \
        --log-file /tmp/rclone.log \
        --cache-info-age=60m secure: /media/secure
ExecStop=/usr/bin/fusermount -uz /media/secure
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target

What's the systemctl status output when you try to start it?

Job for rclone-mount.service failed because the control process exited with error code.                                                                      
See "systemctl status rclone-mount.service" and "journalctl -xe" for details. 

Can you please run:

systemctl status rclone-mount.service

And share the output.

ops (removed slur)

not mutch

● rclone-mount.service - rclone backup FUSE mount
   Loaded: loaded (/etc/systemd/system/rclone-mount.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Tue 2019-11-19 12:24:17 UTC; 3s ago
     Docs: http://rclone.org/docs/
  Process: 39557 ExecStart=/usr/bin/rclone mount --config=/root/.config/rclone/rclone.conf --allow-other --cache-tmp-upload-path=/tmp/rclone/upload --cache-
 Main PID: 39557 (code=exited, status=1/FAILURE)

Nov 19 12:24:17 xenorchestra systemd[1]: Failed to start rclone backup FUSE mount.

Please do not post any slurs.

Can you please share.

journalctl -u rclone-mount -b

more of the same

Nov 13 14:37:00 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:22: Failed to parse service type, ignoring: 
Nov 13 14:37:00 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:24: Unknown lvalue '--cache-info-age' in section 'Service'
Nov 13 14:37:00 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:30: Unknown lvalue 'Wants' in section 'Install'
Nov 13 14:58:50 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:22: Failed to parse service type, ignoring: 
Nov 13 14:58:50 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:24: Unknown lvalue '--cache-info-age' in section 'Service'
Nov 13 14:58:50 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:30: Unknown lvalue 'Wants' in section 'Install'
Nov 19 09:21:20 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:22: Failed to parse service type, ignoring: 
Nov 19 09:21:20 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:29: Unknown lvalue 'Wants' in section 'Install'
Nov 19 09:21:48 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:22: Failed to parse service type, ignoring: 
Nov 19 09:21:48 xenorchestra systemd[1]: /etc/systemd/system/rclone-mount.service:29: Unknown lvalue 'Wants' in section 'Install'
Nov 19 12:23:34 xenorchestra systemd[1]: Starting rclone backup FUSE mount...
Nov 19 12:23:35 xenorchestra systemd[1]: rclone-mount.service: Main process exited, code=exited, status=1/FAILURE
Nov 19 12:23:35 xenorchestra systemd[1]: rclone-mount.service: Failed with result 'exit-code'.
Nov 19 12:23:35 xenorchestra systemd[1]: Failed to start rclone backup FUSE mount.
Nov 19 12:23:45 xenorchestra systemd[1]: rclone-mount.service: Service hold-off time over, scheduling restart.
Nov 19 12:23:45 xenorchestra systemd[1]: rclone-mount.service: Scheduled restart job, restart counter is at 1.
Nov 19 12:23:45 xenorchestra systemd[1]: Stopped rclone backup FUSE mount.
Nov 19 12:23:45 xenorchestra systemd[1]: Starting rclone backup FUSE mount...
Nov 19 12:23:45 xenorchestra systemd[1]: rclone-mount.service: Main process exited, code=exited, status=1/FAILURE
Nov 19 12:23:45 xenorchestra systemd[1]: rclone-mount.service: Failed with result 'exit-code'.
Nov 19 12:23:45 xenorchestra systemd[1]: Failed to start rclone backup FUSE mount.
Nov 19 12:23:55 xenorchestra systemd[1]: rclone-mount.service: Service hold-off time over, scheduling restart.
Nov 19 12:23:55 xenorchestra systemd[1]: rclone-mount.service: Scheduled restart job, restart counter is at 2.
Nov 19 12:23:55 xenorchestra systemd[1]: Stopped rclone backup FUSE mount.
Nov 19 12:23:55 xenorchestra systemd[1]: Starting rclone backup FUSE mount...
Nov 19 12:23:56 xenorchestra systemd[1]: rclone-mount.service: Main process exited, code=exited, status=1/FAILURE
Nov 19 12:23:56 xenorchestra systemd[1]: rclone-mount.service: Failed with result 'exit-code'.

i just need it to mount nothing special
is it not easier to give me a working config

After you make changes to the file, you need to run:

systemctl daemon-reload
systemctl start rclone-mount

Once that runs, run the same journal command if it doesn't start.

There isn't a 'working config' as your system config is unique on how you want it setup.

Mine is here but I don't use the cache backend.

felix@gemini:/etc/systemd/system$ cat rclone.service
[Unit]
Description=RClone Service
Wants=network-online.target
After=network-online.target

[Service]
Type=notify
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount gcrypt: /GD \
--allow-other \
--buffer-size 256M \
--dir-cache-time 1000h \
--log-level INFO \
--log-file /opt/rclone/logs/rclone.log \
--poll-interval 15s \
--timeout 1h \
--umask 002 \
--rc \
--rc-addr 127.0.0.1:5572
ExecStop=/bin/fusermount -uz /GD
Restart=on-failure
User=felix
Group=felix

[Install]
WantedBy=multi-user.target
1 Like

the log works

2019/11/26 12:47:20 NOTICE: Serving remote control on http://127.0.0.1:5572/
2019/11/26 12:47:20 NOTICE: Config file "/opt/rclone/rclone.conf" not found - using defaults
2019/11/26 12:47:20 Failed to create file system for "secure:": didn't find section in config file

i have tide removing

--rc \
--rc-addr 127.0.0.1:5572

but this broke everything

full config

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

[Service]
Type=notify
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
KillMode=none
RestartSec=5
ExecStart=/usr/bin/rclone mount secure: /mnt/secure \
--allow-other \
--buffer-size 256M \
--dir-cache-time 1000h \
--log-level INFO \
--log-file /opt/rclone/logs/rclone.log \
--poll-interval 15s \
--timeout 1h \
--umask 002 \
--rc \
--rc-addr 127.0.0.1:5572
ExecStop=/bin/fusermount -uz /GD
Restart=on-failure

[Install]
WantedBy=multi-user.target

My config is an example as that's how my system is configured.

As the user you are running, if you are using the defaults, you can remove that line.

felix@gemini:~$ rclone config file
Configuration file is stored at:
/opt/rclone/rclone.conf

My config file points to the location there. Your config probably points to the defaults.

You'd want to update it to match your setup.

1 Like

it work

 rclone-mount.service - RClone Service
   Loaded: loaded (/etc/systemd/system/rclone-mount.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2019-11-26 13:36:00 UTC; 3min 19s ago
 Main PID: 87243 (rclone)
    Tasks: 15 (limit: 4623)
   CGroup: /system.slice/rclone-mount.service
           └─87243 /usr/bin/rclone mount secure: /mnt/secure --allow-other --buffer-size 256M --dir-cache-time 1000h --log-level INFO --log-file /opt/rclone

Nov 26 13:35:59 xenorchestra systemd[1]: Starting RClone Service...
Nov 26 13:36:00 xenorchestra systemd[1]: Started RClone Service.

ore not
Xen Orchestra gives me a
EBADF: bad file descriptor, write

Not a clue what that means.

If you have a rclone issue, you need to be more descriptive in what the issue and what you want help with.

it means
Bad file descriptor; for example, I/O on a descriptor that has been closed or reading from a descriptor open only for writing (or vice versa).

and i found this bug report

You linked a closed and fixed issue.

If you have a new item, you'd need to include more information of what you are running a debug log. Basically all the information in the question template.

If this issue is solved, it's probably best to open a new topic if it isn't related to this.

that is a good idea

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