Printer registration error

%3CLINGO-SUB%20id%3D%22lingo-sub-1347185%22%20slang%3D%22en-US%22%3EPrinter%20registration%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1347185%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethe%20universal%20print%20connector%20fails%20to%20register%20a%20printer%20every%20time.%20In%20found%20this%20error%20in%20the%20event%20log%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22lia-indent-padding-left-30px%22%3EException%20when%20sending%20registration%20request%20for%20Drucker%20Zentrale%3CBR%20%2F%3E%26nbsp%3BSystem.Net.Http.HttpRequestException%3A%20An%20error%20occurred%20while%20sending%20the%20request.%20---%26gt%3B%20System.Net.WebException%3A%20The%20underlying%20connection%20was%20closed%3A%20An%20unexpected%20error%20occurred%20on%20a%20send.%20---%26gt%3B%20System.IO.IOException%3A%20Unable%20to%20read%20data%20from%20the%20transport%20connection%3A%20An%20existing%20connection%20was%20forcibly%20closed%20by%20the%20remote%20host.%20---%26gt%3B%20System.Net.Sockets.SocketException%3A%20An%20existing%20connection%20was%20forcibly%20closed%20by%20the%20remote%20host%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Net.Sockets.Socket.EndReceive(IAsyncResult%20asyncResult)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Net.Sockets.NetworkStream.EndRead(IAsyncResult%20asyncResult)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B---%20End%20of%20inner%20exception%20stack%20trace%20---%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Net.TlsStream.EndWrite(IAsyncResult%20asyncResult)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult%20ar)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B---%20End%20of%20inner%20exception%20stack%20trace%20---%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult%20asyncResult%2C%20TransportContext%26amp%3B%20context)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult%20ar)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B---%20End%20of%20inner%20exception%20stack%20trace%20---%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3Bat%20ProxyLibrary.RegisterHelper.%3CSENDREGISTRATIONREQUEST%3Ed__9.MoveNext()%3C%2FSENDREGISTRATIONREQUEST%3E%3C%2FDIV%3E%3CDIV%3E%26nbsp%3B%3C%2FDIV%3E%3CDIV%3EI've%20already%20checked%20the%20prerequisites%3A%3C%2FDIV%3E%3CUL%3E%3CLI%3ELicense%20is%20assigned%20to%20me%3C%2FLI%3E%3CLI%3EUniversal%20print%20is%20enabled%20in%20my%20tenant%3C%2FLI%3E%3CLI%3EI%20am%20global%20admin%3C%2FLI%3E%3CLI%3EWere%20using%20Windows%20Server%202016%20for%20the%20connector%3C%2FLI%3E%3CLI%3E.NET%20is%20up%20to%20date%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHas%20somebody%20an%20idea%20what%20I%20can%20do%20to%20fix%20this%20problem%3F%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1351949%22%20slang%3D%22en-US%22%3ERe%3A%20Printer%20registration%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1351949%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F622604%22%20target%3D%22_blank%22%3E%40bandelj%3C%2FA%3E%26nbsp%3BThe%20error%20appears%20to%20be%20related%20to%20TLS%201.2.%20The%20Connector%20uses%20that%20as%20our%20Universal%20Print%20service%20requires%20it.%20It%20might%20be%20that%20the%20TLS%201.2%20needs%20to%20be%20configured%20on%20this%20Windows%20Server.%20A%20few%20things%20to%20check%2C%20and%20then%20instructions%20on%20how%20to%20enable%2Fverify%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E1.%20Is%20the%20operating%20system%20updated%20(as%20far%20as%20security%20patches%20go)%3F%3C%2FP%3E%0A%3CP%3E2.%20Have%20you%20explicitly%20disabled%20TLS%201.2%20on%20the%20server%3F%20If%20no%2C%20below%20might%20help%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20enable%20TLS%201.2%3A%3C%2FP%3E%0A%3COL%20start%3D%221%22%20type%3D%221%22%3E%0A%3CLI%3ESet%20the%20following%20registry%20keys%3A%3CBR%20%2F%3E%5BHKEY_LOCAL_MACHINE%5CSYSTEM%5CCurrentControlSet%5CControl%5CSecurityProviders%5CSCHANNEL%5CProtocols%5CTLS%201.2%5D%3CBR%20%2F%3E%5BHKEY_LOCAL_MACHINE%5CSYSTEM%5CCurrentControlSet%5CControl%5CSecurityProviders%5CSCHANNEL%5CProtocols%5CTLS%201.2%5CClient%5D%20%22DisabledByDefault%22%3Ddword%3A00000000%20%22Enabled%22%3Ddword%3A00000001%3CBR%20%2F%3E%5BHKEY_LOCAL_MACHINE%5CSYSTEM%5CCurrentControlSet%5CControl%5CSecurityProviders%5CSCHANNEL%5CProtocols%5CTLS%201.2%5CServer%5D%20%22DisabledByDefault%22%3Ddword%3A00000000%20%22Enabled%22%3Ddword%3A00000001%3CBR%20%2F%3E%5BHKEY_LOCAL_MACHINE%5CSOFTWARE%5CMicrosoft%5C.NETFramework%5Cv4.0.30319%5D%20%22SchUseStrongCrypto%22%3Ddword%3A00000001%3C%2FLI%3E%0A%3CLI%3ERestart%20the%20server.%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1387204%22%20slang%3D%22en-US%22%3ERe%3A%20Printer%20registration%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1387204%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3BThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F572554%22%20target%3D%22_blank%22%3E%40keeron%3C%2FA%3E.%26nbsp%3BThe%20VM%20we%20used%20was%20very%20old%20and%20had%20some%20problems.%20Just%20changing%20the%20settings%20you%20named%20didn't%20help.%20We%20created%20a%20new%20VM%20and%20now%20everything%20is%20up%20and%20running%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Fhtml%2Fimages%2Femoticons%2Fsmile_40x40.gif%22%20alt%3D%22%3Asmile%3A%22%20title%3D%22%3Asmile%3A%22%20%2F%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1387208%22%20slang%3D%22en-US%22%3ERe%3A%20Printer%20registration%20error%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1387208%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F622604%22%20target%3D%22_blank%22%3E%40bandelj%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20update!%20Glad%20it%20is%20working%20now.%20Hopefully%20the%20previous%20steps%20may%20help%20in%20future%20if%20others%20get%20stuck.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi all,

 

the universal print connector fails to register a printer every time. In found this error in the event log:

 

Exception when sending registration request for Drucker Zentrale
 System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
   at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
   at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
   --- End of inner exception stack trace ---
   at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
   at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
   at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
   --- End of inner exception stack trace ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at ProxyLibrary.RegisterHelper.<SendRegistrationRequest>d__9.MoveNext()
 
I've already checked the prerequisites:
  • License is assigned to me
  • Universal print is enabled in my tenant
  • I am global admin
  • Were using Windows Server 2016 for the connector
  • .NET is up to date

 

Has somebody an idea what I can do to fix this problem? 

3 Replies

@bandelj The error appears to be related to TLS 1.2. The Connector uses that as our Universal Print service requires it. It might be that the TLS 1.2 needs to be configured on this Windows Server. A few things to check, and then instructions on how to enable/verify this:

 

1. Is the operating system updated (as far as security patches go)?

2. Have you explicitly disabled TLS 1.2 on the server? If no, below might help

 

To enable TLS 1.2:

  1. Set the following registry keys:
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2]
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client] "DisabledByDefault"=dword:00000000 "Enabled"=dword:00000001
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server] "DisabledByDefault"=dword:00000000 "Enabled"=dword:00000001
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319] "SchUseStrongCrypto"=dword:00000001
  2. Restart the server.

 Thank you @keeron. The VM we used was very old and had some problems. Just changing the settings you named didn't help. We created a new VM and now everything is up and running :smile: 

@bandelj Thanks for the update! Glad it is working now. Hopefully the previous steps may help in future if others get stuck.