Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endless Loop #84

Closed
kpirnie opened this issue Aug 19, 2024 · 23 comments
Closed

Endless Loop #84

kpirnie opened this issue Aug 19, 2024 · 23 comments
Labels
bug Something isn't working

Comments

@kpirnie
Copy link
Contributor

kpirnie commented Aug 19, 2024

Describe the bug

Getting an endless loop with a few "channels". Just getting this message over and over

2024/08/19 09:15:20 Proxying 192.168.2.20:59276 to http://my_provider/the_channel_THIRD.m3u8
2024/08/19 09:15:20 Current number of connections for M3U_1: 1
2024/08/19 09:15:20 Stream ended (EOF reached): 192.168.2.20:59276
2024/08/19 09:15:20 Exit code 1 received from http://my_provider/the_channel_THIRD.m3u8
2024/08/19 09:15:20 Server connection failed: http://my_provider/the_channel_THIRD.m3u8
2024/08/19 09:15:20 Retrying other servers...
2024/08/19 09:15:20 Current number of connections for M3U_1: 0
2024/08/19 09:15:20 Current number of connections for M3U_1: 0

I have 3 separate streams to this specific channel, none of the others get "tried", and this one is actually the last in the list of them.
Example:

#EXTINF:-1 tvg-id="0.0-z - Roseanne" tvg-chno="0.0" tvg-name="z - Roseanne", z - Roseanne
http://my_provider/the_channel_FIRST.m3u8
#EXTINF:-1 tvg-id="0.0-z - Roseanne" tvg-chno="0.0" tvg-name="z - Roseanne", z - Roseanne
http://my_second_provider/the_channel_SECOND
#EXTINF:-1 tvg-id="0.0-z - Roseanne" tvg-chno="0.0" tvg-name="z - Roseanne", z - Roseanne
http://my_provider/the_channel_THIRD.m3u8
@kpirnie kpirnie added the bug Something isn't working label Aug 19, 2024
@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 19, 2024

@sonroyaalmerol if needed, I can send you the actual URL streams for this one, would prefer to do that privately if possible...

@aniel300
Copy link

@kpirnie i also got an error like this the other day. hopefully a fix can be implemented 🙏

@sonroyaalmerol
Copy link
Owner

I've added some logic to track the failed M3Us so it doesn't attempt to try them again. Can you try them out on the latest dev build?

@aniel300
Copy link

is there a way to implement a retry option?

@sonroyaalmerol
Copy link
Owner

Yes, i'm planning to implement retries with customizable max retries after i've confirmed the current solution to be working.

@aniel300
Copy link

you are a God sent.

@aniel300
Copy link

aniel300 commented Aug 20, 2024

@sonroyaalmerol here are my logs in case it is of any help, thanks.
#72 (comment)

2024/08/13 02:56:58 Received request from xxx:2590 for URL: /stream/TEE6IFRlbGVtdW5kbyBGb3J0IE15ZXJzIEZsb3JpZGEgV1dEVCBDRA==
2024/08/13 02:56:58 Current number of connections for M3U_1: 0
2024/08/13 02:56:58 Proxying xxx:2590 to http://xxxx.xyz:8080/xxx/xxx/295847
2024/08/13 02:56:58 Current number of connections for M3U_1: 1
2024/08/13 02:59:23 Stream ended (EOF reached): xxx:2590
2024/08/13 02:59:23 Current number of connections for M3U_1: 0
2024/08/13 02:59:23 Exit code 1 received from http://xxx.xyz:8080/xxx/xxx/295847
2024/08/13 02:59:23 Server connection failed: http://xxx.xyz:8080/xxx/xxx/295847
2024/08/13 02:59:23 Retrying other servers...
2024/08/13 02:59:23 http: superfluous response.WriteHeader call from main.streamHandler (stream_handler.go:155)****

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 20, 2024

Yes, i'm planning to implement retries with customizable max retries after i've confirmed the current solution to be working.

i am unable to test due to issue #89

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 23, 2024

Issue appears to be corrected

@kpirnie kpirnie closed this as completed Aug 23, 2024
@aniel300
Copy link

was there an update that fixed this?

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 23, 2024

was there an update that fixed this?

Not sure. It's possible the fix for the WRONGTYPE also had fixes for this tho

@aniel300
Copy link

ahhh ok

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 24, 2024

So... while the streams are back working again, it does not seem that the MAX_RETRIES is. Hit an endless loop with one of my non-working channels today

2024/08/24 06:53:53 Current number of connections for M3U_1: 0
2024/08/24 06:53:53 Current number of connections for M3U_1: 0
2024/08/24 06:53:54 [DEBUG] Successfully fetched stream from http://myprovider/1356094.m3u8
2024/08/24 06:53:54 Proxying 192.168.2.20:56427 to http://myprovider/1356094.m3u8
2024/08/24 06:53:54 Current number of connections for M3U_1: 1
2024/08/24 06:53:54 Stream ended (EOF reached): 192.168.2.20:56427
2024/08/24 06:53:54 Exit code 1 received from http://myprovider/1356094.m3u8
2024/08/24 06:53:54 Retrying other servers...
2024/08/24 06:53:54 [DEBUG] Stream attempt 1 out of 5
2024/08/24 06:53:54 Skipping M3U_1: marked as previous stream
2024/08/24 06:53:54 [DEBUG] All streams skipped in lap 0
2024/08/24 06:53:54 [DEBUG] Stream attempt 2 out of 5

Repeats until I change the "channel".

@kpirnie kpirnie reopened this Aug 24, 2024
@sonroyaalmerol
Copy link
Owner

Can I confirm if this only happens on .m3u8 streams?

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 24, 2024

Can I confirm if this only happens on .m3u8 streams?

I'll see if I have any that are not m3u or m3u8 and get back to ya :)

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 24, 2024

It does appear to be only the m3u8 streams that are doing it.

@sonroyaalmerol
Copy link
Owner

I just merged the fix to properly handle m3u files. It should be up in the dev image now

@aniel300
Copy link

m3u or m3u8?

@sonroyaalmerol
Copy link
Owner

Should include both

@aniel300
Copy link

aniel300 commented Aug 24, 2024

ok perfect and thank you.

@kpirnie
Copy link
Contributor Author

kpirnie commented Aug 24, 2024

There we go. Perfection :)

@kpirnie kpirnie closed this as completed Aug 24, 2024
@gsanguinetti
Copy link

Hi! I've reached out to this error too. I hope you can include it in a release version soon so I can pick it up in my arm64 docker (dev image is only available for amd64).

@sonroyaalmerol
Copy link
Owner

Should be included in 0.12.1. I just triggered the build and will be done in a few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants