tonywagner / mlbserver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unhandled rejection RequestError: Error: ETIMEDOUT

ahughes03 opened this issue · comments

Hey there, me again. Firstly, thanks for all your work on this- it's a really cool project and I'm glad I found it. Let me know if there's a way I can help support it's development.

Secondly, I've started to see the following error when trying to pull a stream via xTeVe. First, here's the error pulled from the systemd log for mlbserver.

Jul 28 11:54:02 mlbserver[713549]: 7/28/2021, 11:54:02 AM stream.m3u8 request : /stream.m3u8?team=XXX&mediaType=Video&resolution=720p60
Jul 28 11:54:18 mlbserver[713549]: Unhandled rejection RequestError: Error: ETIMEDOUT
Jul 28 11:54:18 mlbserver[713549]:     at new RequestError (/usr/local/lib/node_modules/mlbserver/node_modules/request-promise-core/lib/errors.js:14:15)
Jul 28 11:54:18 mlbserver[713549]:     at Request.plumbing.callback (/usr/local/lib/node_modules/mlbserver/node_modules/request-promise-core/lib/plumbing.js:87:29)
Jul 28 11:54:18 mlbserver[713549]:     at Request.RP$callback [as _callback] (/usr/local/lib/node_modules/mlbserver/node_modules/request-promise-core/lib/plumbing.js:46:31)
Jul 28 11:54:18 mlbserver[713549]:     at self.callback (/usr/local/lib/node_modules/mlbserver/node_modules/request/request.js:185:22)
Jul 28 11:54:18 mlbserver[713549]:     at Request.emit (events.js:375:28)
Jul 28 11:54:18 mlbserver[713549]:     at Timeout.<anonymous> (/usr/local/lib/node_modules/mlbserver/node_modules/request/request.js:851:16)
Jul 28 11:54:18 mlbserver[713549]:     at listOnTimeout (internal/timers.js:557:17)
Jul 28 11:54:18 mlbserver[713549]:     at processTimers (internal/timers.js:500:7)

And here's the relevant error from xTeVe:

2021-07-28 11:51:59 [xTeVe] FFMPEG log:             [tcp @ 0x7f493aae2c80] Connection to tcp://10.0.0.11:9999 failed: Connection refused
2021-07-28 11:51:59 [xTeVe] FFMPEG log:             [hls @ 0x7f648b7375c0] Error when loading first segment 'http://10.0.0.11:9999/ts?url=https...[snipped]

Any thoughts? It seems like maybe mlbserver isn't allowing a TCP request?

That's a timeout on an outgoing request that mlbserver is making. It appears to be timing out when fetching a stream segment, according to the xTeVe log. If it is happening for you consistently, it could it be an account or network issue.

What happens if you load the same stream URL outside xTeVe? You could open it in a media player, or save a 5 second sample with ffmpeg like so:

ffmpeg -i "http://10.0.0.11:9999/stream.m3u8?team=XXX&mediaType=Video&resolution=720p60" -map 0 -c copy -t 5 -y test.ts

I've just pushed another update, and I added a "catch" statement to the stream segment request, so it should log more gracefully. Although that may not help identify the source of the timeout problem.

Hey, thanks for the quick update! So right now, I'm not having any issues with xTeVe, so it seems like (for the time being), they're playing nicely together. If things change, I'll be sure to try loading a stream URL outside xTeVe to see what happens. I'll leave the issue open for now, only to have a space to report back if needed.

Thanks again for all the updates/support, it's a great program!

I don't think it would be anything unique to xTeVe, although it's always nice to confirm. Could have just been a network or provider oddity, I've seen similar things from time to time. If it happened twice in a row, on different games a few minutes apart, I'd try stopping mlbserver if necessary and running it again with the "--logout" option. If that didn't help, I'd try watching at the official site in a browser with the same account, preferably on the same computer or at least same network.

mlbserver exits on any failed request, just in case it's a deliberate rejection and repeated attempts could make it worse.

I'll close the issue for now but feel free to comment if it happens again. Feel free to share any other feedback or requests!