VMware Cloud Community
BuddyL33
Contributor
Contributor

vSphere 6 Client running on Server 2012 R2 Unable To Connect to Host

It has been recently discovered that vSphere Client 6 on our 2012 R2 hosts can't connect to the specified ESX Host. When I attempt to connect I get the following error:

"vSphere Client could not connect to "<hostname>".
An unknown connection error occurred. (The client could not send a complete request to the server. (The underlying connection was closed:

An unexpected error occurred on a send.))"

There aren't any corresponding error events in the Windows event logs.

When I look in C:\Users\<user>\AppData\Local\VMware\vpx I have a few log files (viclient-0-0000, viclient-1-0000, viclient-2-0000).

viclient-2-0000 is the most recent, though it's contents are pretty much the same as the others. They are:

[        :startup :W: 1] 2016-05-25 11:24:58.799  Log for vSphere Client Launcher, pid=2792, version=6.0.0, build=build-3562874, option=release

[        :Error   :W: 1] 2016-05-25 11:24:58.830  System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)

   at Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)

   at Microsoft.Win32.RegistryKey.SetValue(String name, Object value)

   at VpxClient.Program.RegisterClientMimeExtension()

[        :Failed t:P: 3] 2016-05-25 11:25:30.159  System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Server stack trace:

   at System.Net.HttpWebRequest.GetResponse()

Exception rethrown at [0]:

...

   at System.Net.HttpWebRequest.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.GetResponse()

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

...

   at System.Net.ConnectStream.WriteHeaders(Boolean async)

   --- End of inner exception stack trace ---

[        :Error   :P: 3] 2016-05-25 11:25:30.159  possible failure processing clients.xml

System.Net.WebException: The client could not send a complete request to the server. (The underlying connection was closed: An unexpected error occurred on a send.)

   at VirtualInfrastructure.Utils.WebQuery.LocalizeWebException(WebException exception)

   at VirtualInfrastructure.Utils.WebQuery.Request(String url, Nullable`1 timeoutSecs)

   at VirtualInfrastructure.Utils.ClientsXml.ParseXml(Int32 timeoutSecs)

   at VpxClient.Login.ClientsXmlLoader.TrySinglePort(ClientsXml clientXml, Exception& activeError)

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Server stack trace:

   at System.Net.HttpWebRequest.GetResponse()

Exception rethrown at [0]:

...

   at System.Net.HttpWebRequest.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.get_ResponseStream()

   at VirtualInfrastructure.Utils.WebQuery.Request(String url, Nullable`1 timeoutSecs)

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

...

   at System.Net.ConnectStream.WriteHeaders(Boolean async)

   --- End of inner exception stack trace ---

   --- End of inner exception stack trace ---

[        :Error   :M: 1] 2016-05-25 11:25:30.549  Error retrieving clients.xml

Exception already logged, summary: System.Net.WebException:The client could not send a complete request to the server. (The underlying connection was closed: An unexpected error occurred on a send.)

[        :Failed t:P: 3] 2016-05-25 11:28:02.442  System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Server stack trace:

   at System.Net.HttpWebRequest.GetResponse()

Exception rethrown at [0]:

...

   at System.Net.HttpWebRequest.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.GetResponse()

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

...

   at System.Net.ConnectStream.WriteHeaders(Boolean async)

   --- End of inner exception stack trace ---

[        :Error   :P: 3] 2016-05-25 11:28:02.458  possible failure processing clients.xml

System.Net.WebException: The client could not send a complete request to the server. (The underlying connection was closed: An unexpected error occurred on a send.)

   at VirtualInfrastructure.Utils.WebQuery.LocalizeWebException(WebException exception)

   at VirtualInfrastructure.Utils.WebQuery.Request(String url, Nullable`1 timeoutSecs)

   at VirtualInfrastructure.Utils.ClientsXml.ParseXml(Int32 timeoutSecs)

   at VpxClient.Login.ClientsXmlLoader.TrySinglePort(ClientsXml clientXml, Exception& activeError)

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Server stack trace:

   at System.Net.HttpWebRequest.GetResponse()

Exception rethrown at [0]:

...

   at System.Net.HttpWebRequest.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.get_ResponseStream()

   at VirtualInfrastructure.Utils.WebQuery.Request(String url, Nullable`1 timeoutSecs)

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

...

   at System.Net.ConnectStream.WriteHeaders(Boolean async)

   --- End of inner exception stack trace ---

   --- End of inner exception stack trace ---

[        :Error   :M: 1] 2016-05-25 11:28:02.458  Error retrieving clients.xml

Exception already logged, summary: System.Net.WebException:The client could not send a complete request to the server. (The underlying connection was closed: An unexpected error occurred on a send.)

I'm really stuck as to what's going on. It seems like some kind of SSL issue, but I can't be for certain. Any help would be appreciated. Thanks.

10 Replies
jpsider
Expert
Expert

I guess we can run through all of the obvious stuff, can you ping the DNS and ip address of the host? Are there any other machines on the same network that have the same problem? Is the firewall turned on? or are you accidentally blocking the port for vSphere client?  I run 2012 R2 with vSphere client so I don't think its a software issue, I think there is a configuration problem somewhere. Can you use wireshark to see what might be stopping it?

Reply
0 Kudos
BuddyL33
Contributor
Contributor

I can ping the host by DNS shortname or IP address. In working with my VMWare team in our enterprise, it's my understanding that this is pretty extensive in that pretty much any 2012 R2 box is having this issue regardless of domain membership or not. This tells me it's something to do with the way the 2012 R2 image is configured and not something like GPO. Windows Firewall features are all disabled.I can telnet to the vCenter host over port 443 successfully, so the port isn't blocked. I have MS Message Analyzer installed on the system.

Reply
0 Kudos
jpsider
Expert
Expert

are you running the software with administrative access?

Reply
0 Kudos
BuddyL33
Contributor
Contributor

Are you referring to the VM vSphere Client? if so then yes.

Reply
0 Kudos
BuddyL33
Contributor
Contributor

In analyzing the MA data, it appears as if the client and the host are talking ok over port 443. Sniff.png

Reply
0 Kudos
ambient1
Contributor
Contributor

I'm having the same problem with connecting from vSphere 5.5.0 client running on Server 2012 R2. It suddenly stopped working near the end of May 2016 with the exact same error message. There have been no windows updates applied to the client machine during that period.

Here are the contents of one of my viclient-#-0000.log files:

[        :startup :W: 1] 2016-06-23 08:55:20.108  Log for vSphere Client Launcher, pid=8092, version=5.5.0, build=build-1993072, option=release

[        :Error   :W: 1] 2016-06-23 08:55:20.158  System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.

   at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)

   at Microsoft.Win32.RegistryKey.SetValue(String name, Object value, RegistryValueKind valueKind)

   at Microsoft.Win32.RegistryKey.SetValue(String name, Object value)

   at VpxClient.Program.RegisterClientMimeExtension()

[        :Failed t:P: 3] 2016-06-23 08:55:22.926  System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Server stack trace:

   at System.Net.HttpWebRequest.GetResponse()

Exception rethrown at [0]:

...

   at System.Net.HttpWebRequest.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.GetResponse()

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

...

   at System.Net.ConnectStream.WriteHeaders(Boolean async)

   --- End of inner exception stack trace ---

[        :Error   :P: 3] 2016-06-23 08:55:22.929  possible failure processing clients.xml

System.Net.WebException: The client could not send a complete request to the server. (The underlying connection was closed: An unexpected error occurred on a send.)

   at VirtualInfrastructure.Utils.WebQuery.LocalizeWebException(WebException exception)

   at VirtualInfrastructure.Utils.WebQuery.Request(String url, Nullable`1 timeoutSecs)

   at VirtualInfrastructure.Utils.ClientsXml.ParseXml(Int32 timeoutSecs)

   at VpxClient.Login.ClientsXmlLoader.TrySinglePort(ClientsXml clientXml, Exception& activeError)

System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send.

Server stack trace:

   at System.Net.HttpWebRequest.GetResponse()

Exception rethrown at [0]:

...

   at System.Net.HttpWebRequest.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.GetResponse()

   at VirtualInfrastructure.Utils.WebDownload.get_ResponseStream()

   at VirtualInfrastructure.Utils.WebQuery.Request(String url, Nullable`1 timeoutSecs)

System.IO.IOException: Authentication failed because the remote party has closed the transport stream.

...

   at System.Net.ConnectStream.WriteHeaders(Boolean async)

   --- End of inner exception stack trace ---

   --- End of inner exception stack trace ---

[        :Error   :M: 1] 2016-06-23 08:55:23.019  Error retrieving clients.xml

Exception already logged, summary: System.Net.WebException:The client could not send a complete request to the server. (The underlying connection was closed: An unexpected error occurred on a send.)

I agree that it looks like a TLS negotiation issue.

Reply
0 Kudos
ambient1
Contributor
Contributor

I have it working now. As suspected, it was a SSL/TLS negotiation issue.

We had recently disabled SSLv2 and SSLv3 on our servers. We had also disabled any older/obsolete ciphers and hashes at that time as well.

Resetting the registry keys to the default configuration resolved the issue (under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL).

Reply
0 Kudos
gothicreader
Contributor
Contributor

When you meant reset the registry settings, what exactly did you mean?

I attached a copy of my registry.

Thanks,

Judy

Reply
0 Kudos
raiolamanda
Contributor
Contributor

When you meant reset the registry settings, what exactly did you mean?

I attached a copy of my registry.

I do not know if I understood, but you can try to find information in raiola manda y no el panda R2

Smiley Wink


					
				
			
			
				
			
			
			
			
			
			
			
		
Reply
0 Kudos
ajgillis04
Contributor
Contributor

vSphere 5.5 client running Server 2012 R2 as well

I stumbled across this post and helped fix my issue with trial and error as the registry keys in question were not identified. We were doing some security hardening to our environment and disabled all SChannel protocols with the exception of TLS 1.2. After which the error in the original post occurred.

I found I needed to enable TLS 1.0 in the registry for both the server (if connecting locally) and client. TLS 1.0 must be set to enabled = 1, or the key absent from the registry would also work.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client, Enabled set to 1.

pastedImage_0.png

Hopefully that helps someone

Reply
0 Kudos