Fatal error while Rclone config

What is the problem you are having with rclone?

I installed Rclone first time on Debian 11 running OpenMediaVault 6 (OMV). I install Rclone to sync data from HDD (mounted on OMV) to Google Drive.
I followed by link: https://www.reddit.com/r/OpenMediaVault/comments/102mod0/comment/j7sn81w/.
I run: ssh -L 127.0.0.1:53682:127.0.0.1:53682 root@192.168.9.201 -p 1234.
I run:rclone config. Then result was: Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use

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

root@debian:~# rclone version
rclone v1.65.2

  • os/version: debian 11.8 (64 bit)
  • os/kernel: 5.15.0-odroid-arm64 (aarch64)
  • os/type: linux
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.21.6
  • go/linking: static
  • go/tags: none

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)

No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n

Enter name for new remote.
name> googledrive01

Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
 1 / 1Fichier
   \ (fichier)
 2 / Akamai NetStorage
   \ (netstorage)
 3 / Alias for an existing remote
   \ (alias)
 4 / Amazon Drive
   \ (amazon cloud drive)
 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others
   \ (s3)
 6 / Backblaze B2
   \ (b2)
 7 / Better checksums for other remotes
   \ (hasher)
 8 / Box
   \ (box)
 9 / Cache a remote
   \ (cache)
10 / Citrix Sharefile
   \ (sharefile)
11 / Combine several remotes into one
   \ (combine)
12 / Compress a remote
   \ (compress)
13 / Dropbox
   \ (dropbox)
14 / Encrypt/Decrypt a remote
   \ (crypt)
15 / Enterprise File Fabric
   \ (filefabric)
16 / FTP
   \ (ftp)
17 / Google Cloud Storage (this is not Google Drive)
   \ (google cloud storage)
18 / Google Drive
   \ (drive)
19 / Google Photos
   \ (google photos)
20 / HTTP
   \ (http)
21 / Hadoop distributed file system
   \ (hdfs)
22 / HiDrive
   \ (hidrive)
23 / ImageKit.io
   \ (imagekit)
24 / In memory object storage system.
   \ (memory)
25 / Internet Archive
   \ (internetarchive)
26 / Jottacloud
   \ (jottacloud)
27 / Koofr, Digi Storage and other Koofr-compatible storage providers
   \ (koofr)
28 / Linkbox
   \ (linkbox)
29 / Local Disk
   \ (local)
30 / Mail.ru Cloud
   \ (mailru)
31 / Mega
   \ (mega)
32 / Microsoft Azure Blob Storage
   \ (azureblob)
33 / Microsoft Azure Files
   \ (azurefiles)
34 / Microsoft OneDrive
   \ (onedrive)
35 / OpenDrive
   \ (opendrive)
36 / OpenStack Swift (Rackspace Cloud Files, Blomp Cloud Storage, Memset Memstore, OVH)
   \ (swift)
37 / Oracle Cloud Infrastructure Object Storage
   \ (oracleobjectstorage)
38 / Pcloud
   \ (pcloud)
39 / PikPak
   \ (pikpak)
40 / Proton Drive
   \ (protondrive)
41 / Put.io
   \ (putio)
42 / QingCloud Object Storage
   \ (qingstor)
43 / Quatrix by Maytech
   \ (quatrix)
44 / SMB / CIFS
   \ (smb)
45 / SSH/SFTP
   \ (sftp)
46 / Sia Decentralized Cloud
   \ (sia)
47 / Storj Decentralized Cloud Storage
   \ (storj)
48 / Sugarsync
   \ (sugarsync)
49 / Transparently chunk/split large files
   \ (chunker)
50 / Union merges the contents of several upstream fs
   \ (union)
51 / Uptobox
   \ (uptobox)
52 / WebDAV
   \ (webdav)
53 / Yandex Disk
   \ (yandex)
54 / Zoho
   \ (zoho)
55 / premiumize.me
   \ (premiumizeme)
56 / seafile
   \ (seafile)
Storage> 18

Option client_id.
Google Application Client Id
Setting your own is recommended.
See https://rclone.org/drive/#making-your-own-client-id for how to create your own.
If you leave this blank, it will use an internal key which is low performance.
Enter a value. Press Enter to leave empty.
client_id>

Option client_secret.
OAuth Client Secret.
Leave blank normally.
Enter a value. Press Enter to leave empty.
client_secret>

Option scope.
Comma separated list of scopes that rclone should use when requesting access from drive.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
 1 / Full access all files, excluding Application Data Folder.
   \ (drive)
 2 / Read-only access to file metadata and file contents.
   \ (drive.readonly)
   / Access to files created by rclone only.
 3 | These are visible in the drive website.
   | File authorization is revoked when the user deauthorizes the app.
   \ (drive.file)
   / Allows read and write access to the Application Data folder.
 4 | This is not visible in the drive website.
   \ (drive.appfolder)
   / Allows read-only access to file metadata but
 5 | does not allow any access to read or download file content.
   \ (drive.metadata.readonly)
scope> 1

Option service_account_file.
Service Account Credentials JSON file path.
Leave blank normally.
Needed only if you want use SA instead of interactive login.
Leading `~` will be expanded in the file name as will environment variables such as `${RCLONE_CONFIG_DIR}`.
Enter a value. Press Enter to leave empty.
service_account_file>

Edit advanced config?
y) Yes
n) No (default)
y/n> n

Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n> y

Error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use
Usage:
  rclone config [flags]
  rclone config [command]

Available Commands:
  create      Create a new remote with name, type and options.
  delete      Delete an existing remote.
  disconnect  Disconnects user from remote
  dump        Dump the config file as JSON.
  edit        Enter an interactive configuration session.
  file        Show path of configuration file in use.
  password    Update password in an existing remote.
  paths       Show paths used for configuration, cache, temp etc.
  providers   List in JSON format all the providers and options.
  reconnect   Re-authenticates user with remote.
  redacted    Print redacted (decrypted) config file, or the redacted config for a single remote.
  show        Print (decrypted) config file, or the config for a single remote.
  touch       Ensure configuration file exists.
  update      Update options in an existing remote.
  userinfo    Prints info about logged in user of remote.

Flags:
  -h, --help   help for config

Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.

2024/01/26 17:52:18 Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use

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

root@debian:~# rclone config redacted
[googledrive01]
type = drive
scope = drive
### Double check the config for sensitive info before posting publicly

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

Paste  log here

If you struggle with using ssh and ports forwarding then run rclone config on your local machine, configure gdrive and copy/paste content of rclone.conf to your Debian server rclone config file.

This is much easier way.

My device that i running Debian not having browser.

I said run it on local machine.

I followed to link that you mentioned. Result is: Fatal error: config failed to refresh token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use.

Because this port is in use probably by your SSH connections and forwarding.

  1. Reboot your computer - do NOT run any ssh
  2. run rclone config and configure your remote
  3. only then ssh to Debian and copy config file

I was also installed GUI Rclone. Result is:
root@debian:~# rclone rcd --rc-web-gui
2024/01/26 19:47:19 NOTICE: Web GUI exists. Update skipped.
2024/01/26 19:47:19 NOTICE: Serving Web GUI
2024/01/26 19:47:19 Failed to start remote control: failed to init server: listen tcp 127.0.0.1:5572: bind: address already in use

Just do step by step what I posted. No idea why now you try GUI.

Use your local machine - forget about your server for a moment.

i don't really understand your idea. To run: rclone config, i still have to log in ssh to execute command. And result remain the same.

welcome to the forum,

if i understood what you need, then check out my post at
a third option is to start a ssh session like so

I have also sent you link with three different methods how to configure remote rclone. You tried method 3 and it does not work. So try 1 or 2. I think 2 is the easiest:

  1. Configuring using rclone authorize
  2. Configuring by copying the config file
  3. Configuring using SSH Tunnel

hmmm, never noticed that in the docs before but my method is a bit different, also works on windows

i have used method 3 many times.
just now, i tried and it worked

this is the ssh command
ssh root@100.115.202.129 -i "C:\data\c\combined\hetzner\keys\id_ed25519" -L localhost:50000:localhost:53682 -t tmux attach

this is the output of rclone config on headless ubuntu

rclone config
<snip>
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n

Enter name for new remote.
name> sshtest
<snip>
Storage> drive
<snip>
Use web browser to automatically authenticate rclone with remote?
 * Say Y if the machine running rclone has a web browser you can use
 * Say N if running rclone on a (remote) machine without web browser access
If not sure try Y. If Y failed, try N.

y) Yes (default)
n) No
y/n>

2024/01/26 10:29:19 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=ctA774Th2QtqqvsNcbFXgA
2024/01/26 10:29:19 NOTICE: Log in and authorize rclone for access
2024/01/26 10:29:19 NOTICE: Waiting for code...
2024/01/26 10:31:15 NOTICE: Got code

this the output from firefox on my laptop, notice that the port is 50000

and here is the remote from the headless ubuntu

rclone config show sshtest
[sshtest]
type = drive
token = {"access_token":"redacted","token_type":"Bearer","refresh_token":"redacted","expiry":"2024-01-26T11:31:14.294909799-05:00"}`

Your way is a variation of it using different local port - which sometimes might be handy too.

I suggested to OP method 2 (Configuring by copying the config file) as I think it is the easiest as does not require any wizardry:)

just now, i just tried method 3 from the docs and that did not work.
maybe i need to call my variation method 4

well, wizards would use --magic ;wink

1 Like

I think I followed it to the letter - similarly like OP connecting to remote headless Debian machine:

ssh -L localhost:53682:localhost:53682 user@192.168.145.25

...
y) Yes (default)
n) No
y/n>

2024/01/26 17:04:51 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=szFr2myDL_xJ1ZCNAxzmEw
2024/01/26 17:04:51 NOTICE: Log in and authorize rclone for access
2024/01/26 17:04:51 NOTICE: Waiting for code...
2024/01/26 17:05:43 NOTICE: Got code
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
Configure this as a Shared Drive (Team Drive)?

y) Yes
n) No (default)
y/n> channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused
channel 3: open failed: connect failed: Connection refused


Configuration complete.

despite SSH complaining about something it has been configured and remote works.

2024/01/26 17:04:51 NOTICE: Waiting for code...
2024/01/26 17:05:43 NOTICE: Got code

i was installed success rclone on debian.
i want sync data from HDD to Google Drive via OpenMediaVault every day.
i run: /usr/bin/flock -w 0 /tmp/gdrive.lock /usr/bin/rclone -vv --transfers 2 --exclude '.*{/**,}' --no-traverse sync /srv/VOLUME-UUID/<share_name> RemoteName:/GOOGLEDRIVE/PATH.
And result is error: Failed to create file system for "remote:/drive/folders/1vsjvT4CfzMzz5qeMbVTc5D9JqiHYruo8": didn't find section in config file.
can you help me!

run on your OpenMediaVault server

rclone config redacted

and

rclone config file

and post output here.

root@debian:~# rclone config redacted
[drive02]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =

Double check the config for sensitive info before posting publicly

root@debian:~# rclone config file
Configuration file is stored at:
/root/.config/rclone/rclone.conf

Please help me!

so why you try to transfer data to remote named RemoteName ? When you gave it a name drive02?

What is really you sync command? You edited it before posting here?

Thanks for reply. Because i don’t replace RemoteName by drive02. Therefore occur error. I try again and command run success.
Thank you very much!

1 Like