Py-KMS-Organization/py-kms

Error 0xC004F074 despite successful connection to server

Closed this issue · 12 comments

Py-KMS doesn't seem to work anymore. I'm trying with Windows 10 LTSC 2019/2021, product key: M7XTQ-FN8P6-TTKYV-9D4CC-J462D and getting error:

Error: 0xC004F074 The Software Licensing Service reported that the computer could not be activated. The Key Management Service (KMS) is unavailable.

Have you tried pinging your KMS host device? What device are you using to run Py-KMS? is it in windows running a docker container? perhaps a vm linux machine? or a linux baremetal? we need more info than the error code.

My Py-KMS works perfectly fine running via docker-compose on WSL on the same windows machine I'm activating. I've also recently decided to link it to my AD Domain and all the windows PC in my house connected to the domain is automatically activated.
image

Your problem could be from something else, rather than Py-KMS itself

  • Your host could have had the IP lease expired and was given a different IP by your DHCP host, this happened to me one time when our ISP decided to update our router's firmware and the DHCP reservation list was reset, gave me a massive headache.
  • Some other app could be using port 1688 on the machine Py-KMS is running on.
  • If your KMS host is in a VM, make sure it's not behind a NAT. If it's too much work to link the VM network to your physical network, you could run a VPN via ZeroTier or Wireguard and use the VPN IP of your KMS host instead.
  • Monitor your network with Wireshark, you could find problems from there that was previously invisible.

I have same issue, running py-kms on other windows server (no docker), trying to activate server 2022 . Py-kms is contacted, this is in log for each activation attempt: WARNING Module 'tzlocal' or 'pytz' not available ! Request time not localized. In console:
Client sending�[0m
�[94mServer received RPC Activation Request !!! �[0m�[97m<===============�[0m

�[94mServer parsing RPC Activation Request...�[0m

�[94mServer processing KMS Activation Request...�[0m

�[7m�[93m�[1mModule 'tzlocal' or 'pytz' not available ! Request time not localized.�[0m

tzlocal library is installed via pip:

C:\Users\xxxxx>pip list
Package Version


cachetools 5.3.2
certifi 2023.11.17
charset-normalizer 3.3.2
google-api-core 2.15.0
google-api-python-client 2.112.0
google-auth 2.26.1
google-auth-httplib2 0.2.0
googleapis-common-protos 1.62.0
httplib2 0.22.0
idna 3.6
oauth2client 4.1.3
pip 24.0
protobuf 4.25.1
pyasn1 0.5.1
pyasn1-modules 0.3.0
PyDrive 1.3.1
pyparsing 3.1.1
PyYAML 6.0.1
requests 2.31.0
rsa 4.9
setuptools 69.1.1
six 1.16.0
tzdata 2024.1
tzlocal 5.2
uritemplate 4.1.1
urllib3 2.1.0

It seems like Py-KMS is receiving the requests but the clients aren't receiving the replies
Performing a network sniff with wireshark might show the underlying problem.

Network is perfectly OK. Both computers have opened 1688 port for outgoing/incomming, they are on same vlan and traffic between them works. Is there some debug mode to see what exactly was send as reply?

Network is perfectly OK. Both computers have opened 1688 port for outgoing/incomming, they are on same vlan and traffic between them works. Is there some debug mode to see what exactly was send as reply?

You can enable debug logs, should be a text file located at where you specified it to be.
According to the readthedocs provided (I got the link from the README.md), you can start both the server and the client with debug flags on to see the entire conversation.

image
Im getting the same error. I'll try to do some debugging when i have time

@dstagger Are you using an srv record, and slmgr /skms-domain?

If so, try using kms without it. (That worked for me - kms.eshark.tech)

I was pointing the srv record to the wrong domain 🤦

@dstagger @demostenescz666 I just remembered that you can also view KMS activation errors via Event Viewer
It should be in Windows Logs then System. Perform skms.vbs /ato, then refresh the logs after the error, read through every warning and error for the current time, and it should give you a more detailed reason why hopefully

I'll go ahead and close this one (feel free to reopen), as I feel this is just another connection problem by the user.

I dont think it is connection issue, as I wrote, server received it, but it sending nothing back. I installed original windows activation service and it works. But close it if you want, I dont have time to debug this.

Same. Python 3.10.14 works for me, but not 3.12

I'm hosting py-kms on docker in diet pi. No network issues. Please reopen this issue