[SOLVED] Database is locked

Share here your tips or issues concerning WAPT Console or WAPT Agent / Venez ici partager vos problèmes et astuces concernants la console et l'agent WAPT
Règles du forum
* Questions can be asked in English or in French. If the thread is started in English, stick to English, if it is started in French, stick to French.
* Vous pouvez poser vos questions en Français ou en Anglais. Si un sujet est commencé en français, merci de répondre en français. Si un sujet est commencé en anglais, merci de répondre en anglais.
srazer
Messages : 9
Inscription : 28 sept. 2017 - 20:18

07 janv. 2019 - 14:16

Hello all,

I frequently apply upgrades from the console and occasionally the clients will freeze. The only thing that fixes it is to restart waptservice. When looking at the log on the client I see:

Code : Tout sélectionner

Get packages index
90 package(s) in the repository
Packages to be updated : hcrp-vlc(=3.0.5-3),hcrp-adobereader-en(=2019.10.20069-3),hcrp-cisco-jabber(=12.5.0.22884-2)
Exception in thread WaptTaskManager:
Traceback (most recent call last):
  File "c:\wapt\lib\threading.py", line 801, in __bootstrap_inner
    self.run()
  File "c:\wapt\waptservice\service.py", line 1415, in run
    self.update_runstatus('')
  File "c:\wapt\waptservice\service.py", line 1184, in update_runstatus
    self.events.post_event("STATUS",self.wapt.get_last_update_status())
  File "c:\wapt\common.py", line 5043, in get_last_update_status
    status = self.read_param('last_update_status',{"date": "", "running_tasks": [], "errors": [], "upgrades": []},ptype='json')
  File "c:\wapt\common.py", line 6621, in read_param
    return self.waptdb.get_param(name,default,ptype)
  File "c:\wapt\common.py", line 336, in get_param
    q = self.db.execute('select value,ptype from wapt_params where name=? order by create_date desc limit 1',(name,)).fetchone()
OperationalError: database is locked

2019-01-07 07:04:44,927 CRITICAL *********** error OperationalError: database is locked
2019-01-07 07:04:50,526 CRITICAL *********** error OperationalError: database is locked
2019-01-07 07:04:56,131 CRITICAL *********** error OperationalError: database is locked
2019-01-07 07:31:53,586 CRITICAL *********** error OperationalError: database is locked

Any ideas?

Thanks,
Chris Knowles
Avatar de l’utilisateur
dcardon
Expert WAPT
Messages : 285
Inscription : 18 juin 2014 - 09:58
Localisation : Nantes
Contact :

08 janv. 2019 - 02:18

Hi Chris,
srazer a écrit :
07 janv. 2019 - 14:16
Hello all,

I frequently apply upgrades from the console and occasionally the clients will freeze. The only thing that fixes it is to restart waptservice. When looking at the log on the client I see:
It seems like a bug. What version of Wapt are you using?

Cheers,

Denis
Denis Cardon - Tranquil IT Systems
Communiquez autour de vous sur WAPT! Envoyez nous vos url de blog et d'articles dans la catégorie votre avis du forum, nous les mettrons en avant sur le wiki WAPT
srazer
Messages : 9
Inscription : 28 sept. 2017 - 20:18

08 janv. 2019 - 14:08

dcardon a écrit :
08 janv. 2019 - 02:18

It seems like a bug. What version of Wapt are you using?

Cheers,

Denis
I am using 1.6.2.7.

Chris
Avatar de l’utilisateur
htouvet
Expert WAPT
Messages : 298
Inscription : 16 mars 2015 - 10:48
Contact :

10 janv. 2019 - 17:58

Check if you don't have a Scheduled job (system wide) running some "wapt-get" commands.
In the early versions of wapt, the update of packages index was scheduled by a Windows task (wapt-get enable-tasks command), now the waptservice is doing the job.
Tranquil IT
srazer
Messages : 9
Inscription : 28 sept. 2017 - 20:18

11 janv. 2019 - 20:16

We have a script that runs periodically that pulls the computer's description from AD and replaces the computer's local description. It then runs 'wapt-get update-status' to push the new description to the wapt server.

I'm going to assume that this could be the culprit?


I have updated the script to only call wapt-get update-status when it sees a difference and will stop waptservice first then start it again after. Does this seem like the correct approach?

Thanks,
Chris
Répondre