Page 1 sur 1

[SOLVED] Database is locked

Publié : 07 janv. 2019 - 14:16
par srazer
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

Re: Database is locked

Publié : 08 janv. 2019 - 02:18
par dcardon
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

Re: Database is locked

Publié : 08 janv. 2019 - 14:08
par srazer
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

Re: Database is locked

Publié : 10 janv. 2019 - 17:58
par htouvet
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.

Re: Database is locked

Publié : 11 janv. 2019 - 20:16
par srazer
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