Windows 10: rclone authorize not working

What is the problem you are having with rclone?

Trying to setup rclone onedrive on a raspberry (through ssh). Rclone config instructs me to
rclone authorize "onedrive" on a machine with a browser. I proceed on my W10 machine. rclone authorize 'onedrive' results in following error:

Failed to configure token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

I have searched the forum, one reply that was given to similar issue is that this was a firewall issue.
I get the same result if I:

  • disable windows firewall
  • and/or disable virus scanner.

EDIT: I'm also running this in a command prompt with admin rights, fwiw

Any other ideas?

What is your rclone version (output from rclone version)

1.55.1

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

Windows 10 , 64 bit

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

Onedrive

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

rclone authorize 'onedrive'

The rclone config contents with secrets removed.

No config (have not run rclone before)

A log from the command with the -vv flag

2021/05/09 01:30:21 NOTICE: Config file "C:\\Users\\blablabla\\.config\\rclone\\rclone.conf" not found - using defaults
2021/05/09 01:30:21 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "authorize" "onedrive" "-vv"]
2021/05/09 01:30:21 DEBUG : Starting auth server on 127.0.0.1:53682
2021/05/09 01:30:21 Failed to configure token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: An attempt was made to access a socket in a way forbidden by its access permissions.
1 Like

hello and welcome to the forum,

not sure why you are getting that error, perhaps some other program using port 53682
did you try something like netstat -ano | findstr 53682

as a workaround, you can create the config file on w10 and copy it to pi.

1 Like

Thank you for the prompt reply.

  • Running 'rclone config' on W10 and choosing the required steps for Onedrive, eventually leads me to the same error.
  • The netstat command doesn't show anything using port 53682

is that port in netsh interface ipv4 show excludedportrange protocol=tcp | finstr 53682

Nope it's not.

But again, it happens with:

  • Windows firewall turned off, and
  • I added rclone.exe to exceptions for firewall before posting here (i.e. it is in the list of apps that are allowed to go through the firewall). If I check the inbound rules for windows Firewall there is two rules for rsync.exe: allow all TCP and allow UDP.

I'd expect it not to be a firewall issue then. Am I missing something?

EDIT So after your reply, I confirmed above and then:

  • Added rclone.exe to allowed outbound (this apparently does not happen automatically when adding the app in the exclusions list through the 'normal' way)
  • Explicitely added a rule for port 53682 in the allowed inbound list.

rclone authorize 'onedrive' now works and I was able to complete config on headless RPi3.

FYI, netsh interface ipv4 show excludedportrange protocol=tcp | finDstr 53682 still doesn't find anything.

good, it is working now.
53682 is only open during the time that rclone authorize is running.

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