How to verify JSON file integrity in VCF Installer or SDDC Manager
search cancel

How to verify JSON file integrity in VCF Installer or SDDC Manager

book

Article ID: 459426

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

VCF Installer and SDDC Manager manage certain configuration or compatibility data using JSON files. If a JSON file is corrupted or improperly formatted, some functionality may fail to work properly.

You may observe a JsonSyntaxException in the domainmanager.log file similar to the following:

YYYY-MM-DDThh:mm:ss.sss+0000 ERROR [vcf_dm,###########] [c.v.v.c.c.i.v.r.c.VvsOfflineClient,dm-exec-###]  Failed to load cache data from file
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line # column # path $

Environment

VCF Installer

VMware SDDC Manager

Resolution

You can verify the JSON file integrity using the jq command:

# jq type TARGET_JSON_FILE.json

If a parse error is returned, the file is not correctly formatted as JSON. If the corrupted JSON file was manually uploaded to the SDDC Manager or VCF Installer, re-download the file from its source and replace the corrupted file.

 

Example output for a corrupted JSON file:

# jq type /nfs/vmware/vcf/nfs-mount/compatibility/VmwareCompatibilityData.json
jq: parse error: Invalid numeric literal at line 2, column 0