[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
Règles du forum communautaire
* English support on www.reddit.com/r/wapt
* Le support communautaire en français se fait sur ce forum
* Merci de préfixer le titre du topic par [RESOLU] s'il est résolu.
* Merci de ne pas modifier un topic qui est taggé [RESOLU]. Ouvrez un nouveau topic en référençant l'ancien
* Préciser version de WAPT installée, version complète ET numéro de build (2.2.1.11957 / 2.2.2.12337 / etc.) AINSI QUE l'édition Enterprise / Discovery
* Les versions 1.8.2 et antérieures ne sont plus maintenues. Les seules questions acceptées vis à vis de la version 1.8.2 sont liés à la mise à jour vers une version supportée (2.1, 2.2, etc.)
* Préciser OS du serveur (Linux / Windows) et version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019)
* Préciser OS de la machine d'administration/création des paquets et de la machine avec l'agent qui pose problème le cas échéant (Windows 7 / 10 / 11 / Debian 11 / etc.)
* Eviter de poser plusieurs questions lors de l'ouverture de topic, sinon il risque d'être ignorer. Si plusieurs sujet, ouvrir plusieurs topic, et de préférence les uns après les autres et pas tous en même temps (ie ne pas spammer le forum).
* Inclure directement les morceaux de code, les captures d'écran et autres images directement dans le post. Les liens vers les pastebin, les bitly et autres sites tierces seront systématiquement supprimés.
* Comme tout forum communautaire, le support est fait bénévolement par les membres. Si vous avez besoin d'un support commercial, vous pouvez contacter le service commercial Tranquil IT au 02.40.97.57.55
srazer
Messages : 10
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 : 1373
Inscription : 18 juin 2014 - 09:58
Localisation : Saint Sébastien sur Loire
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
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 site WAPT
srazer
Messages : 10
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 : 402
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 : 10
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
Verrouillé