Rclone dropbox service will not start/mount on reboot/startup.
What is your rclone version (output from rclone version)
rclone v1.52.1
os/arch: linux/amd64
go version: go1.14.4
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 18.04.5
Which cloud storage system are you using? (eg Google Drive)
dropbox
The command you were trying to run (eg rclone copy /tmp remote:tmp)
mount on startup
The rclone config contents with secrets removed.
[gdrive]
type = drive
scope = drive
token = {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx}
[dbremote]
type = dropbox
token = {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
A log from the command with the -vv flag
Jan 22 18:42:30 Fermi-Plex systemd[1]: Starting Mount and cache dropbox drive to /media/dropbox...
Jan 22 18:42:30 Fermi-Plex systemd[1]: Started Mount and cache dropbox drive to /media/dropbox.
Jan 22 18:42:30 Fermi-Plex systemd[1]: dbrclone.service: Main process exited, code=exited, status=1/FAILURE
Jan 22 18:42:30 Fermi-Plex systemd[1]: dbrclone.service: Failed with result 'exit-code'.
Jan 22 18:42:30 Fermi-Plex systemd[1]: dbrclone.service: Service hold-off time over, scheduling restart.
Jan 22 18:42:30 Fermi-Plex systemd[1]: dbrclone.service: Scheduled restart job, restart counter is at 1.
Jan 22 18:42:30 Fermi-Plex systemd[1]: Stopped Mount and cache dropbox drive to /media/dropbox.
in the forum almost 100% of the time, -allow-non-empty is not a good idea
also, some times you have to edit a fuse config file to enable that.
i would use that systemd template from that website, just change the very bare minimum to get it working, use as little flags as possible.
once working, then add more flags as needed.
I added that to my config - nothing at all happens when I run the service and - weirdly - nothing new in the logs. I'll keep trying stuff on my own - this isn't your problem - but if you have any ideas I'm all ears.
Weirdly, I don't have a conflict when I run from the command line. Maybe when it's run from the command line it just finds an empty port? None the less, when I put this in the command line, it works:
sudo rclone mount dbremote:/PMS /media/dropbox --allow-other --daemon --rc-addr=localhost:5573
I put it in the config and get this error.
Process: 2885 ExecStart=/usr/bin/rclone mount --rc --rc-addr= :5573 (code=exited, status=1/FAILURE)
Sorry, not meaning to be frustrating. An automated program built an rclone service for me for gdrive. It works perfectly so I have been trying to copy and just change the essentials for dropbox. That's why all the complicated extras - I'm working off someone elses working rclone.service file.
I'll try to make one from scratch based on what you linked me.
Don't really understand it, just know that it all works.
When I work off the template you linked, there are references to settings with regard to gdrive and the API. But I am using dropbox. How do I know how to set/adjust those things?
# Please set this to your own value below
--user-agent randomappname101 \
I haven't a clue what that means. Lots of these templates assume gdrive and assume I'm going to know how to set these variables - that's why I've been avoiding using them.
You unfortunately pick a really interesting choice and a super complex one that won't work well with Dropbox.
I'd avoid running things as root as generally it's best to run as a user.
simple should be notify
That does nothing unless you are custom compiling a kernel.
Those flags are more Google Drive related.
This one is particularly bad for Dropbox as it's not a polling remote so any change make outside the mount takes 160 hours to show up.
Not sure what the goal here was as this makes super small chunk range requests and would be slow to start until it buffered up.
KillMode=none
should get added.
That refers to this:
--user-agent string Set the user-agent to a specified string. The default is rclone/ version (default "rclone/v1.53.4")
At one point, Google throttled based on user agent and that was many moons again. If you aren't using Google (and I'm pretty sure even myself) can remove it.
I appreciate all the help here. I've tried to vastly simplify this service and to follow your examples.
So you don't have to go read the previous posts: I have a WORKING gdrive mount on this same server, that's taking up the default port. I want an additional service to mount a dropbox drive on startup. The grive config was built (automatically) by a third party program. It's weird and complicated but it works - though it can't be copied and modified to work with dropbox, it seems.
Here's what my 2nd service (the one to mount dropbox) looks like now (it's not working):
[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/media/dropbox
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
Environment=RCLONE_CONFIG=/home/kilgoretrout/.config/rclone/rclone.conf
ExecStart=/usr/bin/rclone mount dbremote:/PMS \
--allow-other \
# This is the default port it runs on
--rc-addr :5573 \
# no-auth is used as no one else uses my server and it is not a shared seedbox
--rc-no-auth \
ExecStop=/bin/fusermount -u /media/dropbox
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
Jan 26 14:19:05 Fermi-Plex systemd[1]: /etc/systemd/system/dbrclone.service:15: Missing '='.
Jan 26 14:19:27 Fermi-Plex systemd[1]: /etc/systemd/system/dbrclone.service:15: Missing '='.
I'm no coder but it appears to tell me I'm missing an '=' in line 15. But I cannot figure out what that means. I'm using a cut and paste from the template you linked.