sosrest service on SDDC-Manager crashes with error JSONDecodeError
search cancel

sosrest service on SDDC-Manager crashes with error JSONDecodeError

book

Article ID: 313198

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

  • The sosrest service start/restart operation fails.
  • The below mentioned error will be shown in /var/log/vmware/vcf/sddc-support/vcf-sos.log
    [YYYY-MM-DDTHH:MM:SS] ERROR [vcf_sos] [workflowhandler.py::handle_crash_recovery::331::MainThread] Traceback (most recent call last):
      File "framework/workflowhandler.py", line 290, in handle_crash_recovery
      File "framework/workflowhandler.py", line 133, in _make_temp_status_as_permanent
      File "/usr/lib/python3.7/json/__init__.py", line 296, in load
        parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
      File "/usr/lib/python3.7/json/__init__.py", line 348, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3.7/json/decoder.py", line 337, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode
        raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 263042 (char 263041)

 

Cause

  • The cause of this issue is /opt/vmware/vcf/sddc-support/.status-tmp.json is damaged.
  • During the update to the file the sosrest service must have restarted/ stopped causing the file to be damaged.

Resolution

To resolve the issue, delete the file /opt/vmware/vcf/sddc-support/.status-tmp.json and start the sosrest service.

Please follow the steps mentioned below to delete the file:

  1. Take snapshot of SDDC Manager VM

  2. SSH into SDDC-Manager with vcf user and su to root

  3. Delete the status-tmp.json file

    rm /opt/vmware/vcf/sddc-support/.status-tmp.json
  4. Restart sosrest service
    systemctl start sosrest