Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Config crash #43

Open
cron410 opened this issue Nov 1, 2019 · 13 comments
Open

Create Config crash #43

cron410 opened this issue Nov 1, 2019 · 13 comments

Comments

@cron410
Copy link
Contributor

cron410 commented Nov 1, 2019

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.

@ncw
Copy link
Member

ncw commented Nov 2, 2019

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.

@hjyoung1
Copy link

Facing same issue.

@SubrataM3
Copy link

This is a basic issue and not fixed yet? 👎

@devswhiz
Copy link

devswhiz commented May 1, 2020

run this command
ip addr flush dev eth0

then
restart your server

this works for me

@hjyoung1
Copy link

Any updates on this?
@negative0

@negative0
Copy link
Member

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 ?

@0-0eth0
Copy link

0-0eth0 commented Jul 6, 2020

@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.

@robertolanuti
Copy link

robertolanuti commented Jul 19, 2020

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?

@chiqui3d
Copy link

chiqui3d commented Apr 30, 2021

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.

@dillfrescott
Copy link

dillfrescott commented Oct 5, 2021

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.

@realtebo
Copy link

realtebo commented Dec 7, 2021

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.

@imthenachoman
Copy link

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

@sayalraza
Copy link

sayalraza commented Sep 27, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests