Jump to content

Have to restart daily


pinkfamily7

Recommended Posts

pinkfamily7

I'm not sure what else has changed exactly with the latest patch, but I've started having to do daily restarts of Emby since upgrading a week ago, and sometimes even a "sudo systemctl restart emby-server" doesn't work and I have to reboot the entire server to get Emby to place nice for another 20-24 hours or so.

 

In some cases the videos just cache and play for a few seconds and pause and start... but by the time I am told about it, the videos and/or live tv just don't load at all.

 

I have debug logging turned on, and I've attached the two latest logs, unfortunately there were three logs in between these 2 that were all 0 bytes...

 

 

Let me know if there are any other files that I could include that may be useful...

embylogs.zip

Link to comment
Share on other sites

pinkfamily7

 

In some cases the videos just cache and play for a few seconds and pause and start... but by the time I am told about it, the videos and/or live tv just don't load at all.

Link to comment
Share on other sites

pinkfamily7

I just upgraded Mono to the latest version available through Apt so we'll see if that resolves it or not, I guess. 

Link to comment
Share on other sites

pinkfamily7

Unfortunately it's still happening.  As mentioned, it's most noticeable (or manifests earliest) with Live TV, channels just refuse to load until I restart Emby.  (Most recently, I did at least not have to reboot the entire physical machine.)

Link to comment
Share on other sites

Gerrit507

There wasn't an official mono-based version for a very long time. You must either have an ancient or unofficial version.

Link to comment
Share on other sites

pinkfamily7

There wasn't an official mono-based version for a very long time. You must either have an ancient or unofficial version.

 

You mean the "unofficial" one from the mono-official-stable repository?  If by ancient you mean maybe 2 months, because that MAY be the last time I ran an apt upgrade, but it has very likely been more recently.  At the very worst, it was in November, which is when I first installed Emby (and mono with it).

 

Mono 5.20.1.19 was released 17 days ago, and that's the version I'm on.

Edited by pinkfamily7
Link to comment
Share on other sites

Gerrit507

I wasn't complaining about your mono version but about your emby version, which is apperantly based on mono.

 

The only official page to download emby is this page: https://emby.media/linux-server.html

 

You probably got emby from this repo: https://download.opensuse.org/repositories/home:/emby/

 

This not official! I repeat myself but there is no official version of emby based on mono anymore. Emby has been completely migrated to .net core about a year ago. I've seen dozens of people like you in this forum talking about some "official repo". It just doesn't exist!

Edited by Gerrit507
Link to comment
Share on other sites

pinkfamily7

First off, we're obviously talking about two different things.  I'm talking about an official repository for Mono, you're talking about an official repo for Emby. 

 

I agree, there is no official repo for Emby, I download the package and install via dpkg manually when there is an upgrade to Emby available, and am on 4.1.0.26.  My issues started happening after I installed 4.1.0.26, and whether I was mistaken that Emby ran with Mono is really a moot point, given the only reason I mentioned mono was in passing and hoping that upgrading Mono would fix the issues, which it obviously didn't.

Link to comment
Share on other sites

pinkfamily7

I've reverted back to 4.0.2 for the time being to see if that is going to be more stable for me... restarting the server multiple times a day was/is getting old.

Link to comment
Share on other sites

Gerrit507

I've taken a look a your logs and it's full of this error

2019-04-24 11:02:01.070 Info HttpClient: Http response 401 from http://localhost:9981/stream/channelid/695032595?ticket=211269AB2BD9272271187EC2F468357E8473E0BE after 1ms. HeadersServer=HTS/tvheadend, Cache-Control=no-cache, WWW-Authenticate=Digest realm="tvheadend", qop="auth", nonce="f0959b5f3ff13417044e73787e58907c", opaque="00ec15450220a79af89d5930aae90edb", Connection=close
2019-04-24 11:02:01.071 Error App: Error copying live stream, will keep trying.
	*** Error Report ***
	Version: 4.1.0.26
	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.47
	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()
	

Your tvheadend server responds with "Unauthorized" in an http request, which basically means that the user you've configured hasn't got sufficient rights to access the tvheadend server or the authentication fails at all.

 

I also saw that emby uses digest authentication when accessing tvheadend. That's the main cause why authentication fails.

 

Make sure you have set the following settings in tvheadend:

  • Configuration / General / Base / HTTP Server settings: either "Plain (insecure)" or "Both plain and digest". Emby isn't compatible with digest authentication of tvheadend.
  • If that doesn't help, check out Configuration / Users / Access Entries and make sure the user has at least following permissions:
    • Web Interface (for channel icons)
    • Streaming:
      • Basic and Advanced (for live-streaming)
      • HTSP (for EPG)
    • Video Recorder:
      • Basic (for streaming recordings)
      • HTSP and View all (for accessing recordings)
      • optional: Manage all (for deleting recordings)
      • optional: Failed view

I'm pretty sure that when you change the authentication type it will work smooth again because the exception (error) handling slows down the whole program massively.

 

@@Luke we should make something like a pinned post or maybe even a hint in the plugins description that plain authentication has to be used. I've seen this issue so often.

Edited by Gerrit507
Link to comment
Share on other sites

pinkfamily7

Thanks, I unchecked the "Use HTTP digest authentication" box because it was the closest (and only) to your description of:

 

 

Configuration / General / Base / HTTP Server settings: either "Plain (insecure)" or "Both plain and digest". Emby isn't compatible with digest authentication of tvheadend

 

The access entry fields were already set that way.

 

Thanks for your help, I will monitor it.

Link to comment
Share on other sites

pinkfamily7

Thanks Gerrit, I fixed my tvheadend configuration.   While I was still on 4.0.2 I had no issues after I made those tvheadend configuration changes.  I've since upgraded to 4.1.1.0 and am having the same issues I had with 4.1.0.6, so I am fairly certain that, while I'm sure fixing tvheadend didn't hurt, it ultimately didn't resolve my issues in the 4.1 branch, apparently.

Link to comment
Share on other sites

Thanks Gerrit, I fixed my tvheadend configuration.   While I was still on 4.0.2 I had no issues after I made those tvheadend configuration changes.  I've since upgraded to 4.1.1.0 and am having the same issues I had with 4.1.0.6, so I am fairly certain that, while I'm sure fixing tvheadend didn't hurt, it ultimately didn't resolve my issues in the 4.1 branch, apparently.

 

What problem exactly are you still having?

Link to comment
Share on other sites

pinkfamily7

The same problem as in the original post-- after a day or so no videos will play until I restart the server.  I can generally still navigate the menus, but if I start a video I get the spinning circle of doom and a black screen.

Link to comment
Share on other sites

Would you mind providing a new server log based on the latest release? Thanks !

Link to comment
Share on other sites

pinkfamily7

New logs attached.  For what it's worth, it still looks like there are authentication errors for tvheadend (at least, there are entries very similar to those that Gerrit507 pointed out) in these logs.  I've included a screenshot of my tvheadend settings showing that my configuration is set up as recommended.  I've also included a screenshot of my dashboard as I found it this morning when I first went in to collect the logs-- this is eventually what happens with 4.1 if I don't "catch" it soon enough and don't restart it.  The jinja (or whatever templating is used) doesn't get compiled correctly... i actually had to restart the server before I could even attempt to pull the logs.

 

 

embyserverlogs.zip

Link to comment
Share on other sites

Gerrit507

The authentication type is correct now but there are still unauthorized errors...

 

Can you please also add a screenshot of your tvheadend user config?

Link to comment
Share on other sites

Gerrit507

Here you go.  Thanks.

Looks good, too. Basically the same as mine.

 

It's kind of a long shot but do you have any weird characters in your username or password? Like chars not included in ASCII for example.

 

It looks like the EPG is fetched correctly over htsp but every http connection just gets refused by the server. Which means that the credentials have to be correct because they work over htsp but something messes them up over http.

 

Is playing a tv channel in emby even working at all?

Link to comment
Share on other sites

pinkfamily7

Yes, Live TV works just fine... but LiveTV is usually the first thing that stops working, then other videos, then even the dashboard menus.  Even with the authentication problems you pointed out Live TV was working prior to 4.1 (and it was still working with 4.1.0.6 until the server stopped responding).  I had downgraded to 4.0.2 from 4.1.0.6 and the issues seem to go away, and now they're back with 4.1.1

 

Also, the only "weird" character i have in my password is $

Edited by pinkfamily7
Link to comment
Share on other sites

pinkfamily7

I don't know the answer to that, as I let my family use my live tv, and is the primary reason that I use Emby in the first place.  I could ask them not to watch TV for a day or so, but it wouldn't make them happy.

Link to comment
Share on other sites

pinkfamily7

Ok, well, my dad was over at my house all day today and his wife wasn't home-- he just got home and said that there was "no tv" so I'm going to say that yes, it happens even if we don't use Live TV at all.

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...