rclone-webui-react icon indicating copy to clipboard operation
rclone-webui-react copied to clipboard

Create Config crash

Open cron410 opened this issue 4 years ago • 13 comments

I have this running inside the rclone/rclone:beta docker image, listening on 0.0.0.0:5572 instead of 127.0.0.1:5572

docker run -it --rm -p 5572:5572 rclone/rclone:beta rcd --rc-web-gui --rc-addr 0.0.0.0:5572 --rc-user=test --rc-pass=test --rc-serve

When creating an rclone config for GDrive from the WebUI, it tries to launch the autoconfig on a local webserver at 127.0.0.1 which does not work in a docker container.

2019/10/31 18:13:37 NOTICE: A new release for gui is present at https://github.com/rclone/rclone-webui-react/releases/download/v0.0.12/currentbuild.zip
2019/10/31 18:13:37 NOTICE: Downloading webgui binary. Please wait. [Size: 4646670, Path :  /root/.cache/rclone/webgui/v0.0.12.zip]
2019/10/31 18:13:37 NOTICE: Unzipping
2019/10/31 18:13:38 NOTICE: Serving remote control on http://[::]:5572/
2019/10/31 18:14:03 NOTICE: Config file "/config/rclone/rclone.conf" not found - using defaults
2019/10/31 18:16:03 NOTICE: Bandwidth limit set to 1G
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
Auto confirm is set: answering Yes, override by setting config parameter config_is_local=false
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=MvVlbj7m7OS-hTSOiRT6Jg
Log in and authorize rclone for access
Waiting for code...
Remote config
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
Auto confirm is set: answering Yes, override by setting config parameter config_is_local=false
2019/10/31 18:21:23 Failed to configure token: failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use

We would need a way to have the autoconfig honor the --rc-addr flag or otherwise know how to configure the autoconfig listening address.

cron410 avatar Nov 01 '19 14:11 cron410

failed to start auth webserver: listen tcp 127.0.0.1:53682: bind: address already in use

It looks like your previous attempt at config was still running which is why the bind failed rather than some problem with docker.

Note this message:

Auto confirm is set: answering Yes, override by setting config parameter config_is_local=false

Which means you can set config_is_local=false to answer N to the question and use the remote flow?

Sorry just noticed this was a WebUI issue so the above advice might not be very helpful.

ncw avatar Nov 02 '19 09:11 ncw

Facing same issue.

hjyoung1 avatar Jan 30 '20 14:01 hjyoung1

This is a basic issue and not fixed yet? 👎

SubrataM3 avatar Apr 24 '20 19:04 SubrataM3

run this command ip addr flush dev eth0

then restart your server

this works for me

devswhiz avatar May 01 '20 14:05 devswhiz

Any updates on this? @negative0

hjyoung1 avatar Jun 23 '20 22:06 hjyoung1

Currently, the webui does not handle any of the auth flow, it just waits for the auth to complete,

ideally, we will have to modify this process a bit by allowing rclone to delegate the process of opening the required GDrive or any other endpoint to the webui, so that it can then open the proper url.

Any thoughts @ncw ?

negative0 avatar Jun 24 '20 04:06 negative0

@negative0 is there any updates on this? i am facing this issue, cant create config properly. it will be great if you add autoconfig option off for headless.

0-0eth0 avatar Jul 06 '20 15:07 0-0eth0

I have tried to connect my google drive account and I can see the following log at the end of the command line procedure (remote / headless machine):

Verify URL: https://accounts.google.com/o/oauth2/auth?accesstype=offline&clientid=xxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com&redirecturi=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&responsetype=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=vksM362XUdfNk5ab9dNeXQ

I'm wondering if we can get that url (from the server side logs) and perform the redirect by the web UI (by the local browser).

In this way we might be able to use the webui tool as well (if I'm not wrong) without changing the normal behaviour. What do you think about something similar?

robertolanuti avatar Jul 19 '20 15:07 robertolanuti

I'm using docker and I don't understand why it opens another port 53682 to check Google Drive, so I can't generate the Google Drive configuration through the panel?

  | 2021-05-01 00:21:41 | stdout | Waiting for code...
-- | -- | -- | --
  | 2021-05-01 00:21:41 | stdout | Log in and authorize rclone for access
  | 2021-05-01 00:21:41 | stdout | If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=hD2QapZGg5EBCAu_WRw8uA
  | 2021-05-01 00:21:41 | stdout | Auto confirm is set: answering Yes, override by setting config parameter config_is_local=false
  | 2021-05-01 00:21:41 | stdout | * Say N if you are working on a remote or headless machine
  | 2021-05-01 00:21:41 | stdout | * Say Y if not sure
  | 2021-05-01 00:21:41 | stdout | Use auto config?
  | 2021-05-01 00:21:41 | stdout | Remote config

Currently I can't access that url, because I only have the default rclone port open 5572 and also with a subdomain, I'm really at a bit of a loss, I don't know what to do.

chiqui3d avatar Apr 30 '21 22:04 chiqui3d

Having this issue as well

Error: config failed to refresh token: failed to start auth webserver...

On Windows 11.


EDIT: Fixed it with a reboot.

dillfrescott avatar Oct 05 '21 02:10 dillfrescott

The problem is due to an already listening rclone instance on the same port.

If happens again, to avoid a reboot, run

netstat -ano | findstr 53682

You will find as last number the pid number of a rclone.exe process already listening on that port

Simply kill this pid.

On windows 10/11 you can open task manager, go into details tab and kill every rclone.exe processes you find.

realtebo avatar Dec 07 '21 10:12 realtebo

Is there any update on this? When running the GUI from a Docker container, the auth window never opens.

imthenachoman avatar Mar 24 '22 10:03 imthenachoman

Ideally when the port is busy, rclone should close the 53682 port and start a new listener, right?

sayalraza avatar Sep 27 '23 10:09 sayalraza