Jump to content

Emby Server with MBT


Dan64

Recommended Posts

Dan64

I'm opening a second thread on Emby instability.

 

I'm a fun on Emby, before I was using MB2 on WMC, then I moved to MB3 on WMC and now I have decided to move to Emby for Linux. I'm using Debian Jessie (RC2), with mono 3.10 and Emby version 3.0.5572.0. Since the server I'm using is used also as NAS server I have used network paths to share ther media folder and avoiding in this way the need of transcoding.

 

My first impression is that the Linux server version is more stable using MBC as client than MBT. In effect using MBT the server crash 100% of times after few minutes of usage.

 

And now the fist big problem: The log is not enough to understand the server crash, here below a smal sample of the last crash:

2015-04-13 22:23:08.8310 Error - HttpResultFactory: Error streaming data
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /var/lib/mediabrowser
	Operating system: Unix 3.16.0.4
	Processor count: 4
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/mediabrowser
	Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
	Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
	Write failure
	System.IO.IOException
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at System.IO.Stream.CopyTo (System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0 
	  at System.IO.Stream.CopyTo (System.IO.Stream destination) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.Stream:CopyTo (System.IO.Stream)
	  at MediaBrowser.Server.Implementations.HttpServer.StreamWriter.WriteToInternal (System.IO.Stream responseStream) [0x00000] in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket has been shut down
	  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	
2015-04-13 22:23:08.8914 Error - HttpAsyncTaskHandler: Error occured while Processing Request: Write failure
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /var/lib/mediabrowser
	Operating system: Unix 3.16.0.4
	Processor count: 4
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/mediabrowser
	Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
	Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
	Write failure
	System.IO.IOException
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at ServiceStack.Formats.HtmlFormat.SerializeToStream (IRequest request, System.Object response, IResponse httpRes) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteErrorToResponse (IResponse httpRes, IRequest httpReq, System.String contentType, System.String operationName, System.String errorMessage, System.Exception ex, Int32 statusCode) [0x00000] in <filename unknown>:0 
	  at ServiceStack.ServiceStackHost.OnUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HostContext.RaiseUncaughtException (IRequest httpReq, IResponse httpRes, System.String operationName, System.Exception ex) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse response, System.Object result, ServiceStack.Web.ResponseSerializerDelegate defaultAction, IRequest request, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result, System.Byte[] bodyPrefix, System.Byte[] bodySuffix) [0x00000] in <filename unknown>:0 
	  at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse (IResponse httpRes, IRequest httpReq, System.Object result) [0x00000] in <filename unknown>:0 
	  at ServiceStack.Host.RestHandler+<>c__DisplayClass5.<ProcessRequestAsync>b__0 (System.Object response) [0x00000] in <filename unknown>:0 
	  at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse (System.Object response, System.Func`2 callback, System.Func`2 errorCallback) [0x00000] in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket has been shut down
	  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	
2015-04-13 22:23:09.1812 Error - HttpResultFactory: Error streaming data
	*** Error Report ***
	Version: 3.0.5572.0
	Command line: /opt/mediabrowser/MediaBrowser.Server.Mono.exe -programdata /var/lib/mediabrowser
	Operating system: Unix 3.16.0.4
	Processor count: 4
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/lib/mediabrowser
	Mono: 3.10.0 (tarball Wed Nov  5 12:50:04 UTC 2014)
	Application Path: /opt/mediabrowser/MediaBrowser.Server.Mono.exe
	Write failure
	System.IO.IOException
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.InternalWrite (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at SocketHttpListener.Net.ResponseStream.Write (System.Byte[] buffer, Int32 offset, Int32 count) [0x00000] in <filename unknown>:0 
	  at System.IO.Stream.CopyTo (System.IO.Stream destination, Int32 bufferSize) [0x00000] in <filename unknown>:0 
	  at System.IO.Stream.CopyTo (System.IO.Stream destination) [0x00000] in <filename unknown>:0 
	  at (wrapper remoting-invoke-with-check) System.IO.Stream:CopyTo (System.IO.Stream)
	  at MediaBrowser.Server.Implementations.HttpServer.StreamWriter.WriteToInternal (System.IO.Stream responseStream) [0x00000] in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket has been shut down
	  at System.Net.Sockets.Socket.Send (System.Byte[] buf, Int32 offset, Int32 size, SocketFlags flags) [0x00000] in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Write (System.Byte[] buffer, Int32 offset, Int32 size) [0x00000] in <filename unknown>:0 

 with these logs try to fix the problem is not easy. So since the instability on Linux is material, the first work that should be done is to "improve" the log (I know this was not needed for the windows version). Since I know that in C# it is possible catch all the exceptions and write all the call stack (with function name, file name and line code) this improvement could help to find the error, but I noted that in your log is missing the file name and the line code. Mybe the problem is due to some mono function, but whitout a full log trace it is impossible to find which could be. It is like looking for a needle in a haystack. Since the Windows version is very stable the problem is probably hidden in mono or is some Linux compatibility layer. In summary the scope of this post is to say that Emby is really a good product, that the Linux version is promising, but with these problems it is very difficult to suggest to use it to replace the Windows version. But since I like Linux I really hope that these problems will be fixed, I'm available to test the Linux version, but with this poor log it is really difficult to catch the bug. I know that there is the possibility to enable the debug log. I have looked at this but are written a lot of informations even when it is all Ok, and when happen the problem you discover that there are few information useful. In my opinion the best is to try to improve the error log.

 

     

Edited by Dan64
Link to comment
Share on other sites

Dan64

Fortunately Debian Jessie is using "systemd". To improve the Emby stability I have found as quick and dirty solution to use systemd to automatically restart the daemon in case of crash, to do that I had remove the old script written for Debian 7 and write a "native" systemd service (using the ffmpeg provided with mediabrowser) with the option "Restart=on-failure". Now apparently Emby seems more stable, and I think that this could be a good workaround till the source code of dotNetFoundation will be fully incorporated in mono. :)

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