SOS Support Bundle creation fails with 'sqlite3.OperationalError: database is locked' on SDDC Manager
search cancel

SOS Support Bundle creation fails with 'sqlite3.OperationalError: database is locked' on SDDC Manager

book

Article ID: 426584

calendar_today

Updated On:

Products

VMware SDDC Manager

Issue/Introduction

SOS Support Bundle creation fails with the error "sqlite3.OperationalError: database is locked"

root@sddc[ /home/vcf ]# /opt/vmware/sddc-support/sos --health-check --domain-name ALL --zip
Traceback (most recent call last):
File "./sos.py", line 933, in <module>
File "./sos.py", line 99, in __init__
File "utils/util.py", line 96, in __init__
File "utils/cache.py", line 30, in __init__
File "/opt/vmware/sddc-support/framework/../dependency/diskcache/core.py", line 478, in __init__
self.reset(key, value, update=False)
File "/opt/vmware/sddc-support/framework/../dependency/diskcache/core.py", line 2433, in reset
((old_value,),) = sql(
sqlite3.OperationalError: database is locked
Exception ignored in: <function SoS.__del__ at 0x7f4c8964b910>
Traceback (most recent call last):
File "./sos.py", line 881, in __del__
AttributeError: 'SoS' object has no attribute 'progress_bar'

 

Environment

  •   VMware Cloud Foundation 5.2.x

Cause

When the SDDC-Manager backup operation and the SoS log collection operations are performed simultaneously, SQLite only supports a single concurrent writer, a lock is placed on the database file during operations. If the sosrest service (the API layer for SOS) has a hung process, a stale task, or an ungraceful exit, it maintains an active lock on the database  

Resolution

  1. SSH into the SDDC Manager with vcf user
  2. Switch the user to the root
    su -
  3. Restart the 'sosrest' service.
    systemctl restart sosrest
  4. Verify if the service is active:

    systemctl status sosrest
  5. Retry the SOS bundle generation.