Rclone rc connect on specific port

Hopefully a simple question, but I can’t figure out how to I specify the port when connecting using rc

So I have a remote mounted and added rc mount options like this:

–rc --rc-addr=localhost:5673

and now I would like to refresh a dir in the mount

If I do not specify a port I can do this:

rclone rc vfs/refresh dir="/plex" recursive=true

But not quite sure how I specify the port in that previous command?

Thanks

Ok, so I think I found it. Needed to add this to the rc command:

–url :portnumber

But now I get an error when trying to run on large directories:

net/http: timeout awaiting response headers

I saw some stuff on timeouts, but I thought the default was 1hr, but it’s happening way before that.

What’s the actual command you are running?

If you have it running on a different port, you’d do:

rclone rc vfs/refresh recursive=true --rc-addr=localhost:5573
{
	"result": {
		"": "OK"
	}
}

Thanks, at the moment I have removed the port, my mount command just includes this --rc so it runs on the default port, so am now running this command:

rclone rc vfs/refresh dir=/plex/Movies recursive=true

but am getting an error:

Failed to rc: connection failed: Post http://localhost:5572/vfs/refresh: net/http: timeout awaiting response headers

I think my Movies folder might just be too big… :wink:

And I think i tried your example, like this:

rclone rc --rc-addr=localhost:5673 vfs/refresh dir=/plex/Movies

But then it did not find the folder, which was where I stared getting confused.

But may be it needs to be at the end of the command?

So just tried some more commands and all these seemed to work:

rclone rc vfs/refresh dir=/plex/Movies --rc-addr=localhost:5683
rclone rc vfs/refresh dir=/plex/Movies --url=:5683
rclone rc vfs/refresh dir=/plex/Movies --url :5683

“result”: {
“/plex/Movies”: “OK”
}

But adding recursive=true (sometimes) causes the net/http error

e.g. rclone rc vfs/refresh dir=/plex/Movies recursive=true --url :5683

Did just try it again and this time it seemed to work… so am still a bit confused

How long does it run before that?

It seems to be quite random, a few minutes maybe 10 to 15 mins before the error.

I have just tried refreshing my TV Folder and that failed 2 twice before working:

First time:
rclone rc vfs/refresh dir="/plex/TV (mkv)" recursive=true --url :5683
2019/04/18 22:57:51 Failed to rc: connection failed: Post http://localhost:5683/vfs/refresh: net/http: timeout awaiting response headers

Second time:
rclone rc vfs/refresh dir="/plex/TV (mkv)" recursive=true --url :5683
2019/04/18 23:09:47 Failed to rc: connection failed: Post http://localhost:5683/vfs/refresh: net/http: timeout awaiting response headers

Third time:
rclone rc vfs/refresh dir="/plex/TV (mkv)" recursive=true --url :5683
{
“result”: {
“/plex/TV (mkv)”: “OK”
}
}

What’s the number of directories ? What version are you running as well?

You can check via

[felix@gemini GD]$ find . -type d | wc -l
1119
[felix@gemini GD]$ find . -type f | wc -l
30330

Results for those 2 dirs:

Movies: Dirs: 5414 Files: 7379
TV (mkv): Dirs: 3345 Files: 34251

rclone --version

rclone v1.47.0
- os/arch: linux/amd64
- go version: go1.12.4

rclone is running on my Synology DS1815+ Nas

Edit:
Just tried with debug and seems to fail after 5 Mins:

2019/04/19 09:20:24 DEBUG : rclone: Version "v1.47.0" starting with parameters ["./rclone" "-vv" "rc" "vfs/refresh" "dir=/plex/TV (mkv)" "recursive=true" "--url" ":5683"]

2019/04/19 09:25:24 Failed to rc: connection failed: Post http://localhost:5683/vfs/refresh: net/http: timeout awaiting response headers

Are you using your own API key/client iD?

Can you check the mount log and see if it’s generating errors ?

ha ha, I thought I was, but feeling a bit of a numpty now :wink: (But it was getting a bit late [for me] yesterday...)

Got too many configs and something got missed somewhere....

I have a few api keys so I can supposedly keep an eye on usage on my different devices, nas, dedi, desktop etc...

And the remote I was using on the nas was missing the api key. (In fact I was using the wrong remote...) Doh!

Changed the mount to use the correct remote, and all good now, can refresh the whole plex directory :slight_smile:

rclone -vvv rc vfs/refresh dir="/plex" recursive=true --rc-addr=localhost:5683
2019/04/19 11:57:40 DEBUG : rclone: Version "v1.47.0" starting with parameters ["./rclone" "-vvv" "rc" "vfs/refresh" "dir=/plex" "recursive=true" "--rc-addr=localhost:5683"]
{
     "result": {
        "/plex": "OK"
    }
}

Thanks for the pointers :slight_smile:

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