Main process exited, code=exited, status=5/NOTINSTALLED

I have a service called drive-find. The systemd service looks like this:

[Unit]
Description=drive-find
Requires=drive.service
After=drive.service

[Service]
Type=simple

ExecStart=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572

RemainAfterExit=yes
User=user
Group=user

[Install]
WantedBy=multi-user.target

My rclone service looks like this

[Unit]
Description=drive
Requires=systemd-networkd.service
After=network-online.target
Wants=network-online.target
AssertPathIsDirectory=/mnt/drive/

[Service]
Type=notify
KillMode=none
Environment=RCLONE_CONFIG=/opt/rclone/rclone.conf
RestartSec=5
ExecStart=/usr/bin/rclone mount drive: /mnt/drive \
        --allow-other \
        --default-permissions \
        --uid 1000 \
        --gid 1000 \
        --dir-perms 777 \
        --file-perms 666 \
        --umask 002 \
        --log-file /opt/rclone/logs/rclone.log \
        --log-level NOTICE \
        --dir-cache-time 5000h \
        --drive-pacer-min-sleep 10ms \
        --drive-pacer-burst 200 \
        --poll-interval 30s \
        --rc \
        --rc-addr :5572 \
        --cache-dir=/data/.cache/drive \
        --drive-chunk-size 32M \
        --vfs-cache-mode full \
        --vfs-cache-max-size 350G \
        --vfs-cache-max-age 15m \
        --vfs-cache-poll-interval 5m \
        --vfs-read-ahead 2G \
        --vfs-read-chunk-size 32M \
        --vfs-read-chunk-size-limit off \
        --bwlimit 8650k:off \
        --transfers 3 \
        --bwlimit-file 20M
ExecStop=/bin/fusermount -uz /mnt/drive
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 _async=true
Restart=on-failure
User=user
Group=user

[Install]
WantedBy=multi-user.target

The service drive-find service is failing after an hour or so and i'm getting this error:

May 06 00:47:10  systemd[1]: drive-find.service: Main process exited, code=exited, status=5/NOTINSTALLED
May 06 00:47:10  systemd[1]: drive-find.service: Failed with result 'exit-code'.

Is that because recursive=true --rc-addr 127.0.0.1:5572 in my rclone service and ExecStart=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr 127.0.0.1:5572 in my drive-find service should be :5572 instead of --rc-addr 127.0.0.1:5572?

The command you wrote (rclone RC ...) runs once and exits. Is that the cause of the problem?

yes
i removed the 127.0.0.1 from everything referencing 127.0.0.1:5572 and just left it as /usr/bin/rclone rc vfs/refresh recursive=true --rc-addr :5572 and it seems to be fine now.
is that ok?

Your drive-find service will still run just once then exit. You probably don't want to run it continuously, maybe you want to run it once day, or only on startup or something like that.

I'm afraid my systemd knowledge is not good enough to tell you how to do that.

What is your goal? What do you want to happen?

drive-find.service was from your old github

That doesn’t answer my ask. What do you want to happen? What’s your goal?

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