Rclone copy on android fails with connection refused

STOP and READ USE THIS TEMPLATE NO EXCEPTIONS - By not using this, you waste your time, our time and really hate puppies. Please remove these two lines and that will confirm you have read them.

What is the problem you are having with rclone?

I can't seem to be able to download a file from an http server using rclone

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

rclone v1.65.0

  • os/version: unknown
  • os/kernel: 5.15.78-android13-8-27100863-abS9180ZHU2AWH1 (aarch64)
  • os/type: linux
  • os/arch: arm64 (ARMv8 compatible)
  • go/version: go1.21.4
  • go/linking: static
  • go/tags: none

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

http

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

./rclone copy --http-url https://[redacted]/ ":http:/[redacted].7z" "/data/local/tmp" --tpslimit 1.0 --tpslimit-burst 31

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

2023/11/30 15:15:15 NOTICE: Config file "/.rclone.conf" not found - using defaults
; empty config

A log from the command that you were trying to run with the -vv flag

2023/11/30 15:15:59 DEBUG : Configuration directory could not be created and will not be used: mkdir /.config: read-only file system
2023/11/30 15:15:59 INFO  : Starting transaction limiter: max 1 transactions/s with burst 31
2023/11/30 15:15:59 DEBUG : rclone: Version "v1.65.0" starting with parameters ["./rclone" "copy" "--http-url" "https://[redacted]/" ":http:/[redacted].7z" "/data/local/tmp" "--tpslimit" "1.0" "--tpslimit-burst" "31" "-vv"]
2023/11/30 15:15:59 DEBUG : Creating backend with remote ":http:/[redacted].7z"
2023/11/30 15:15:59 NOTICE: Config file "/.rclone.conf" not found - using defaults
2023/11/30 15:15:59 DEBUG : :http: detected overridden config - adding "{F-Sdc}" suffix to name
2023/11/30 15:15:59 DEBUG : Assuming path is a file as HEAD request could not be sent: Head "https://[redacted]/[redacted].7z": dial tcp: lookup [redacted] on [::1]:53: read udp [::1]:45393->[::1]:53: read: connection refused
2023/11/30 15:15:59 DEBUG : If path is a directory you must add a trailing '/'
2023/11/30 15:15:59 DEBUG : Root: https://[redacted]/
2023/11/30 15:15:59 DEBUG : fs cache: adding new entry for parent of ":http:/[redacted].7z", ":http{F-Sdc}:/[redacted].7z"
2023/11/30 15:15:59 DEBUG : Creating backend with remote "/data/local/tmp"
2023/11/30 15:15:59 ERROR : Attempt 1/3 failed with 1 errors and: failed to stat: Head "https://[redacted]/[redacted].7z": dial tcp: lookup [redacted] on [::1]:53: read udp [::1]:43445->[::1]:53: read: connection refused
2023/11/30 15:15:59 ERROR : Attempt 2/3 failed with 1 errors and: failed to stat: Head "https://[redacted]/[redacted].7z": dial tcp: lookup [redacted] on [::1]:53: read udp [::1]:58403->[::1]:53: read: connection refused
2023/11/30 15:15:59 ERROR : Attempt 3/3 failed with 1 errors and: failed to stat: Head "https://[redacted]/[redacted].7z": dial tcp: lookup [redacted] on [::1]:53: read udp [::1]:56264->[::1]:53: read: connection refused
2023/11/30 15:15:59 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.0s

2023/11/30 15:15:59 DEBUG : 4 go routines active
2023/11/30 15:15:59 Failed to copy: failed to stat: Head "https://[redacted]/[redacted].7z": dial tcp: lookup [redacted] on [::1]:53: read udp [::1]:56264->[::1]:53: read: connection refused

welcome to the forum,

looks like a dns issue.
do you have a dns server at the ipv6 address?

might try to --bind to a ipv4 address

Thanks, but curl to that domain seems to be working ok.. I tried binding to the domain IP as well, with no luck...

not sure what that is?

this format works

rclone copy :http,url='https://downloads.rclone.org':/v1.65.0/rclone-v1.65.0-linux-amd64.zip d:\files\zzz -vv 
DEBUG : Setting --config "C:\\data\\rclone\\rclone.conf" from environment variable RCLONE_CONFIG="C:\\data\\rclone\\rclone.conf"
DEBUG : rclone: Version "v1.65.0" starting with parameters ["c:\\data\\rclone\\rclone.exe" "copy" ":http,url='https://downloads.rclone.org':/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "d:\\files\\zzz" "-vv"]
DEBUG : Creating backend with remote ":http,url='https://downloads.rclone.org':/v1.65.0/rclone-v1.65.0-linux-amd64.zip"
DEBUG : Using config file from "C:\\data\\rclone\\rclone.conf"
DEBUG : :http: detected overridden config - adding "{Zhl7M}" suffix to name
DEBUG : Assuming path is a file as HEAD response is success (200 OK)
DEBUG : If path is a directory you must add a trailing '/'
DEBUG : Root: https://downloads.rclone.org/v1.65.0/
DEBUG : fs cache: adding new entry for parent of ":http,url='https://downloads.rclone.org':/v1.65.0/rclone-v1.65.0-linux-amd64.zip", ":http{Zhl7M}:/v1.65.0/rclone-v1.65.0-linux-amd64.zip"
DEBUG : Creating backend with remote "d:\\files\\zzz"
DEBUG : fs cache: renaming cache item "d:\\files\\zzz" to be canonical "//?/d:/files/zzz"
DEBUG : rclone-v1.65.0-linux-amd64.zip: Need to transfer - File not found at Destination
DEBUG : rclone-v1.65.0-linux-amd64.zip.susated9.partial: renamed to: rclone-v1.65.0-linux-amd64.zip
INFO  : rclone-v1.65.0-linux-amd64.zip: Copied (new)

have you tried rclone copyurl, it has a simpler syntax

rclone copyurl https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip d:\files\zzz\rclone-v1.65.0-linux-amd64.zip -vv 
2023/11/30 11:55:50 DEBUG : Setting --config "C:\\data\\rclone\\rclone.conf" from environment variable RCLONE_CONFIG="C:\\data\\rclone\\rclone.conf"
2023/11/30 11:55:50 DEBUG : rclone: Version "v1.65.0" starting with parameters ["c:\\data\\rclone\\rclone.exe" "copyurl" "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "d:\\files\\zzz\\rclone-v1.65.0-linux-amd64.zip" "-vv"]
2023/11/30 11:55:50 DEBUG : Creating backend with remote "d:/files/zzz/"
2023/11/30 11:55:50 DEBUG : Using config file from "C:\\data\\rclone\\rclone.conf"
2023/11/30 11:55:50 DEBUG : fs cache: renaming cache item "d:/files/zzz/" to be canonical "//?/d:/files/zzz"
2023/11/30 11:55:54 INFO  : 
Transferred:   	   19.372 MiB / 19.372 MiB, 100%, 4.973 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         4.2s

copyurl didn't seem to change anything:

dm3q:/data/local/tmp $ ./rclone copyurl https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip . --bind >
2023/11/30 18:30:01 DEBUG : Configuration directory could not be created and will not be used: mkdir /.config: read-only file system
2023/11/30 18:30:01 DEBUG : rclone: Version "v1.65.0" starting with parameters ["./rclone" "copyurl" "https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "." "--bind" "0.0.0.0" "-vv"]
2023/11/30 18:30:01 DEBUG : Creating backend with remote "."
2023/11/30 18:30:01 NOTICE: Config file "/.rclone.conf" not found - using defaults
2023/11/30 18:30:01 DEBUG : fs cache: renaming cache item "." to be canonical "/data/local/tmp"
2023/11/30 18:30:01 ERROR : Attempt 1/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:38652->[::1]:53: read: connection refused
2023/11/30 18:30:01 ERROR : Attempt 2/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:49010->[::1]:53: read: connection refused
2023/11/30 18:30:01 ERROR : Attempt 3/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:52920->[::1]:53: read: connection refused
2023/11/30 18:30:01 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.0s

2023/11/30 18:30:01 DEBUG : 4 go routines active
2023/11/30 18:30:01 Failed to copyurl: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:52920->[::1]:53: read: connection refused

on windows it works just fine, android shows those errors. however, ping to the domain seems ok, as well as curl

Are you on mobile network? If yes then try on wifi.

The issue is DNS/go related. It is well known problem. If you are interested you can read more -

I'm on wifi.. Also, ping and curl work ok, so that can't be a dns issue? Unless it's specific to rclone?

on termux, do you actually have a dns server on ipv6?

to force ipv4, --bind=0.0.0.0 or change 0.0.0.0 to whatever your local ipv4 address is.
check the rclone docs for details.

and it worked for me

~ $ rclone copyurl https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip . -vv
2023/11/30 19:29:00 DEBUG : rclone: Version "1.65.0-termux" starting with parameters ["rclone" "copyurl" "https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "." "-vv"]
2023/11/30 19:29:00 DEBUG : Creating backend with remote "."
2023/11/30 19:29:00 DEBUG : Using config file from "/data/data/com.termux/files/home/.config/rclone/rclone.conf"
2023/11/30 19:29:00 DEBUG : fs cache: renaming cache item "." to be canonical "/data/data/com.termux/files/home"
2023/11/30 19:29:07 INFO  :
Transferred:       19.372 MiB / 19.372 MiB, 100%, 2.888 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:         6.9s

I'm on adb shell right now, not on termux, and ifconfig shows the following output (among other interfaces):

wlan0     Link encap:UNSPEC    Driver cnss_pci
          inet addr:10.100.102.236  Bcast:10.100.102.255  Mask:255.255.255.0
          inet6 addr: fe80::f00d:94ff:fe7e:d7a/64 Scope: Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3658170 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2287092 errors:0 dropped:213 overruns:0 carrier:0
          collisions:0 txqueuelen:3000
          RX bytes:3989620504 TX bytes:738556501

this the IP I connect to using adb connect, but using --bind with this IP shows the same error...

for me, rclone on adb
--- ipv4 did work
--- ipv6 did NOT work

./rclone version
rclone v1.65.0
- os/version: unknown
- os/kernel: 5.10.157-android13-4-00003-gdfb1120f912b-ab10994928 (aarch64)
- os/type: android
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.21.4
- go/linking: dynamic
- go/tags: none

./rclone copyurl https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip ./dest/rclone-v1.65.0-linux-amd64.zip -vv --bind=0.0.0.0                                                                    <
2023/11/30 21:48:32 DEBUG : Configuration directory could not be created and will not be used: mkdir /.config: read-only file system
2023/11/30 21:48:32 DEBUG : rclone: Version "v1.65.0" starting with parameters ["./rclone" "copyurl" "https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "./dest/rclone-v1.65.0-linux-amd64.zip" "-vv" "--bind=0.0.0.0"]
2023/11/30 21:48:32 DEBUG : Creating backend with remote "./dest/"
2023/11/30 21:48:32 NOTICE: Config file "/.rclone.conf" not found - using defaults
2023/11/30 21:48:32 DEBUG : fs cache: renaming cache item "./dest/" to be canonical "/data/local/tmp/dest"
2023/11/30 21:48:51 INFO  :
Transferred:       19.372 MiB / 19.372 MiB, 100%, 1.095 MiB/s, ETA 0s
Transferred:            1 / 1, 100%
Elapsed time:        18.8s

./rclone copyurl https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip ./dest/rclone-v1.65.0-linux-amd64.zip -vv --bind=::0
2023/11/30 21:49:51 DEBUG : Configuration directory could not be created and will not be used: mkdir /.config: read-only file system
2023/11/30 21:49:51 DEBUG : rclone: Version "v1.65.0" starting with parameters ["./rclone" "copyurl" "https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "./dest/rclone-v1.65.0-linux-amd64.zip" "-vv" "--bind=::0"]
2023/11/30 21:49:51 DEBUG : Creating backend with remote "./dest/"
2023/11/30 21:49:51 NOTICE: Config file "/.rclone.conf" not found - using defaults
2023/11/30 21:49:51 DEBUG : fs cache: renaming cache item "./dest/" to be canonical "/data/local/tmp/dest"
2023/11/30 21:49:51 ERROR : Attempt 1/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp6: lookup downloads.rclone.org: no such host

This is driving me nuts...

126|:/data/local/tmp $ ./rclone copyurl https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip ./dest/rclone-v1.65.0-linux-amd64.zip -vv --bind=0.0.0.0
2023/12/01 05:06:37 DEBUG : Configuration directory could not be created and will not be used: mkdir /.config: read-only file system
2023/12/01 05:06:37 DEBUG : rclone: Version "v1.65.0" starting with parameters ["./rclone" "copyurl" "https://downloads.rclone.org:/v1.65.0/rclone-v1.65.0-linux-amd64.zip" "./dest/rclone-v1.65.0-linux-amd64.zip" "-vv" "--bind=0.0.0.0"]
2023/12/01 05:06:37 DEBUG : Creating backend with remote "./dest/"
2023/12/01 05:06:37 NOTICE: Config file "/.rclone.conf" not found - using defaults
2023/12/01 05:06:37 DEBUG : fs cache: renaming cache item "./dest/" to be canonical "/data/local/tmp/dest"
2023/12/01 05:06:37 ERROR : Attempt 1/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:35875->[::1]:53: read: connection refused
2023/12/01 05:06:37 ERROR : Attempt 2/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:53625->[::1]:53: read: connection refused
2023/12/01 05:06:37 ERROR : Attempt 3/3 failed with 1 errors and: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:47311->[::1]:53: read: connection refused
2023/12/01 05:06:37 INFO  :
Transferred:              0 B / 0 B, -, 0 B/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         0.0s

2023/12/01 05:06:37 DEBUG : 4 go routines active
2023/12/01 05:06:37 Failed to copyurl: Get "https://downloads.rclone.org/v1.65.0/rclone-v1.65.0-linux-amd64.zip": dial tcp4: lookup downloads.rclone.org on [::1]:53: read udp [::1]:47311->[::1]:53: read: connection refused

Only difference I saw is that in rclone --version, - go/linking is dynamic on your side and mine is static... also, I'm running it from /data/local/tmp while rooted since without root I get "permission denied".

Holy Moly...

in Rclone downloads, I totally missed the android builds section, so I downloaded the linux version matching my device architecture...

download an android build worked just fine...

Sorry for the trouble...

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