Confirm you only have 1 running Yara Connector:
- execute:
sudo ps -ef |grep yara
- confirm only 1 process that shows "/usr/share/cb/integrations/yara/bin/cb-yara-connector start", and if that is the case, proceed to Reset the Yara Connector DB steps.
- If duplicate entries are seen, stop the Yara Connector and use "kill" command to terminate any duplicates and then restart Yara Connector
sudo service cb-yara-connector stop
kill -9 <pid_of_yara_connector>
- Let Yara Connector process for several hours, if "OperationalError: database is locked" is still occurring proceed to DB reset steps.
Reset the Yara Connector DB:
- Stop yara:
sudo service cb-yara-connector stop
- Preserve the existing db file(s):
sudo mkdir /usr/share/cb/integrations/yara/backup
sudo mv /usr/share/cb/integrations/yara/db/* /usr/share/cb/integrations/yara/backup
- Start yara:
sudo service cb-yara-connector start