Jump to content

Issue with SSL cert causing Server to refuse connections.


unholyrattrap
Go to solution Solved by unholyrattrap,

Recommended Posts

unholyrattrap

I am running Emby 3.0.5912.0 on Server 2012 R2. I used II7 to put in a CSR, which i then exported to https://my.gogetssl.com to provide me a SSL. When Running 3.0.5781.5 the following steps worked and would like to know if there is something I am doing wrong, or if there is an issues I am experiencing.  

 

  1. Put in a CSR using IIS
  2. Submit the CSR https://my.gogetssl.com, and get a *.crt back
  3. Import the *.crt into the servers local cert store
  4. Export the *.pfx
  5. Rename the cert to the <selfsignedname>.pfx 
  6. restart the server
  7. Here is there it breaks in 3.0.5912.0

When i access the server over HTTPS, the server refuses connections and drops all HTTPS traffic. Looking through the server logs I see the following:

2016-04-04 23:30:44.4469 Error HttpServer: Exception loading certificate: C:\Users\Administrator\AppData\Roaming\Emby-Server\ssl\cert_9c31b7884ea5475c8687970fc5996297.pfx
	*** Error Report ***
	Version: 3.0.5912.0
	Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.2.9200.0
	Processor count: 6
	64-Bit OS: True
	64-Bit Process: True
	Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server
	Application Path: C:\Users\Administrator\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
	The specified network password is not correct.
	
	System.Security.Cryptography.CryptographicException
	   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
	   at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)
	   at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
	   at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName)
	   at SocketHttpListener.Net.HttpListener.LoadCertificateAndKey(String certificateLocation)

016-04-04 23:30:46.3340 Error HttpResultFactory: Error streaming data
	*** Error Report ***
	Version: 3.0.5912.0
	Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.2.9200.0
	Processor count: 6
	64-Bit OS: True
	64-Bit Process: True
	Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server
	Application Path: C:\Users\Administrator\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
	Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
	System.IO.IOException
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
	   at SocketHttpListener.Net.ResponseStream.InternalWrite(Byte[] buffer, Int32 offset, Int32 count)
	   at SocketHttpListener.Net.ResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
	   at System.IO.Stream.InternalCopyTo(Stream destination, Int32 bufferSize)
	   at MediaBrowser.Server.Implementations.HttpServer.StreamWriter.WriteToInternal(Stream responseStream)
	InnerException: System.Net.Sockets.SocketException
	An existing connection was forcibly closed by the remote host
	   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
	
2016-04-04 23:30:46.3610 Error HttpAsyncTaskHandler: Error occured while Processing Request: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
	*** Error Report ***
	Version: 3.0.5912.0
	Command line: C:\Users\Administrator\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
	Operating system: Microsoft Windows NT 6.2.9200.0
	Processor count: 6
	64-Bit OS: True
	64-Bit Process: True
	Program data path: C:\Users\Administrator\AppData\Roaming\Emby-Server
	Application Path: C:\Users\Administrator\AppData\Roaming\Emby-Server\System\MediaBrowser.ServerApplication.exe
	Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
	System.IO.IOException
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
	   at SocketHttpListener.Net.ResponseStream.InternalWrite(Byte[] buffer, Int32 offset, Int32 count)
	   at SocketHttpListener.Net.ResponseStream.Write(Byte[] buffer, Int32 offset, Int32 count)
	   at System.Xml.XmlUtf8RawTextWriter.FlushBuffer()
	   at System.Xml.XmlUtf8RawTextWriter.Flush()
	   at System.Xml.XmlWellFormedWriter.Close()
	   at System.Xml.XmlWriter.Dispose(Boolean disposing)
	   at ServiceStack.Text.XmlSerializer.SerializeToStream(Object obj, Stream stream)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteErrorToResponse(IResponse httpRes, IRequest httpReq, String contentType, String operationName, String errorMessage, Exception ex, Int32 statusCode)
	   at ServiceStack.ServiceStackHost.OnUncaughtException(IRequest httpReq, IResponse httpRes, String operationName, Exception ex)
	   at ServiceStack.HostContext.RaiseUncaughtException(IRequest httpReq, IResponse httpRes, String operationName, Exception ex)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse(IResponse response, Object result, ResponseSerializerDelegate defaultAction, IRequest request, Byte[] bodyPrefix, Byte[] bodySuffix)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse(IResponse httpRes, IRequest httpReq, Object result, Byte[] bodyPrefix, Byte[] bodySuffix)
	   at ServiceStack.HttpResponseExtensionsInternal.WriteToResponse(IResponse httpRes, IRequest httpReq, Object result)
	   at ServiceStack.Host.Handlers.ServiceStackHandlerBase.HandleResponse(Object response, Func`2 callback, Func`2 errorCallback)
	InnerException: System.Net.Sockets.SocketException
	An existing connection was forcibly closed by the remote host
	   at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
	   at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)

When I delete the cert, the self signed is regened and the HTTPS connections work again to load HTTPS with the self signed. I would like to get the HTTPS working with the cert I have purchased is the end goal. 

 

Note: If i browse and point at the .pfx from within the emby server browser the same is issue is repeated. 

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