Jump to content

Have to restart daily


pinkfamily7

Recommended Posts

Gerrit507

I still can't believe how live-tv is working at all on your server.

 

In the whole log you got four HTTP 200 (everything OK) responses from tvheadend server like those:

2019-05-04 06:12:38.873 Info HttpClient: Http response 200 from http://localhost:9981/stream/channelid/1926461171?ticket=73D5DABEE7355A342CCD14ABDF2886C14DA34808 after 341ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, Connection=close
2019-05-04 07:56:42.532 Info HttpClient: Http response 200 from http://localhost:9981/stream/channelid/1926461171?ticket=860BC94153A23911A215D7C5744672C12BF664B2 after 516ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, Connection=close

And then 77924 (!) 401 (Unauthorized) responses like those:

2019-05-04 09:46:51.555 Info HttpClient: Http response 401 from http://localhost:9981/stream/channelid/1926461171?ticket=860BC94153A23911A215D7C5744672C12BF664B2 after 1ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, WWW-Authenticate=Basic realm="tvheadend", Connection=close
2019-05-04 09:46:51.555 Info HttpClient: Http response 401 from http://localhost:9981/stream/channelid/1926461171?ticket=489F20170F8C73C68DAC275398C764B537C4D3BA after 1ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, WWW-Authenticate=Basic realm="tvheadend", Connection=close
2019-05-04 09:46:51.558 Error App: Error copying live stream, will keep trying.
	*** Error Report ***
	Version: 4.1.1.0
	Command line: /opt/emby-server/system/EmbyServer.dll -programdata /var/lib/emby -ffdetect /opt/emby-server/bin/ffdetect -ffmpeg /opt/emby-server/bin/ffmpeg -ffprobe /opt/emby-server/bin/ffprobe -restartexitcode 3 -updatepackage emby-server-deb_{version}_amd64.deb
	Operating system: Unix 4.15.0.48
	64-Bit OS: True
	64-Bit Process: True
	User Interactive: True
	Runtime: file:///opt/emby-server/system/System.Private.CoreLib.dll
	Processor count: 16
	Program data path: /var/lib/emby
	Application directory: /opt/emby-server/system
	MediaBrowser.Model.Net.HttpException: MediaBrowser.Model.Net.HttpException: Unauthorized
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsyncInternal(HttpRequestOptions options, String httpMethod)
	   at Emby.Server.Implementations.HttpClientManager.CoreHttpClientManager.SendAsync(HttpRequestOptions options, String httpMethod)
	   at Emby.LiveTV.TunerHosts.SharedHttpStream.OpenStream(IDisposable connectionContext, MediaSourceInfo mediaSource, String url, MediaProtocol protocol, CancellationToken cancellationToken)
	   at Emby.LiveTV.TunerHosts.SharedHttpStream.<>c__DisplayClass7_0.<<StartStreaming>b__0>d.MoveNext()
	Source: Emby.Server.Implementations
	TargetSite: Void MoveNext()
	

This basically means your emby server is trying again and again to connect to tvheadend which basically slows down the whole server...

 

It's accepting the authentication on the same channel once and another time it isn't...

 

Can you verify with another client like kodi for example which you connect directly to tvheadend if those channels are actually working on the tvheadend server. I'm quite sure at this point that this is an issue with tvheadend and not emby.

Edited by Gerrit507
Link to comment
Share on other sites

pinkfamily7

This may be a "long shot" but is Emby sending the username and password configured in the emby plug-in settings or is it somehow authenticating using the end-user client's credentials?  I imagine it would use the settings in the emby plug-in, but I've checked and double-checked those credentials, and have verified that it is correct.

Link to comment
Share on other sites

pinkfamily7

For what it's worth, I just changed my password in the plug-in settings and restarted the server-- I couldn't even load the main Emby page after I did that as it was trying (I assume) to connect to tvheadend using those incorrect credentials.  I actually had to restart the server again and go directly to the admin dashboard in order to change the password back (it wouldn't let me get back to the dashboard from the main menu after it attempted to load the main menu.)  After restarting the server after fixing the password, the main menu loaded fine again.... and live tv worked fine, again.

Link to comment
Share on other sites

pinkfamily7

Just installed Kodi and the TVheadend addon for Kodi, it works fine as well.

Link to comment
Share on other sites

pinkfamily7

Where does Emby (or tvheadend) keep it's caching for livetv?  One thing I just noticed this morning was that my primary partition was completely full (it's a 100 GB SSD), but when I rebooted the server 25 GB was freed up.

Link to comment
Share on other sites

pinkfamily7

Here's a few things that I noticed... the transcoding-temp directory is growing, and no temp files are being removed, at least until the streaming stops.  My guess is that the drive is filling up, and then when the drive is full it just stops working and requires a restart and/or reboot to get it going again, at which point the transcoding folders are cleared up.

emby stuff.pdf

Link to comment
Share on other sites

pinkfamily7

Hi, Is this smart though?  The drive/partition fills up and then there is no space available for other applications to do what they need to do.  This morning I couldn't even restart EMBY because the drive was full, and I had to do a full reboot, at which point 1/4 of my drive was available again.

 

While what I discovered about transcoding may not be the source of my issues.  All I know is that *something* is still going on, and I'm still trying to troubleshoot it.

 

Also, your seemingly sarcastic response is not very appreciated:  I said "My guess is that the drive is filling up, and then when the drive is full it just stops working and requires a restart and/or reboot to get it going again, at which point the transcoding folders are cleared up."  So I am to believe that transcoding is supposed to "just stop working and require a restart" becuase "that is the way transcoding works."  Thanks.  It's obviously NOT the way that it is supposed to work.

 

Thanks.

Link to comment
Share on other sites

The reason we keep the transcoded output during playback is to allow you to seek back and forth within it. 

 

This is something we plan to adjust in the future to only keep a certain amount, rather than everything. I think once we do that, your issue will go away.

Link to comment
Share on other sites

pinkfamily7

Well, I had set up a cron job to restart emby twice a day (2am/2pm) hoping that restarting Emby would fix it.  I thought I had it was working but twice today Live TV has stopped working, once about 8:30am and once about 6:30pm (not 100% on the timing, just when I was informed about it)  So obviously simply restarting Emby regularly isn't fixing it.  This last time I checked the free space remaining on the drive before restarting and there was plenty (still 25.5gb).

Link to comment
Share on other sites

Right, its not fixing it because the actual problem is the requests being rejected by tvh. That's not going to change just be restarting the server.

Link to comment
Share on other sites

  • 1 month later...

Regarding transcode temp files, the issue of the server not always closing live streams after stopping will be resolved in Emby Server 4.2. If you need immediate relief the fixes will be on the beta channel by tomorrow. Thanks.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...