1.55 - rclone mount with "--daemon" looks like it works, but actually fails instantly

What is the problem you are having with rclone?

Mounting a remote with the "--daemon" flag will fail, but it will look like it mounted successfully unless you use the -vv flag which shows you that the mount terminated instantly. This happens on all my remotes, including regular and crypt remotes.

Using the "--daemon" flag, if the mount is successful you end up back at the bash prompt with no error message. When I use the command below, this is result I get, except that the remote isn't actually being mounted. Checking the command with the -vv flag, it appears the mount ends instantly in a way that is being interpreted as a "clean" exit, but it never mounted in the first place.

The exact same command with the "--daemon" flag removed will mount the remote correctly.

What is your rclone version (output from rclone version)

1.55

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Ubuntu 20.04.2 LTS 64-bit

Which cloud storage system are you using? (eg Google Drive)

Google Drive, Dropbox, and crypt

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount remote: /path/to/mount --allow-non-empty --cache-db-purge --allow-other --vfs-cache-mode full --vfs-cache-max-age 5m --cache-dir /path/to/.cache/rclone --daemon

A log from the command with the -vv flag

2021/04/11 20:08:10 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"

2021/04/11 20:08:10 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "mount" "remote:" "/path/to/mount "-vv" "--allow-non-empty" "--cache-db-purge" "--allow-other" "--vfs-cache-mode" "full" "--vfs-cache-max-age" "5m" "--cache-dir" "/path/to/.cache/rclone" "--daemon"]

2021/04/11 20:08:10 DEBUG : Creating backend with remote "remote:"

2021/04/11 20:08:10 DEBUG : rclone: Version "v1.55.0" finishing with parameters ["rclone" "mount" "remote:" "/path/to/mount" "-vv" "--allow-non-empty" "--cache-db-purge" "--allow-other" "--vfs-cache-mode" "full" "--vfs-cache-max-age" "5m" "--cache-dir" "/path/to/.cache/rclone" "--daemon"]

Does it work without --daemon or is it just the error handling for daemon which is the problem?

You'd want to write to a log file to get the full output as your output with daemon and and -vv with always be just what you have.

felix@gemini:~$ rclone mount gcrypt: /home/felix/test -vv --daemon
2021/04/12 08:50:02 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/04/12 08:50:02 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "mount" "gcrypt:" "/home/felix/test" "-vv" "--daemon"]
2021/04/12 08:50:02 DEBUG : Creating backend with remote "gcrypt:"
2021/04/12 08:50:02 DEBUG : Creating backend with remote "GD:crypt"
2021/04/12 08:50:03 DEBUG : rclone: Version "v1.55.0" finishing with parameters ["rclone" "mount" "gcrypt:" "/home/felix/test" "-vv" "--daemon"]
felix@gemini:~$ ps -ef | grep rclone | grep test
felix    1852327       1  2 08:50 ?        00:00:00 rclone mount gcrypt: /home/felix/test -vv --daemon
felix@gemini:~$ cd test
felix@gemini:~/test$ ls
mounted  test  test1
felix@gemini:~/test$ cd
felix@gemini:~$ fusermount -uz /home/felix/test
felix@gemini:~$

To make it worse, you have allow-non-empty which over mounts so it hides it.

If you want to see what's going on, add --log-file and share the full debug log.

It works correctly without the --daemon flag.

I just tried it with --log-file, which does give a bit more info - my rclone.conf file is encrypted, and trying to mount with --daemon gives the error "Couldn't decrypt configuration, most likely wrong password.", even though the password I'm providing is correct. That error only shows up in the log file, it doesn't appear when using the -vv flag.

So to summarise:

  • Mounting with --daemon fails

  • The reason it fails is "Couldn't decrypt configuration, most likely wrong password.", even when the correct password is used. This only becomes apparent when using the --log-file flag, otherwise it looks exactly like the mount was actually successful because rclone just spits you back out at the bash prompt the same way it does if the mount is successful

  • Mounting without --daemon works without any issues

  • Removing the "--allow-non-empty" flag has no effect either

Can you share what specifically you are running? I tried a few things and they work without issue.

felix@gemini:~$ export RCLONE_CONFIG_PASS=testme
felix@gemini:~$ rclone mount gcrypt: /home/felix/test --config test.conf -vv --daemon --log-file test.log
felix@gemini:~$ tail test.log
2021/04/12 12:20:19 DEBUG : Creating backend with remote "GD:crypt"
2021/04/12 12:20:20 DEBUG : rclone: Version "v1.55.0" finishing with parameters ["rclone" "mount" "gcrypt:" "/home/felix/test" "--config" "test.conf" "-vv" "--daemon" "--log-file" "test.log"]
2021/04/12 12:20:20 DEBUG : Using RCLONE_CONFIG_PASS password.
2021/04/12 12:20:20 DEBUG : Using config file from "/home/felix/test.conf"
2021/04/12 12:20:20 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "mount" "gcrypt:" "/home/felix/test" "--config" "test.conf" "-vv" "--daemon" "--log-file" "test.log"]
2021/04/12 12:20:20 DEBUG : Creating backend with remote "gcrypt:"
2021/04/12 12:20:20 DEBUG : Creating backend with remote "GD:crypt"
2021/04/12 12:20:20 DEBUG : Encrypted drive 'gcrypt:': Mounting on "/home/felix/test"
2021/04/12 12:20:20 DEBUG : : Root:
2021/04/12 12:20:20 DEBUG : : >Root: node=/, err=<nil>
felix@gemini:~$ cd test
felix@gemini:~/test$ ls backups  mounted  test  test1
felix@gemini:~/test$

The full output of the logfile is below - you can see it instantly fails and says the config password is incorrect, even though it is actually correct. If I try the same command with the "--daemon" flag removed, it mounts correctly.

2021/04/12 14:58:32 DEBUG : Using config file from "/home/username/.config/rclone/rclone.conf"
2021/04/12 14:58:32 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "mount" "remote:" "/path/to/mount" "-vv" "--allow-non-empty" "--cache-db-purge" "--allow-other" "--vfs-cache-mode" "full" "--vfs-cache-max-age" "5m" "--cache-dir" "/path/to/.cache/rclone" "--daemon" "--log-file" "/path/to/rclonelog.txt"]
2021/04/12 14:58:32 DEBUG : Creating backend with remote "remote:"
2021/04/12 14:58:32 DEBUG : rclone: Version "v1.55.0" finishing with parameters ["rclone" "mount" "remote:" "/path/to/mount" "-vv" "--allow-non-empty" "--cache-db-purge" "--allow-other" "--vfs-cache-mode" "full" "--vfs-cache-max-age" "5m" "--cache-dir" "/path/to/.cache/rclone" "--daemon" "--log-file" "/path/to/rclonelog.txt"]
2021/04/12 14:58:32 ERROR : Couldn't decrypt configuration, most likely wrong password.
2021/04/12 14:58:32 Failed to read line: EOF

How is it the same command? Are you typing the password in?

You aren't sharing all the details so it's tough.

I can replicate this with

$ rclone-v1.55.0  -vv --config /tmp/rclone.conf mount /tmp/ /mnt/tmp/ --daemon --log-file /tmp/log.log
Enter configuration password:
password:

Which gives this in the log

2021/04/12 20:12:25 DEBUG : Using config file from "/tmp/rclone.conf"
2021/04/12 20:12:25 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone-v1.55.0" "-vv" "--config" "/tmp/rclone.conf" "mount" "/tmp/" "/mnt/tmp/" "--daemon" "--log-file" "/tmp/log.log"]
2021/04/12 20:12:25 DEBUG : Creating backend with remote "/tmp/"
2021/04/12 20:12:25 DEBUG : rclone: Version "v1.55.0" finishing with parameters ["rclone-v1.55.0" "-vv" "--config" "/tmp/rclone.conf" "mount" "/tmp/" "/mnt/tmp/" "--daemon" "--log-file" "/tmp/log.log"]
2021/04/12 20:12:25 ERROR : Couldn't decrypt configuration, most likely wrong password.
2021/04/12 20:12:25 Failed to read line: EOF

This does not replicate with v1.54 so it is a regression, alas.

Can you please make a new issue on github @mstgrv - we've been fixing up the config system after it got revamped in 1.55 there.

Note that you can use this as a workaround

read -s RCLONE_CONFIG_PASS
export RCLONE_CONFIG_PASS
rclone mount ... --daemon

So typing the password in causes the issue? This is why detailing the steps saves so much time.

Thanks, have posted on the issue tracker here

1 Like

With the --daemon flag included, rclone prompts for your config password (as expected). You type it in and it spits you out at the bash prompt, as if it had worked, when it fact it failed.

From the log file you can see it fails instantly, and gives the "Couldn't decrypt configuration, most likely wrong password." error even though the supplied password was correct.

Using the same command but removing the --daemon flag, it all works as expected - rclone prompts you for the password as expected, you type it in and then everything is mounted as expected.

1 Like

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