Error 'connect: network is unreachable' with certain commands

What is the problem you are having with rclone?

When running certain commands, including size and bisync, rclone will sometimes report a network error, even though the network connection is good, and other commands (like lsd), continue to function normally. Please help :-}

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

pi@photoprismpi:~ $ rclone version
rclone v1.64.2

  • os/version: raspbian 11.8 (64 bit)
  • os/kernel: 6.1.21-v8+ (aarch64)
  • os/type: linux
  • os/arch: arm (ARMv7 compatible)
  • go/version: go1.21.3
  • go/linking: static
  • go/tags: none

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

Google Drive (using custom Google API)

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

pi@photoprismpi:~ $ rclone size Maria-GDrive-Photos:
2023/10/26 18:55:53 Failed to size: couldn't list directory: Get "https://www.googleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CexplicitlyTrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%2CshortcutDetails%2CexportLinks%2CresourceKey%29%2CnextPageToken%2CincompleteSearch&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%271OOnW7txvjaZols9hhZIKeXYbT84V8Yfo%27+in+parents%29&supportsAllDrives=true": dial tcp [2607:f8b0:402a:804::200a]:443: connect: network is unreachable

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

pi@photoprismpi:~ $ rclone config redacted
[Maria-GDrive-Photos]
type = drive
client_id = XXX
client_secret = XXX
scope = drive
token = XXX
team_drive =
root_folder_id = XXX
### Double check the config for sensitive info before posting publicly

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

pi@photoprismpi:~ $ rclone size Maria-GDrive-Photos: -vv
2023/10/26 19:06:41 DEBUG : rclone: Version "v1.64.2" starting with parameters ["rclone" "size" "Maria-GDrive-Photos:" "-vv"]
2023/10/26 19:06:41 DEBUG : Creating backend with remote "Maria-GDrive-Photos:"
2023/10/26 19:06:41 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2023/10/26 19:06:46 DEBUG : 6 go routines active
2023/10/26 19:06:46 Failed to size: couldn't list directory: Get "https://www.googleapis.com/drive/v3/files?alt=json&fields=files%28id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CexplicitlyTrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%2CshortcutDetails%2CexportLinks%2CresourceKey%29%2CnextPageToken%2CincompleteSearch&includeItemsFromAllDrives=true&pageSize=1000&prettyPrint=false&q=trashed%3Dfalse+and+%28%271ayS-KQHCUeMmJbumjnibwOrx3rNZzr9X%27+in+parents%29&supportsAllDrives=true": dial tcp [2607:f8b0:402a:804::200a]:443: connect: network is unreachable

Those are actually as you said network errors.

Do you have IPV6 enabled? Something blocking it?

Thank you for your support! I don't know if I have IPV6 enabled or not... how would I check?

All I know is that the internet connection is working, because if I list the directories in the virtual folder, I get a valid response. Also, I'm currently performing a bisync --resync operation that is actively uploading.

Example of network response:

pi@photoprismpi:~ $ rclone lsd Maria-GDrive-Photos:
          -1 2023-10-25 23:16:32        -1 1979-1999
          -1 2023-10-25 23:13:47        -1 2000
          -1 2023-10-25 23:14:08        -1 2001
          -1 2023-10-25 23:13:49        -1 2002
          -1 2023-10-25 23:14:07        -1 2003
          -1 2023-10-25 23:15:50        -1 2004
          -1 2023-10-25 23:13:46        -1 2005
          -1 2023-10-25 23:14:06        -1 2006
          -1 2023-10-25 23:14:18        -1 2007
          -1 2023-10-25 23:57:47        -1 2008
          -1 2023-10-25 23:16:50        -1 2009
          -1 2023-10-25 23:18:18        -1 2010
          -1 2023-10-25 23:14:20        -1 2011
          -1 2023-10-25 23:25:08        -1 2012
          -1 2023-10-25 23:14:54        -1 2013
          -1 2023-10-25 23:14:21        -1 2014
          -1 2023-10-26 00:49:49        -1 2015
          -1 2023-10-26 00:40:49        -1 2016
          -1 2023-10-26 02:14:59        -1 2017
          -1 2023-10-26 00:28:42        -1 2018
          -1 2023-10-26 03:32:22        -1 2019
          -1 2023-10-26 04:04:34        -1 2020
          -1 2023-10-26 08:58:34        -1 2021
          -1 2023-10-26 04:04:45        -1 2022
          -1 2023-10-26 18:02:42        -1 Family History

Interestingly, it seems that I only have this error with a folder that already has files in it. Initially, I tried a bysync --resync command with a Google Drive folder that already had files in it, and it had this error. Then I tried it with an empty Google Drive folder, and it worked fine... I don't know why this would make a difference.

You would probably want to check with your ISP/provider and see.

The error just means you had a network timeout. Not really much to do with rclone.

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