GCS 0Auth2.0 cannot fetch token: Post "https://oauth2.googleapis.com/token": dial tcp connect:connection refused

What is the problem you are having with rclone?

dial tcp IP connect:connection refused. Am I being blocked by a firewall?

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

rclone v1.55.1-DEV
- os/type: linux
- os/arch: amd64
- go/version: go1.15.5
- go/linking: dynamic
- go/tags: none

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

Google Cloud Storage

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

rclone ls my-remote:

The rclone config contents with secrets removed.

type = google cloud storage
project_number = hidden
service_account_file = hidden
bucket_policy_only = true
location = us-central1

A log from the command with the -vv flag

[caleb@server: Dropbox]$ rclone -vv --dump headers ls my-remote:
2022/07/05 09:09:26 DEBUG : Using config file from "hidden"
2022/07/05 09:09:26 DEBUG : rclone: Version "v1.55.1-DEV" starting with parameters ["rclone" "-vv" "--dump" "headers" "ls" my-remote:"]
2022/07/05 09:09:26 DEBUG : Creating backend with remote "my-remote:"
2022/07/05 09:09:26 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2022/07/05 09:09:26 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/07/05 09:09:26 DEBUG : HTTP REQUEST (req 0xc000626000)
2022/07/05 09:09:26 DEBUG : POST /token HTTP/1.1
Host: oauth2.googleapis.com
User-Agent: rclone/v1.55.1-DEV
Content-Length: 815
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip

2022/07/05 09:09:26 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/07/05 09:09:26 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/07/05 09:09:26 DEBUG : HTTP RESPONSE (req 0xc000626000)
2022/07/05 09:09:26 DEBUG : Error: dial tcp hidden_ip: connect: connection refused
2022/07/05 09:09:26 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/07/05 09:09:26 DEBUG : pacer: Reducing sleep to 528.695µs
2022/07/05 09:09:26 DEBUG : 2 go routines active
2022/07/05 09:09:26 Failed to ls: Get "https://storage.googleapis.com/storage/v1/b?alt=json&maxResults=1000&prettyPrint=false&project=640740288222": oauth2: cannot fetch token: Post "https://oauth2.googleapis.com/token": dial tcp hidden ip: connect: connection refused

Yes, that's a firewall blocking you.

That's also an old version so you'd want to update/use the current version.

Install (rclone.org)

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