Wiki-Quellcode von ldmobile - Could not acquire change log lock
Zuletzt geändert von Clemens Dörfler am 2024/09/26 13:05
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | Sollte die LD-Mobile Oberfläche nicht aufrufbar sein, kann es sein dass die Relution Datenbank gelocked ist. | ||
2 | Nachschauen kann man dies in in der folgender Log nachschauen (ldmobile Container): | ||
3 | |||
4 | {{code language="bash"}} | ||
5 | /opt/relution/log/relution.log | ||
6 | {{/code}} | ||
7 | |||
8 | Meldung in der Log: | ||
9 | |||
10 | {{code}} | ||
11 | 2022-04-01 00:01:56.393 ERROR 27239 [ main] s.boot.SpringApplication: Application run failed [] | ||
12 | liquibase.exception.LockException: Could not acquire change log lock. Currently locked by 172.28.28.23 (172.28.28.23) since 3/31/22, 8:55 AM | ||
13 | at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:236) | ||
14 | at liquibase.Liquibase.update(Liquibase.java:183) | ||
15 | at liquibase.Liquibase.update(Liquibase.java:178) | ||
16 | at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:368) | ||
17 | at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:316) | ||
18 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) | ||
19 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) | ||
20 | ... 80 common frames omitted | ||
21 | {{/code}} | ||
22 | |||
23 | Bild der Ausgabe: | ||
24 | [[image:1614941132903-103.png||height="167" width="1084"]] | ||
25 | |||
26 | __**Ursache:**__ | ||
27 | Normalerweise entfernt der entsprechende Dienst sein Datenbank-Sperre (Lock) beim Beenden. Sollte jedoch der Dienst abstürzen, kann es vorkommen, dass der Lock in der DB noch vorhanden ist. | ||
28 | |||
29 | __**Lösung:**__ | ||
30 | Relution Dienst im ldmobile-lxc anhalten | ||
31 | |||
32 | {{code language="bash"}} | ||
33 | systemctl stop relution.service | ||
34 | {{/code}} | ||
35 | |||
36 | In den mysql56 oder mariadb105 Container wechseln: | ||
37 | |||
38 | {{code language="bash"}} | ||
39 | lxc-ssh -n mysql56 | ||
40 | oder | ||
41 | lxc-ssh -n mariadb105 | ||
42 | {{/code}} | ||
43 | |||
44 | Mit der Datenbank verbinden: | ||
45 | |||
46 | {{code language="bash"}} | ||
47 | mysql | ||
48 | {{/code}} | ||
49 | |||
50 | Datenbank entsperren: | ||
51 | |||
52 | {{code language="mysql"}} | ||
53 | UPDATE relution.DATABASECHANGELOGLOCK SET LOCKED=0; | ||
54 | {{/code}} | ||
55 | |||
56 | Relution Dienst im ldmobile-lxc wieder starten | ||
57 | |||
58 | {{code language="bash"}} | ||
59 | systemctl start relution.service | ||
60 | {{/code}} |