VMware Cloud Community
4902786078
Contributor
Contributor

Error when stopping vmware services - %1 is not a valid Win32 application

Hi, I am getting below error message when i tried to run "D:\Program Files\VMware\vCenter Server\python\python.exe" vc_log4j_mitigator.py

 

"""Perform stop operation. vmon_profile=ALL, svc_names=None, include_coreossvcs=Tru e, include_leafossvcs=True Service-control failed. Error [Error 193] %1 is not a valid Win32 application"""

 

https://kb.vmware.com/s/article/87096

0 Kudos
7 Replies
baijup
VMware Employee
VMware Employee

@4902786078 Looks like some executable which is part of service-control workflow got corrupted. Can you please check the path "D:\Program Files\VMware\vCenter Server\vmon" for any "0 KB" files. I am suspecting vmon-cli.exe is corrupted.

0 Kudos
4902786078
Contributor
Contributor

@baijup There are 2 files in the folder vmon-cli.exe and cmon-cli file. Screen shot attahced. 

vmon-cli.exe is 93 kb and cmon-cli file is 0 kb.  

i tried to manually stop the service using below command and got the same error. service-control --stop --all

same error on stopping individual service and checking status - service-control --status

I am only able to run the list service command - service-control --list

 

0 Kudos
baijup
VMware Employee
VMware Employee

@4902786078 Thanks for the update, we might have to replace those files with a good one from same build, can you please share the build number of VC ? below reg key will show the build number. Also, do you have any other vCenters in same build to copy vmon-cli file ?

HKEY_LOCAL_MACHINE\SOFTWARE\VMware, Inc.\vCenter Server

0 Kudos
baijup
VMware Employee
VMware Employee

@4902786078   we can also try another step, move the 0KB file to some other path (to Temp), then try executing service control or script again.

0 Kudos
4902786078
Contributor
Contributor

@baijup , i moved the o KB file to another location and it works now. Thank you so much for your help. I appreciate your prompt reply. 

one more thing wanted to ask is i was going to apply the mitigation step and i got this stopping service issue and while finding for solution i came across below article where people were getting issue with the vcentre after applying the mitigation. Is it safe to apply log4j mitigation step? Does the script does the backup of files before changing. 

 

https://communities.vmware.com/t5/VMware-vCenter-Discussions/vCenter-not-working-after-log4-mitigati...

 

0 Kudos
baijup
VMware Employee
VMware Employee

@4902786078 Thanks for the update. It is safe to apply the workaround steps by executing the script. Also, script does take backup of the files before modification. If needed, you may take another backup of folder "D:\ProgramData\VMware\vCenterServer\cfg\vmware-vmon\svcCfgfiles" to some other location, this folder contains the vmon cfg files (you might have to change drive 😧 to C: depending on your configuration)

0 Kudos
4902786078
Contributor
Contributor

@baijup , thank you for your help. I will go ahead and apply the workaround. 

0 Kudos