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