SDDC Manager sosrest service fails to start with error "sqlite3.OperationalError: attempt to write a readonly database".
search cancel

SDDC Manager sosrest service fails to start with error "sqlite3.OperationalError: attempt to write a readonly database".

book

Article ID: 429632

calendar_today

Updated On:

Products

VMware SDDC Manager

Issue/Introduction

The SoSRest (Supportability and Serviceability) service fails to start on SDDC Manager.

Checked the service status by running the command systemctl status sosrest.service

sosrest.service - VMware Cloud Foundation Supportability and Serviceability (SoS) Service
Loaded: loaded (/etc/systemd/system/sosrest.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Tue 2026-02-10 13:15:36 AEST; 6s ago
Process: 419912 ExecStart=/opt/vmware/sddc-support/sosrest (code=exited, status=1/FAILURE)
Main PID: 419912 (code=exited, status=1/FAILURE)

Reviewing journalctl logs captured using the journalctl -xe command :

MM DD TT #### sosrest[7042]: Traceback (most recent call last):
MM DD TT #### sosrest[7042]:   File "services/sosrest.py", line 182, in <module>
MM DD TT #### sosrest[7042]:   File "services/sosrest.py", line 59, in __init__
MM DD TT #### sosrest[7042]:   File "utils/util.py", line 96, in __init__
MM DD TT #### sosrest[7042]:   File "utils/cache.py", line 30, in __init__
MM DD TT #### sosrest[7042]:   File "/opt/vmware/sddc-support/services/../framework/../dependency/diskcache/core.py", line 499, in __init__
MM DD TT #### sosrest[7042]:     sql(query, (key, value))
MM DD TT #### sosrest[7042]:   File "/opt/vmware/sddc-support/services/../framework/../dependency/diskcache/core.py", line 666, in _execute_with_re
try
MM DD TT #### sosrest[7042]:     return sql(statement, *args, **kwargs)
MM DD TT #### sosrest[7042]: sqlite3.OperationalError: attempt to write a readonly database
MM DD TT #### systemd[1]: sosrest.service: Main process exited, code=exited, status=1/FAILURE

Environment

VMware Cloud Foundation 5.2.x

Cause

The directory /opt/vmware/vcf/sddc-support has incorrect (read-only) permissions, preventing the vcf_sos service account from having write access, which causes the embedded SQLite database used by sosrest to fail with sqlite3.OperationalError: attempt to write a readonly database

Resolution

  1. Take the snapshot of the SDDC Manager VM.
  2. Connect to the SDDC Manager using SSH and elevate to root.
  3. Run the command to assign the correct owner and permission :
    • chown -R vcf_sos:vcf /opt/vmware/vcf/sddc-support
    • chmod 644 /opt/vmware/vcf/sddc-support
  4. Restart the service :
    • systemctl restart sosrest.service
  5. Check the status to verify the resolution :
    • systemctl status sosrest.service