vmware-infraprofile Service Fails Due to Corrupted Metadata JSON File
search cancel

vmware-infraprofile Service Fails Due to Corrupted Metadata JSON File

book

Article ID: 405391

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

The vmware-infraprofile service may fail to start due to a corrupted JSON metadata file containing invalid control characters. This results in Spring framework bean creation failures and prevents the service from initializing properly.

 

  • vmware-infraprofile service fails to start or restart.

  • Appliance Management UI (VAMI) may show compliance or config-related services as degraded.

  • infraprofile-svcs logs show the following error:

    JsonParseException: Illegal character ((CTRL-CHAR, code 1)): only regular white space (, \n, \t) is allowed between tokens [Source: (BufferedReader); line: 19587, column: 8]

 

Environment

vCenter Server Appliance (VCSA) 7.x and 8.x

Cause

  • This issue typically results from file corruption during patching, editing with unsafe tools, or failed system changes.

  • It is recommended to verify integrity of other files in /var/lib/vmware-infraprofile/config/metadata/ as well.

Resolution

Before making any changes, please ensure you have a valid snapshot of the vCenter. 

Step 1: Identify the corrupted file

Run the following to identify the file with >19,000 lines (based on log error line number):

cd /var/lib/vmware-infraprofile/config/metadata/ wc -l *.json
 

Step 2: Validate the corrupted line

sed -n '19587p' com.vmware.appliance.vcenter.settings.v1_metadata.json | cat -v

Look for unexpected characters like ^A.

Step 3: Replace with a clean version

Copy the file from a working vCenter appliance:

scp root@working-vc:/var/lib/vmware-infraprofile/config/metadata/com.vmware.appliance.vcenter.settings.v1_metadata.json .

Replace the file and set correct ownership and permissions:

chown root:cis com.vmware.appliance.vcenter.settings.v1_metadata.json chmod 444 com.vmware.appliance.vcenter.settings.v1_metadata.json
 

Step 4: Restart the service

service-control --restart vmware-infraprofile

The vmware-infraprofile service should now start successfully.