Port 443 timing out on rclone config reconnect

What is the problem you are having with rclone?

Have been using rclone for quite a while but recently had to change my router and now while performing rclone config reconnect I get the "Got Code" and then it waits for a long time and throws an error ``

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

- os/type: windows
- os/arch: amd64
- go/version: go1.16.3
- go/linking: dynamic
- go/tags: cmount

Tried with both the latest stable and beta version of rclone, same error.

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)

rclone config reconnect -vv Backup_2:

The rclone config contents with secrets removed.

[Backup_2]
type = drive
client_id =  
client_secret =
scope = drive
root_folder_id = 
token = {"access_token":"ya29.A0ARrdaM8cm_TFup6RW3nAFpjk-lyOZLU47vbovGqOg1rTpHQn40pYEvNa5HqR4_kPEf1Uf2uaVbmxAdeU5ukepu2HTER-RXo4mY1nMe5yuw9_KZbTSjJb_3tEwpgPuTMVZbyji2ZziwpMbPEGGOKqWxE0gzbx","token_type":"Bearer","refresh_token":"1//0gZHiLkXM32OvCgYIARAAGBASNwF-L9IrxA4GO_pR07kltrtt4eKr0VL-7QXvSD2yfGmvt2qIUBz-TcumzilXrCQfgSn2IKSKYOo","expiry":"2022-02-03T16:30:07.490033+05:30"}
team_drive = 0ANsp2WeXN39AUk9PVA
server_side_across_configs = true

A log from the command with the -vv flag

2022/02/12 15:43:10 DEBUG : Using config file from "C:\\Users\\abhir\\.config\\rclone\\rclone.conf"
2022/02/12 15:43:10 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "config" "reconnect" "-vv" "Backup_2:"]
Already have a token - refresh?
y) Yes (default)
n) No
y/n>
Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes (default)
n) No
y/n>
2022/02/12 15:43:11 DEBUG : Starting auth server on 127.0.0.1:53682
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=dawJX9I-f3v63X_vTZLCTg
Log in and authorize rclone for access
Waiting for code...
2022/02/12 15:43:11 DEBUG : Redirecting browser to: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=161089351808-4j0a2iiv0iau8vg9n9gorfe9ru1fbm2t.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A53682%2F&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=dawJX9I-f3v63X_vTZLCTg

Running the commands curl -v http://oauth2.googleapis.com/token or curl -v https://oauth2.googleapis.com/token gives timeout on ports 80 and 443 respectively. Not using any Proxy or Firewall. Doesn't seem to be a problem on my local system as the same commands on a different network work just fine.

Just found out that using Cloudfare WARP on the same network, runs the commands without any error. Any idea why this is happening?

I know you said you aren't using a firewall or proxy, but something is blocking it. Windows Defender/AV/ISP Blocking/etc.

You'd have to check with your local team and see what's causing the block.

I tried everything, Disabling Windows Firewall and Defender (shouldn't be an issue considering other networks are working fine) didn't do anything.
It's a Home connection so I guess I'll have to talk to the ISP only. Thanks though.

Located in a country that may block something?

The curl commands indicate you are being blocked.

Your version seems old based on the output but that shouldn't stop testing with curl.

I don't think so, it was working just fine till a couple of days ago. Only thing that has changed is the router since then, so maybe that's causing it. I did try and tinker with the router settings but nothing worked, so don't know anymore.

Ok so I think my ISP has ports 80 and 443 blocked, is there any way I can make rclone use another port for the inbound connection(I'm big noob in the matters of networking so forgive me if this is a stupid question)

sure, inbound port 25 and sometimes inbound port 80 is block for residential.

not sure i have have dealt with inbound 443 being blocked.
tho, that should be easy to prove.

if the isp is blocking inbound 443, how is that a problem with rclone?

if inbound 443 is blocked, then install a vpn.

  • client to server, such as openvpn
  • point to point, such as tailscale.

I think googleapi uses port 443 during drive authentication

2022/02/13 01:07:57 DEBUG : Starting auth server on 127.0.0.1:53682
If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=pA5vdanLGdTC3xh7_OXHZw
Log in and authorize rclone for access
Waiting for code...
2022/02/13 01:07:57 DEBUG : Redirecting browser to: https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=161089351808-4j0a2iiv0iau8vg9n9gorfe9ru1fbm2t.apps.googleusercontent.com&redirect_uri=http%3A%2F%2F127.0.0.1%3A53682%2F&response_type=code&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&state=pA5vdanLGdTC3xh7_OXHZw
2022/02/13 01:08:03 DEBUG : Received GET request on auth server to "/"
Got code
2022/02/13 01:08:24 DEBUG : Closing auth server
2022/02/13 01:08:24 DEBUG : Closed auth server with error: accept tcp 127.0.0.1:53682: use of closed network connection
2022/02/13 01:08:24 Failed to configure token: failed to get token: Post "https://oauth2.googleapis.com/token": dial tcp 13.127.247.216:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I'll look into tailscale and openvpn, thanks.

actually, now that i better understand, the vpn is not going to be a solution.

still not clear what inbound 443 have to do with rclone config reconnect
have tried to run rclone on another local machine or perhaps your cellphone?

It shouldn't make a difference on different device considering the same commands run fine on this system also, but with a different network.
But I still tested it out and same results.
Cloudfare WARP makes it work but its daamn slow so can't use it. Even if I authenticate using WARP, the upload still breaks off in the middle.

Nothing. It's outbound 443 to authenticate.

That really reinforces you have an ISP blocking/doing something if you can't connect.

This means you are being blocked by something (firewall/AV/ISP). If you can connect via Cloudflare Warp, that would rule out the machine back to the ISP.

If this fails, there is not much you can do:

 curl https://oauth2.googleapis.com/token -vvv
*   Trying 142.251.35.170:443...
* TCP_NODELAY set
* Connected to oauth2.googleapis.com (142.251.35.170) port 443 (#0)

You may want to check your DNS as well as your oauth request is resolving to something I'd say is a bit strange.

13.127.247.216 - Find IP Address - Lookup and locate an ip address (findip-address.com)

Which I also cannot connect to:

telnet 13.127.247.216 443
Trying 13.127.247.216...

I get:

host oauth2.googleapis.com
oauth2.googleapis.com has address 142.251.35.170
oauth2.googleapis.com has IPv6 address 2607:f8b0:4006:80d::200a

But Google does do Geo load balancing as well.

I tried a few DNS servers and get the same IP back relatively speaking:

 nslookup
> server 1.1.1.1
Default server: 1.1.1.1
Address: 1.1.1.1#53
> oauth2.googleapis.com
Server:		1.1.1.1
Address:	1.1.1.1#53

Non-authoritative answer:
Name:	oauth2.googleapis.com
Address: 142.250.72.106
Name:	oauth2.googleapis.com
Address: 2607:f8b0:4006:823::200a
> server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
> oauth2.googleapis.com
Server:		8.8.8.8
Address:	8.8.8.8#53

Non-authoritative answer:
Name:	oauth2.googleapis.com
Address: 142.251.32.106
Name:	oauth2.googleapis.com
Address: 2607:f8b0:4006:809::200a
> server 9.9.9.9
Default server: 9.9.9.9
Address: 9.9.9.9#53
> oauth2.googleapis.com
Server:		9.9.9.9
Address:	9.9.9.9#53

Non-authoritative answer:
Name:	oauth2.googleapis.com
Address: 142.250.64.202
Name:	oauth2.googleapis.com
Address: 2607:f8b0:4008:807::200a
>

My router DNS is set 0.0.0.0 (don't know what that means), but using Cloudfare WARP and curl -v http://oauth2.googleapis.com/token it worked as expected with the ip 13.127.247.216

*   Trying 13.127.247.216:80...
*   Trying 2a00:1450:4009:818::200a:80...
* Connected to oauth2.googleapis.com (2a00:1450:4009:818::200a) port 80 (#0)
> GET /token HTTP/1.1
> Host: oauth2.googleapis.com
> User-Agent: curl/7.79.1
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 404 Not Found
< Content-Type: text/html
< Date: Sat, 12 Feb 2022 22:33:35 GMT
< Server: scaffolding on HTTPServer2
< Content-Length: 0
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
<
* Connection #0 to host oauth2.googleapis.com left intact 

A few times it did change to different addresses but it mostly remains the same

I’m not quite sure as I’d imagine it’s something ISP related in India.

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