Jump to content

Emby Plugin Https


Kezine

Recommended Posts

Il often loose https acces to emby server (ERR_TIMED_OUT) , this occur randomly sometimes after 2 days of uptime, sometimes after just 2 hours. While i can't acces emby whith https, i can still use standard http.

 

The only error in the log is this one :

2016-12-03 00:17:05.9376 Error HttpServer: Error in ProcessAccept
	*** Error Report ***
	Version: 3.0.8500.0
	Command line: /usr/pbi/emby-amd64/lib/emby-server/MediaBrowser.Server.Mono.exe -ffmpeg /usr/pbi/emby-amd64/bin/ffmpeg -ffprobe /usr/pbi/emby-amd64/bin/ffprobe -programdata /var/db/emby-server
	Operating system: Unix 10.3.0.0
	Processor count: 8
	64-Bit OS: True
	64-Bit Process: True
	Program data path: /var/db/emby-server
	Mono: 4.4.2 (Stable 4.4.2.11/f72fe45 Mon Aug 22 04:48:30 UTC 2016)
	Application Path: /usr/pbi/emby-amd64/lib/emby-server/MediaBrowser.Server.Mono.exe
	The authentication or decryption has failed.
	System.IO.IOException
	  at Mono.Security.Protocol.Tls.SslStreamBase.EndRead (IAsyncResult asyncResult) <0x812eecfe0 + 0x001ab> in <filename unknown>:0 
	  at Mono.Net.Security.Private.LegacySslStream.EndAuthenticateAsServer (IAsyncResult asyncResult) <0x8147c5340 + 0x00042> in <filename unknown>:0 
	  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation) <0x8147c1780 + 0x00055> in <filename unknown>:0 
	  at Mono.Net.Security.Private.LegacySslStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) <0x8147c1750 + 0x00022> in <filename unknown>:0 
	  at Mono.Net.Security.Private.MonoSslStreamImpl.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) <0x8147c1570 + 0x00031> in <filename unknown>:0 
	  at System.Net.Security.SslStream.AuthenticateAsServer (System.Security.Cryptography.X509Certificates.X509Certificate serverCertificate) <0x8147c1430 + 0x00031> in <filename unknown>:0 
	  at SocketHttpListener.Net.HttpConnection..ctor (ILogger logger, System.Net.Sockets.Socket sock, SocketHttpListener.Net.EndPointListener epl, Boolean secure, System.Security.Cryptography.X509Certificates.X509Certificate cert, System.String connectionId) <0x81274c100 + 0x0029c> in <filename unknown>:0 
	  at SocketHttpListener.Net.EndPointListener.ProcessAccept (System.Net.Sockets.Socket accepted) <0x81274b850 + 0x00125> in <filename unknown>:0 
	InnerException: System.IO.IOException
	Error while sending TLS Alert (Fatal:InternalError): System.IO.IOException: Unable to read data from the transport connection: Connection timed out. ---> System.Net.Sockets.SocketException: Connection timed out
	  at System.Net.Sockets.Socket.Receive (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags flags) <0x812f986b0 + 0x0011d> in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) <0x812f981a0 + 0x000c5> in <filename unknown>:0 
	  --- End of inner exception stack trace ---
	  at System.Net.Sockets.NetworkStream.Read (System.Byte[] buffer, Int32 offset, Int32 size) <0x812f981a0 + 0x002d8> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.RecordProtocol.ReceiveRecord (System.IO.Stream record) <0x8137bf7d0 + 0x00097> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.SslServerStream.EndNegotiateHandshake (IAsyncResult asyncResult) <0x8147c6340 + 0x0014a> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.SslStreamBase.AsyncHandshakeCallback (IAsyncResult asyncResult) <0x81379c340 + 0x0008a> in <filename unknown>:0 
	InnerException: System.IO.IOException
	Unable to write data to the transport connection: The socket is not connected.
	  at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) <0x812732170 + 0x00301> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.RecordProtocol.BeginSendRecord (ContentType contentType, System.Byte[] recordData, System.AsyncCallback callback, System.Object state) <0x812eec5c0 + 0x0007c> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.RecordProtocol.SendRecord (ContentType contentType, System.Byte[] recordData) <0x8147cce70 + 0x00030> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (Mono.Security.Protocol.Tls.Alert alert) <0x8171f9ad0 + 0x000b2> in <filename unknown>:0 
	  at Mono.Security.Protocol.Tls.RecordProtocol.SendAlert (System.Exception& ex) <0x8181a81e0 + 0x000de> in <filename unknown>:0 
	InnerException: System.Net.Sockets.SocketException
	The socket is not connected
	  at System.Net.Sockets.Socket.BeginSend (System.Byte[] buffer, Int32 offset, Int32 size, SocketFlags socket_flags, System.AsyncCallback callback, System.Object state) <0x8127326e0 + 0x00276> in <filename unknown>:0 
	  at System.Net.Sockets.NetworkStream.BeginWrite (System.Byte[] buffer, Int32 offset, Int32 size, System.AsyncCallback callback, System.Object state) <0x812732170 + 0x000ef> in <filename unknown>:0

Unfortunately, i don't remember the first time this error occured.

Link to comment
Share on other sites

Hi, I think this will be improved once the package is updated to use mono 4.6, as the TLS engine has been completely revamped. Furthermore, in the upcoming mono 4.8, they've adopted Google's BoringSSL implementation so this shouldn't be an issue for too much longer. Thanks !

Link to comment
Share on other sites

Meanwhile, this is how to manualy change the mono version used by emby plugin for freenas. 
It seems to work for me.

 

Open the jail's shell
Run : pkg install mono-4.6.2.7
Check witch : mono -V
Inside jail path
Edit file  : /usr/pbi/emby-amd64/etc/rc.d/emby-server
Change this line : procname="/usr/pbi/emby-amd64/bin/mono"
by
procname="/usr/local/bin/mono"
Save the file
Start emby and check in the last log file to see in the begining if the plugin use the jail version of mono
 
Program data path: /var/db/emby-server
Mono: 4.6.2 (Stable 4.6.2.7/08fd525 Tue Nov 29 01:31:56 UTC 2016)
Application Path: /usr/pbi/emby-amd64/lib/emby-server/MediaBrowser.Server.Mono.exe
This modification of the file will be overridden by the next update of the plugin, you will probably have to do it again if the issue remain.
  • Like 1
Link to comment
Share on other sites

Freebsd 10.3-RELEASE

pkg install mono is 4.4.2
 if you use the quarterly
upgrade use ports or change too latest in /etc/pkg/FreeBSD.conf

 

Edited by Muad
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...