Unexpected EOF when using crypt on ACD with Plex

Is there any solution to the unexpected EOF errors when using crypt + ACD? This error appears very often when streaming with Plex. I’d be happy to run any tests or provide log files needed to help.

Sometimes rclone will retry a few times and in Plex it just looks like it is buffering. Most times though rclone will retry a couple times, never 10 times, and the Plex client kicks you back into the main menu as if the file just finished playing completely.

If you could post a log of it happening using the latest beta and -v that would be helpful.

Retries will take time (a few seconds maybe) - is it possible Plex is just giving up if the read took too long?

There might be a problem with the retries in rclone too - the log will help with that.

Here is the log file. Started a movie from the beginning then skipped around a couple times and triggered the EOF error.

rclone_mount.log

Here is another snippet of the log. I was watching a movie from the beginning and it was working fine for about 51 minutes then got the unexpected EOF message.

2017/01/17 00:15:38 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read OK
2017/01/17 00:15:38 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 131072 offset 954990592
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 954990592 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 131072 offset 955121664
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 955121664 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 61440 offset 954863616
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 954863616 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 954990592
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read error: low level retry 2/10: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 954990592 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 954863616
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 954863616 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 955056128
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 955056128 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 955056128
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 955056128 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 955187200
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 955187200 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 955056128
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 955056128 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read size 4096 offset 955056128
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.seek from 954990592 to 955056128 (io.Seeker)
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read io.Seeker failed: unexpected EOF
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Flush
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Flush OK
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Flush
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Flush OK
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Release closing
2017/01/17 00:16:37 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Release OK

Thank you for the log - very helpful.

Ah, I see what is happening...

It isn't retrying properly because you are using crypt...

And it isn't retrying properly after the first one - it is returning the error straight to the caller...

So the retries are not working as intended!

I made an issue to fix it, and I'll post a beta for you to try here.

1 Like

Thanks so much for taking a look! I’m looking forward to the beta with the potential fix.

This should be fixed in this beta: http://beta.rclone.org/v1.35-35-ga6b4065/ (uploaded in 15-30 mins)

Let me know how it goes!

Thanks

Nick

1 Like

Nice to see by the time i reencrypt whole lib most crypt issues will be ironed out.

p.s. Hoping got checksum support :stuck_out_tongue:

Looks like so far the EOF errors are gone. Now the only thing I’m seeing now is messages like this:

2017/01/18 06:37:40 pacer: Rate limited, sleeping for 480.279449ms (1 consecutive low level retries)
2017/01/18 06:37:40 pacer: low level retry 1/10 (error HTTP code 500: "500 Internal Server Error": response body: "{\"message\":\"Internal failure\"}")
2017/01/18 06:37:43 pacer: Rate limited, sleeping for 760.398084ms (2 consecutive low level retries)
2017/01/18 06:37:43 pacer: low level retry 2/10 (error HTTP code 500: "500 Internal Server Error": response body: "{\"message\":\"Internal failure\"}")
2017/01/18 06:37:43 pacer: Resetting sleep to minimum 20ms on success

Sometimes the success happens before the 10th retry but not always. I’m going to bump up the low level retries up to 20. Any idea what is causing these 500 Internal Server Errors?

That looks good.

Amazon being flaky, or doing some kind of rate limiting would be my guess.

I am still getting the same error with the latest beta.

root@Plexflix:~# rclone --version
rclone v1.35-36-ga4bf22eβ

" TV/The Walking Dead/Season 6/The.Walking.Dead.S06E09.Custom.DKSubs.720p.HDTV.x264-UNiTY/The.Walking.Dead.S06E09.Custom.DKSubs.720p.HDTV.x264-UNiTY.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/17 21:26:10 TV/The Walking Dead/Season 6/The.Walking.Dead.S06E09.Custom.DKSubs.720p.HDTV.x264-UNiTY/The.Walking.Dead.S06E09.Custom.DKSubs.720p.HDTV.x264-UNiTY.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/18 02:06:06 Movies/White.House.Down.2013.1080p.BluRay.x264.YIFY.mp4: ReadFileHandle.Read error: low level retry 1/10: couldn’t reopen file with offset: needs retry
2017/01/18 12:34:23 TV/Futurama/Season 1/Futurama.S01E06.A.Fishful.of.Dollars.DVDRip.x264.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/18 16:31:38 Bollywood/De Dana Dan 2009 720p BRRip CharmeLeon SilverRG.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/18 18:41:24 Bollywood/De Dana Dan 2009 720p BRRip CharmeLeon SilverRG.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/18 18:52:18 Bollywood/De Dana Dan 2009 720p BRRip CharmeLeon SilverRG.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF
2017/01/18 20:14:45 TV/The Walking Dead/Season 6/The.Walking.Dead.S06E11.REPACK.Custom.DKSubs.720p.HDTV.x264-UNiTY/The.Walking.Dead.S06E11.REPACK.Custom.DKSubs.720p.HDTV.x264-UNiTY.mkv: ReadFileHandle.Read error: low level retry 1/10: unexpected EOF"

You can expect to see some of these errors, but the retries should be working now and it should carry on.

What do you see?

It shows this error, and there comes a small buffering and it then continues playing the video :slight_smile:

That is way better than what it used to do which was kick you out of the video completely. Sometimes I wouldn’t even be able to reopen the video. I’ll take some buffering over that.

Why does it happen, since on none crypt mount i never saw those error, its seems its strictly for crypt mounts.

Can confirm seeing this in new beta.

I’ve not come upon it myself when watching something so I can’t say if it resumes or not. Hopefully (or not) I’ll get it sometime soon.

@harambe is it possible your server is loosing connection.

Make new simple script and run it in background while watching something. When you get errors check in log file if your connection was down. .

#!/bin/bash
IP=‘8.8.8.8’
echo “LOG FAILED PINGS”
echo “Pres CTRL+C to exit…”
for (( ; ; ))
do
# -c1 one ping, -t300 ms timeout
fping -c1 -t300 $IP 2>/dev/null 1>/dev/null
sleep 0.5
if [ “$?” != 0 ]; then
echo “$(date “+%d.%m.%Y %T”) ERROR: Ping timeout” >>~/pingtimeouts.log
fi
done
exit

Ran it and streamed for 20-30 minutes, nothing in the file

I’ve had a few EOF errors now but none of them have caused a disconnect that I am aware of.

2017/01/19 00:38:26 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF
2017/01/19 00:42:53 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF
2017/01/19 00:44:54 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF
2017/01/19 00:48:17 Movies/The Good, the Bad and the Ugly_1966_720p_AC3_.mkv: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF
2017/01/19 21:32:09 Movies/Despicable Me Presents Minion Madness_2010_BR-Rip_Movies.mp4: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF
2017/01/19 21:37:21 Movies/Despicable Me Presents Minion Madness_2010_BR-Rip_Movies.mp4: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF
2017/01/19 22:14:38 Movies/Alvin and the Chipmunks meet Frankenstein_1999_DVD-Rip_MP3_alvin.avi: ReadFileHandle.Read error: low level retry 1/20: unexpected EOF