Big problem - the gdrive.service service is inactive.(dead)

What is the problem you are having with rclone?

the gdrive.service service is inactive. Assertion failed.

Run the command 'rclone version' and share the full output of the command.

rclone v1.53.3-DEV
os/arch: linux/amd64
go version: go1.15.9

Do not just type in a version number. Run the command and share the full output.
root@proxmox:/etc/systemd/system# systemctl status gdrive.service
● gdrive.service - rclone for abc
Loaded: loaded (/etc/systemd/system/gdrive.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Assert: start assertion failed at Mon 2024-04-15 17:54:11 CEST; 12h ago
AssertPathIsDirectory=/mnt/gdrive/proxmox_backup was not met

Apr 15 13:50:19 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 15 13:50:19 proxmox systemd[1]: Assertion failed for rclone for tdata.
Apr 15 14:02:11 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 15 14:02:11 proxmox systemd[1]: Assertion failed for rclone for tdata.
Apr 15 17:53:28 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 15 17:53:28 proxmox systemd[1]: Assertion failed for rclone for tdata.
Apr 15 17:53:58 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 15 17:53:58 proxmox systemd[1]: Assertion failed for rclone for tdata.
Apr 15 17:54:11 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 15 17:54:11 proxmox systemd[1]: Assertion failed for rclone for tdata.

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> No

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 gdrive.service

systemctl restart gdrive.service

root@proxmox:/etc/systemd/system# systemctl start gdrive.service
Assertion failed on job for gdrive.service.

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

I can't update rclone because I've errors.

Paste config here

A log from the command that you were trying to run with the -vv flag

Paste  log here

gdrive.service:
[Unit]
Description=rclone for tdata
AssertPathIsDirectory=/mnt/gdrive/proxmox_backup
After=networking.service

[Service]
Type=simple
ExecStart=rclone mount --config=/root/.config/rclone/rclone.conf tdata: /mnt/gdrive/proxmox_backup --allow-other --cache-db-purge --poll>
ExecStop=/bin/fusermount -u /mnt/gdrive/proxmox_backup
Restart=always
RestartSec=10

[Install]
WantedBy=default.target

You should add the -vv flag to the mount command that's inside the service file, then try to restart the service, and then paste the rclone log.

It would be also useful to look at and perhaps paste the systemd log for the gdrive.service, you can obtain this like so:

journalctl -u gdrive

EDIT: It could be that the mount point is busy or has crashed you can try to unmount it manually, then restart the service.

Before any troubleshooting you should first stop using years old version of rclone. Many things changed since v1.53.3 was released in 2020.

1 Like

Ok, when I add -vv flag and then try to restart gdrive.service I have:

root@proxmox:/etc/systemd/system# systemctl restart gdrive.service
Warning: The unit file, source configuration file or drop-ins of gdrive.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Assertion failed on job for gdrive.service.

Should I necessarily use systemctl daemon-reload now? Is it safe for all Proxmox?

I understand that you advise to completely remove rclone and install again, right? I installed this month using this manual: https://www.youtube.com/watch?v=FQuMFrazK1Y

Do you have the correct rclone installation instructions?

Remove your distro version (you can complain to your Linux maintainers why they do not update it):

sudo apt remove rclone

Install the latest one directly from rclone site:

sudo -v ; curl https://rclone.org/install.sh | sudo bash

I will try as you advise, throw away the old version, install the one you are writing about according to the command you provided.

One more thing - I noticed problems after restarting the physical server running proxmox and rclone. It was OK until the restart. Is there anything I can do to make rclone remember all the settings after restarting the server?

Ps. I have this operation system on my physical Dell server

root@proxmox:/etc/systemd/system# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="Debian -- User Support"
BUG_REPORT_URL="https://bugs.debian.org/"

Not sure what you are talking about:) All settings are specified as command line flags or env variables.

From your original post it looks that it is not rclone problem but how you use systemd.

With latest rclone post all details including your systemd service file and somebody will try to help.

It turns out that the problem of backups not taking place and the rclone mechanism being damaged after restarting the server concerns the old version that I still have.

Moreover, what is interesting - when I connect rclone to proxmox, gdrive shows the wrong disk capacity as it should (the local disk, not the capacity of Google Drive). I will let you know how the situation is after reinstalling rclone.

When I try to install from you command terminal show me this...

root@proxmox:~# curl https://rclone.org/install.sh
#!/usr/bin/env bash

error codes

0 - exited without problems

1 - parameters not supported were used or some unexpected error occurred

2 - OS not supported by this script

3 - installed version of rclone is up to date

4 - supported unzip tools are not available

set -e

#when adding a tool to the list make sure to also add its corresponding command further in the script
unzip_tools_list=('unzip' '7z' 'busybox')

usage() { echo "Usage: sudo -v ; curl https://rclone.org/install.sh | sudo bash [-s beta]" 1>&2; exit 1; }

#check for beta flag
if [ -n "$1" ] && [ "$1" != "beta" ]; then
usage
fi

if [ -n "$1" ]; then
install_beta="beta "
fi

#create tmp directory and move to it with macOS compatibility fallback
tmp_dir=$(mktemp -d 2>/dev/null || mktemp -d -t 'rclone-install.XXXXXXXXXX')
cd "$tmp_dir"

#make sure unzip tool is available and choose one to work with
set +e
for tool in ${unzip_tools_list[*]}; do
trash=$(hash "$tool" 2>>errors)
if [ "$?" -eq 0 ]; then
unzip_tool="$tool"
break
fi
done
set -e

exit if no unzip tools available

if [ -z "$unzip_tool" ]; then
printf "\nNone of the supported tools for extracting zip archives (${unzip_tools_list[*]}) were found. "
printf "Please install one of them and try again.\n\n"
exit 4
fi

Make sure we don't create a root owned .config/rclone directory #2127

export XDG_CONFIG_HOME=config

#check installed version of rclone to determine if update is necessary
version=$(rclone --version 2>>errors | head -n 1)
if [ -z "$install_beta" ]; then
current_version=$(curl -fsS https://downloads.rclone.org/version.txt)
else
current_version=$(curl -fsS https://beta.rclone.org/version.txt)
fi

if [ "$version" = "$current_version" ]; then
printf "\nThe latest ${install_beta}version of rclone ${version} is already installed.\n\n"
exit 3
fi

#detect the platform
OS="$(uname)"
case $OS in
Linux)
OS='linux'
;;
FreeBSD)
OS='freebsd'
;;
NetBSD)
OS='netbsd'
;;
OpenBSD)
OS='openbsd'
;;
Darwin)
OS='osx'
binTgtDir=/usr/local/bin
man1TgtDir=/usr/local/share/man/man1
;;
SunOS)
OS='solaris'
echo 'OS not supported'
exit 2
;;
*)
echo 'OS not supported'
exit 2
;;
esac

OS_type="$(uname -m)"
case "$OS_type" in
x86_64|amd64)
OS_type='amd64'
;;
i?86|x86)
OS_type='386'
;;
aarch64|arm64)
OS_type='arm64'
;;
armv7*)
OS_type='arm-v7'
;;
armv6*)
OS_type='arm-v6'
;;
arm*)
OS_type='arm'
;;
*)
echo 'OS type not supported'
exit 2
;;
esac

#download and unzip
if [ -z "$install_beta" ]; then
download_link="https://downloads.rclone.org/rclone-current-${OS}-${OS_type}.zip"
rclone_zip="rclone-current-${OS}-${OS_type}.zip"
else
download_link="https://beta.rclone.org/rclone-beta-latest-${OS}-${OS_type}.zip"
rclone_zip="rclone-beta-latest-${OS}-${OS_type}.zip"
fi

curl -OfsS "$download_link"
unzip_dir="tmp_unzip_dir_for_rclone"

there should be an entry in this switch for each element of unzip_tools_list

case "$unzip_tool" in
'unzip')
unzip -a "$rclone_zip" -d "$unzip_dir"
;;
'7z')
7z x "$rclone_zip" "-o$unzip_dir"
;;
'busybox')
mkdir -p "$unzip_dir"
busybox unzip "$rclone_zip" -d "$unzip_dir"
;;
esac

cd $unzip_dir/*

#mounting rclone to environment

case "$OS" in
'linux')
#binary
cp rclone /usr/bin/rclone.new
chmod 755 /usr/bin/rclone.new
chown root:root /usr/bin/rclone.new
mv /usr/bin/rclone.new /usr/bin/rclone
#manual
if ! [ -x "$(command -v mandb)" ]; then
echo 'mandb not found. The rclone man docs will not be installed.'
else
mkdir -p /usr/local/share/man/man1
cp rclone.1 /usr/local/share/man/man1/
mandb
fi
;;
'freebsd'|'openbsd'|'netbsd')
#binary
cp rclone /usr/bin/rclone.new
chown root:wheel /usr/bin/rclone.new
mv /usr/bin/rclone.new /usr/bin/rclone
#manual
mkdir -p /usr/local/man/man1
cp rclone.1 /usr/local/man/man1/
makewhatis
;;
'osx')
#binary
mkdir -m 0555 -p ${binTgtDir}
cp rclone ${binTgtDir}/rclone.new
mv ${binTgtDir}/rclone.new ${binTgtDir}/rclone
chmod a=x ${binTgtDir}/rclone
#manual
mkdir -m 0555 -p ${man1TgtDir}
cp rclone.1 ${man1TgtDir}
chmod a=r ${man1TgtDir}/rclone.1
;;
*)
echo 'OS not supported'
exit 2
esac

#update version variable post install
version=$(rclone --version 2>>errors | head -n 1)

#cleanup
rm -rf "$tmp_dir"

printf "\n${version} has successfully installed."
printf '\nNow run "rclone config" for setup. Check Documentation for more details.\n\n'
exit 0

Ok, I will install 'sudo' and situation now looks like this.

root@proxmox:~# sudo -v ; curl https://rclone.org/install.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4734 100 4734 0 0 22980 0 --:--:-- --:--:-- --:--:-- 22980
Archive: rclone-current-linux-amd64.zip
creating: rclone-v1.66.0-linux-amd64/
inflating: rclone-v1.66.0-linux-amd64/README.html
inflating: rclone-v1.66.0-linux-amd64/README.txt
inflating: rclone-v1.66.0-linux-amd64/rclone
inflating: rclone-v1.66.0-linux-amd64/git-log.txt
inflating: rclone-v1.66.0-linux-amd64/rclone.1
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/ja...
Processing manual pages under /usr/share/man/ja...
Purging old database entries in /usr/share/man/de...
Processing manual pages under /usr/share/man/de...
Purging old database entries in /usr/share/man/sk...
Processing manual pages under /usr/share/man/sk...
Purging old database entries in /usr/share/man/zh_TW...
Processing manual pages under /usr/share/man/zh_TW...
Purging old database entries in /usr/share/man/nl...
Processing manual pages under /usr/share/man/nl...
Purging old database entries in /usr/share/man/cs...
Processing manual pages under /usr/share/man/cs...
Purging old database entries in /usr/share/man/fr...
Processing manual pages under /usr/share/man/fr...
Purging old database entries in /usr/share/man/gl...
Processing manual pages under /usr/share/man/gl...
Purging old database entries in /usr/share/man/ru...
Processing manual pages under /usr/share/man/ru...
Purging old database entries in /usr/share/man/sv...
Processing manual pages under /usr/share/man/sv...
Purging old database entries in /usr/share/man/tr...
Processing manual pages under /usr/share/man/tr...
Purging old database entries in /usr/share/man/uk...
Processing manual pages under /usr/share/man/uk...
Purging old database entries in /usr/share/man/pt_BR...
Processing manual pages under /usr/share/man/pt_BR...
Purging old database entries in /usr/share/man/pl...
Processing manual pages under /usr/share/man/pl...
Purging old database entries in /usr/share/man/da...
Processing manual pages under /usr/share/man/da...
Purging old database entries in /usr/share/man/ro...
Processing manual pages under /usr/share/man/ro...
Purging old database entries in /usr/share/man/hu...
Processing manual pages under /usr/share/man/hu...
Purging old database entries in /usr/share/man/ko...
Processing manual pages under /usr/share/man/ko...
Purging old database entries in /usr/share/man/it...
Processing manual pages under /usr/share/man/it...
Purging old database entries in /usr/share/man/sl...
Processing manual pages under /usr/share/man/sl...
Purging old database entries in /usr/share/man/zh_CN...
Processing manual pages under /usr/share/man/zh_CN...
Purging old database entries in /usr/share/man/es...
Processing manual pages under /usr/share/man/es...
Purging old database entries in /usr/share/man/pt...
Processing manual pages under /usr/share/man/pt...
Purging old database entries in /usr/share/man/id...
Processing manual pages under /usr/share/man/id...
Purging old database entries in /usr/share/man/zh...
Processing manual pages under /usr/share/man/zh...
Purging old database entries in /usr/share/man/sr...
Processing manual pages under /usr/share/man/sr...
Purging old database entries in /usr/share/man/fi...
Processing manual pages under /usr/share/man/fi...
Purging old database entries in /usr/share/man/hr...
Processing manual pages under /usr/share/man/hr...
Processing manual pages under /usr/local/man...
Updating index cache for path `/usr/local/man/man1'. Wait...mandb: warning: /usr/local/man/man1/rclone.1: whatis parse for rclone(1) failed
done.
Checking for stray cats under /usr/local/man...
Checking for stray cats under /var/cache/man/oldlocal...
1 man subdirectory contained newer manual pages.
1 manual page was added.
0 stray cats were added.
2 old database entries were purged.

rclone v1.66.0 has successfully installed.
Now run "rclone config" for setup. Check Documentation for more details.

:slight_smile:

I will let you know after installation and configuration on Proxmox whether the problem is solved.

unfortunately still the same eh....
@kapitainsky do U have some ideas?

When the systemd service fails in this way, it's usually because the command you gave in the service file failed. You need to look at the rclone log for any clues as to what exactly failed (hopefully you've kept the -vv in there).

Alternatively, run the rclone command you put in the systemd service file standalone from the command prompt (i.e. outside systemd, just run it as a command), and see what errors come up.

AssertPathIsDirectory=/mnt/gdrive/proxmox_backup was not met
that is a systemd error, not a rclone error.

Assert... directives check for different aspects of the running environment to decide whether the unit should activate. However, unlike the Condition directives, a negative result causes a failure with this directive.

So in your case AssertPathIsDirectory directive is not met.

Here you are two good sources about systemd:

https://wiki.archlinux.org/title/systemd

At least make sense to understand basic concepts and meaning of directives you use. Avoid blindly copy/paste from random internet sources.

Answer from journalctl -xe

root@proxmox:/etc/systemd/system# journalctl -xe
Apr 16 17:26:20 proxmox systemd[1]: Configuration file /etc/systemd/system/gdrive.service is marked executable. Please remove executable>
Apr 16 17:26:24 proxmox systemd[1]: gdrive.service: Scheduled restart job, restart counter is at 30.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ Automatic restarting of the unit gdrive.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Apr 16 17:26:24 proxmox systemd[1]: Stopped rclone for td.
░░ Subject: A stop job for unit gdrive.service has finished
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A stop job for unit gdrive.service has finished.
░░ 
░░ The job identifier is 8852 and the job result is done.
Apr 16 17:26:24 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 16 17:26:24 proxmox systemd[1]: Assertion failed for rclone for td.
░░ Subject: A start job for unit gdrive.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit gdrive.service has finished with a failure.
░░ 
░░ The job identifier is 8852 and the job result is assert.
Apr 16 17:26:24 proxmox systemd[1]: gdrive.service: Starting requested but asserts failed.
Apr 16 17:26:24 proxmox systemd[1]: Assertion failed for rclone for td.
░░ Subject: A start job for unit gdrive.service has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit gdrive.service has finished with a failure.
░░ 
░░ The job identifier is 8942 and the job result is assert.

As someone has already pointed out, your issue is with your systemd assertion on the service.

AssertPathIsDirectory=/mnt/gdrive/proxmox_backup was not met

You need to check on your system that /mnt/gdrive/proxmox_backup is a directory that exists (it needs to exist before rclone is running).

It's strange because everything suddenly started working. The path is as below:

AssertPathIsDirectory=/mnt/gdrive/proxmox_backup

Interesting fact - everything worked fine until the server was restarted. Only after a restart did I have to change the path. Apparently rclone doesn't work perfectly ehh...

Does anyone know how to make sure that after restarting the proxmox server on which rclone is installed, the situation does not occur again and I have to configure rclone from the beginning?

Today I will make a full backup because it is finally starting to work - I will contact you after I finish/test restoring from such a backup :slight_smile:

you shouldn't need to change your path.

Have you confirmed that the directory exists? It will also need to be empty for mnt to be able to use it.

maybe there is an issue accessing /mnt, early in the boot process.
can you use another directory for the mountpoint?

or just remove AssertPathIsDirectory=/mnt/gdrive/proxmox_backup and see what happens.

or try a good old-fashtioned, simple sleep command.
ExecStartPre=/bin/sleep 60

and still need to fix Please remove executable