5 Replies Latest reply: Aug 27, 2014 1:01 PM by IRCScott RSS

    Unable to connect to the MKS: Failed to connect to server

    alan833 Lurker

      I receive this error trying to open a console session on a VM on host1 using the Vsphere Client from my computer.

      I can do this fine on all the other hosts (which are all ESXi5)


      From my computer I also cannot ping host1.

      From my virtual center server I can both ping and open a console session just fine.


      I am suspecting a firewall issue.  What would next steps be?


        • 1. Re: Unable to connect to the MKS: Failed to connect to server
          mrksiddiqui Hot Shot

          In order for Mouse Keyboard Screen (MKS) you need to have proper network resolution. Are you able to resolve the host from your computer? if not I would start by looking at the reason why.

          • 2. Re: Unable to connect to the MKS: Failed to connect to server
            grasshopper Virtuoso vExpert

            In addition to proper DNS, MKS depends on port 902 end to end (i.e. telnet <hostipaddress> 902).  MKS errors are almost always DNS or firewall.  The only exception to the 902 requirement is when using vCloud Director which can proxy that connection across 443 for your users.

            • 3. Re: Unable to connect to the MKS: Failed to connect to server
              StewartCollins Lurker

              Here is a more clear answer:  it is recommend to always use FQDN for all server names including your vSphere client connection to your vCenter server and the vCenter server connection to each ESX(i) host.  So proper DNS registration is required.  vCenterServer and each ESXi host must have a FQDN A record established in your internal DNS servers.  My vCenter is on a Windows server, so it was auto created.  I manually added each ESX host with a FQDN A record.


              I was having the same issue "Unable to connect to the MKS: Failed to connect to server" while connected to vCenter while using just the NETBIOS name.  Realized I was using just the NETBIOS name for my vCenter server connection with the vSphere client.  I already added the ESX server record in DNS and vCenter was connected to it using a FQDN.  But since I was using only NETBIOS and a bad DNS server on my desktop computer, it apparently was unable to connect to the server name (either vCenter or the host) in order to launch a VM console screen.  I tested using the vCenter server's IP only as suggested in other post, but that had the same failed results.  It doesn't have anything to do with the port 902.  Closed vSphere again and reconnected to vCenter using FQDN, opened a VM Console window, and worked perfectly.

              • 4. Re: Unable to connect to the MKS: Failed to connect to server
                jtooo Lurker

                I started to have this issue as well recently.

                The cause of problem for me is a little bit different. and I m posting here for some other people's reference.


                I found out that at the end, it's our network problem because I m on VPN.

                Port 902/903 is blocked I believe.


                I've asked a coworker of mine (not in VPN) and he can successfully telnet to the ESX --> telnet <ESX IP> 902

                But I can't while I am on VPN, even if I disabled all firewall.

                So I contact the IT dept and they resolved this.


                Hope this helps some people.

                • 5. Re: Unable to connect to the MKS: Failed to connect to server
                  IRCScott Lurker

                  Here is how I fix this...


                  • On your windows workstation edit the "c:\windows\drivers\etc\hosts." file in notepad.
                  • Add entries for your ESX hosts. Start with the IP then put a space. Then the short name of your esx host and a space. Then the longer FQDN with the domain attached.
                  • Close The VCenter client and then reopen it.
                  • Try the console.


                  Sample Hosts file : (see the bottom for three hosts I have in my environment)



                  # Copyright (c) 1993-2009 Microsoft Corp.


                  # This is a sample HOSTS file used by Microsoft TCP/IP for Windows.


                  # This file contains the mappings of IP addresses to host names. Each

                  # entry should be kept on an individual line. The IP address should

                  # be placed in the first column followed by the corresponding host name.

                  # The IP address and the host name should be separated by at least one

                  # space.


                  # Additionally, comments (such as these) may be inserted on individual

                  # lines or following the machine name denoted by a '#' symbol.


                  # For example:


                  #     rhino.acme.com          # source server

                  #     x.acme.com              # x client host



                  # localhost name resolution is handled within DNS itself.

                  #       localhost

                  # ::1             localhost



         jsesxhost01 jsesxhost01.mydomain.local

         jsesxhost02 jsesxhost02.mydomain.local

         jsesxhost03 jsesxhost03.mydomain.local