How to Fix The “Failed to Connect to the KMS server” Error

Written By Steven Arends

One of my colleagues from the non-tech division came to me very anxiously and asked, “How to fix KMS Server failed?” I told him to come down and assured him I would solve the problem.

I discovered the overload of clients in the host computer. So, I solved his problem while I explained why this problem had occurred in the first place.

Are you also irritated trying to fix the Failed to connect to the KMS server? If the answer is Yes, don’t waste your time and start reading.

So, why does the “Failed to connect to the KMS server” occur?

The “Failed to connect to the KMS server” occurs if the internet connection is lost, the activation is lost or expired, there are overloaded clients, not connected to the correct port, the client computer ID correlates with other numbers and some more.

As there are many reasons behind occurring this problem, there amany of ways to solve it too. So, to solve yours, hop in my tandem bicycle, and ride along till the end.failed-to-connect-to-the-kms-server

How to Fix the Connection to my Failed KMS Server

Suppose your run a company is working 60 employees for you. They need to activate Windows for using all the Microsoft products. But the process can be lengthy. You can use the KMS server to shorten the time in an efficient way.

So, what is a KMS server?

A KMS server is an OS activation where KMS stands for Key Management Server for Microsoft product activations. You can configure a KMS Server to service all activation requests in your enterprise. The KMS Server will communicate with Microsoft servers on the internet to activate the KMS license.

But as you are reading this article, I believe you already know what a KMS server really is and how it works or stuffs like that. So, I will go straight to the solution on fixing the connection to your KMS server.

There are 7 definite ways to solve your KMS connection problem. But before starting any of those, make sure you upgrade to the latest version of Windows, which is correctly licensed. Thus you can make your product functional and get regular updates that solve your bugs problem.

Follow our guide on VPN Not Working on Windows 11.

1. Check the Internet Connection

If your internet connection is gone or pretty bad when working, it might hamper your KMS server working perfectly which will be a KMS server failure later. Here’s how to check your internet connection on Command Prompt:

  • Click on the Start Menu, type cmd, and hit Enter. It’ll open the Command Prompt window.cmd-command
  • Type ping -n 25 in the Command Prompt and hit -n 25ping-google-com

Proceed with the next steps if you find them all okay. But suppose you face issues with Command Prompt; in that case, you should check your antivirus, create a new user account, install latest updates, disable non-Microsoft context menu items, and create a Command Prompt shortcut on your desktop.

Note: Make sure you have a stable internet connection.

Check out the easiest way to Fix Function Keys Stopped Working on Windows 11.

2. Reset the Client Computer ID

Sometimes you need to reset the client’s computer ID as it creates problems in connection with the KMS Server. By resetting, you are operating your client’s computer for the first time. It can resolve many of your problems. To do this:

  • Click on the search bar right-hand side of the Windows icon.
  • Type cmd, and click Run as administrator.cmd-run-as-administration
  • Type sysprep /generalize in the Command Prompt. It will reset the client’s computer ID. If it doesn’t work, slmgr /rearm instead of sysprep /generalize.sysprep-generalize

Resetting your client’s computer ID sometimes solves the issue of fixing the KMS Server connection failure. If it doesn’t change anything, try following the next one.

3. Activate your Computer

If your computer is not activated or lost it’s activation somehow, you might have this issue on your PC. So, you need to activate your computer and then proceed to activate your Microsoft Office copy.

  • Click on the search bar right-hand side of the Windows icon.
  • Type Control Panel and hit Enter.control-panel-after-searching
  • Go to System and
  • Click on System.
  • Search for Windows is activated message below on that window.

If it is not activated, you need to activate your Windows at first. Try activating your Office copy then.

Do check our latest post on the Fix Installation Failed Error 800f0830 on Windows 11.

Note: Make sure Windows is activated on your client’s computer.

4. Connect to the Right Port

Firewall rules can block TCP traffic on the KMS port. So, make sure you know the rules and connect to the right port. To do this, you need to:

  • Press the Windows key on your keyboard.
  • Type cmd and click on Run as administrator.cmd-run-as-administration
  • Type vb /dlv on the Command Prompt.vb-dlv
  • Search Listening on Port.

You can find out the port on your host computer. So, if it looks all good but still doesn’t solve your problem, try the next steps. I believe you have solved your problem by now. If I’m wrong, keep reading till the end and try the rest of the steps.

Follow our guide to Fix Update Error 8024402F on Windows 11.

5. Check the Client Number

If you got more than 25 clients’ IDs connected to your host computer, your device might fail to connect to the KMS Server. Besides, the threshold limit is 5 for the Server editions. So you need to check whether you have crossed the limit or not. To check this, you have to:

  • Press the Windows key and search cmd.
  • Click on Run as Administrator.
  • Type vbs /dli and hit Enter.

You’ll be able to see if the threshold is met. If you find overloaded clients, cut some connections and try reconnecting to the KMS Server.

Quick Tip: Look in the Application event log for event ID 12290 on the KMS host computer. Check this log if you find any request made by the client’s computer. If there are no requests, then that indicates the client could not communicate with the host.

How to Open Firewall Ports in Windows 10

A firewall is considered a security device in the form of computer hardware and software. It helps you to protect your network by acting as a wall between your internal network and outside traffic.

The firewall works like a gatekeeper— monitors attempts to gain access to your OS, blocks the unwanted traffic and provides different levels of protection. If you need firewall ports in your Windows 10, you can open them by performing a specific procedure.

  • Press the Windows key on your keyboard and search Control Panel and hit Enter.
  • Click to System and Security and Windows Firewall afterward.
  • Choose Advanced settings from the left bar and click on the Inbound Rules.
  • Select New Rule from the right-hand side’s Action
  • Add the port you have to open and click Next.
  • Add the protocol whether it’s a TCP or UDP and input the port number. Click Next.
  • Select Allow the connection and click Next.
  • Choose the network type which seems fit to you and click Next.
  • Name the Rule which seems the best and click Finish.

You can secure your data by Firewall and solve your failure to connect to the KMS Server issue.

Check out our separate post to Change Power Mode on Windows 11.


The number of daily clients can be too big over time. So the server can stuck at times. Most of the cases I found consisted of this problem. So check if the server is overloaded. Besides, there are other problems that can cause this issue to happen with you.

Read every step and try them on your computer carefully to fix the connection to the KMS server. If you have other inquiries, don’t hesitate to comment below.

About The Author
Steven Arends is a computer science graduate and tech enthusiast with over 10 years of experience in the field. He has a vast collection of computer hardware and loves exploring the latest advancements. As a contributing author to 10Scopes, Steven shares his expertise to make the world of technology more accessible and easier to understand for all readers.

Leave a Comment