Wiki-Quellcode von ldmobile - Could not acquire change log lock
Version 1.1 von clemensdoerfler@sbede am 2022/04/04 11:46
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 | {{code language="bash"}} | ||
| 4 | /opt/relution/log/relution.log | ||
| 5 | {{/code}} | ||
| 6 | Meldung in der Log: | ||
| 7 | {{code}} | ||
| 8 | 2022-04-01 00:01:56.393 ERROR 27239 [ main] s.boot.SpringApplication: Application run failed [] | ||
| 9 | 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 | ||
| 10 | at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:236) | ||
| 11 | at liquibase.Liquibase.update(Liquibase.java:183) | ||
| 12 | at liquibase.Liquibase.update(Liquibase.java:178) | ||
| 13 | at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:368) | ||
| 14 | at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:316) | ||
| 15 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1847) | ||
| 16 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784) | ||
| 17 | ... 80 common frames omitted | ||
| 18 | {{/code}} | ||
| 19 | Bild der Ausgabe: | ||
| 20 | [[image:1614941132903-103.png]] | ||
| 21 | __**Ursache:**__ | ||
| 22 | Normalerweise entfernt der entsprechende Dienst sein Datenbank-Sperre (Lock) beim Beenden. Sollte jeodch der Dienst abstürzen, kann es vorkommen, dass der Lock in der DB noch vorhanden ist. | ||
| 23 | __**Lösung:**__ | ||
| 24 | Relution Dienst im ldmobile-lxc anhalten | ||
| 25 | {{code language="bash"}} | ||
| 26 | systemctl stop relution.service | ||
| 27 | {{/code}} | ||
| 28 | In den mysql56 oder mariadb105 Container wechseln: | ||
| 29 | {{code language="bash"}} | ||
| 30 | lxc-ssh -n mysql56 | ||
| 31 | oder | ||
| 32 | lxc-ssh -n mariadb105 | ||
| 33 | {{/code}} | ||
| 34 | Mit der Datenbank verbinden: | ||
| 35 | {{code language="bash"}} | ||
| 36 | mysql | ||
| 37 | {{/code}} | ||
| 38 | Datenbank entsperren: | ||
| 39 | {{code language="bash"}} | ||
| 40 | UPDATE relution.DATABASECHANGELOGLOCK SET LOCKED=0; | ||
| 41 | {{/code}} | ||
| 42 | Relution Dienst im ldmobile-lxc wieder starten | ||
| 43 | {{code language="bash"}} | ||
| 44 | systemctl start relution.service | ||
| 45 | {{/code}} |