| 360 | | === Petascope is stuck to start |
| 361 | | |
| 362 | | When you see in `petascope.log` with the last line below in a few minutes |
| 363 | | |
| 364 | | {{{ |
| 365 | | INFO [2026-03-16 07:45:41] HikariDataSource@110: HikariPool-1 - Starting... |
| 366 | | INFO [2026-03-16 07:45:41] HikariDataSource@123: HikariPool-1 - Start completed. |
| 367 | | INFO [2026-03-16 07:45:42] HikariDataSource@110: HikariPool-2 - Starting... |
| 368 | | INFO [2026-03-16 07:45:42] HikariDataSource@123: HikariPool-2 - Start completed. |
| 369 | | }}} |
| 370 | | |
| 371 | | After a few minutes, it may have this log below in `petascope.log`: |
| 372 | | |
| 373 | | {{{ |
| 374 | | Caused by: liquibase.exception.LockException: Could not acquire change log lock. |
| 375 | | }}} |
| 376 | | |
| 377 | | then it can be an issue with liquibase (it thinks a migration crashed or didn’t finish, it leaves locked = true. Then no new migrations will run until it’s unlocked). Then, you need to fix it manually: |
| 378 | | |
| 379 | | {{{ |
| 380 | | sudo su - postgres |
| 381 | | psql |
| 382 | | \c petascopedb; |
| 383 | | update databasechangeloglock set locked = false |
| 384 | | |
| 385 | | }}} |
| 386 | | |
| 387 | | then restart petascope (either via `sudo service tomcat9 restart` if external petascope or `sudo service rasdaman restart` if embedded petascope) and it should work again. |
| 388 | | |
| 389 | | |
| 390 | | |
| 391 | | |
| 392 | | |
| 393 | | |
| 394 | | === Modulor operation in WCPS === |
| | 360 | === Petascope fails to start due to failed/locked migration |
| | 361 | |
| | 362 | `petascope.log` contains the following error a few minutes after starting tomcat: |
| | 363 | |
| | 364 | {{{ |
| | 365 | INFO [2026-03-14 06:35:43] HikariDataSource@110: HikariPool-1 - Starting... |
| | 366 | INFO [2026-03-14 06:35:43] HikariDataSource@123: HikariPool-1 - Start completed.\ |
| | 367 | ERROR [2026-03-14 06:40:43] SpringApplication@821: Application run failed |
| | 368 | ... Factory method 'targetDataSource' threw exception; nested exception is |
| | 369 | liquibase.exception.LockException: Could not acquire change log lock. |
| | 370 | Currently locked by <host> (ip%interface) since 3/14/26, 6:35 AM |
| | 371 | }}} |
| | 372 | |
| | 373 | This is likely caused when liquibase, a library for database migration used in petascope, crashed or didn't finish before tomcat was restarted again. It marks the migration as locked in the `DATABASECHANGELOGLOCK` table in petascopedb, and no new migrations will run until it's manually unlocked: |
| | 374 | |
| | 375 | {{{ |
| | 376 | $ sudo -u postgres psql -d petascopedb |
| | 377 | |
| | 378 | UPDATE DATABASECHANGELOGLOCK SET LOCKED = FALSE |
| | 379 | }}} |
| | 380 | |
| | 381 | Then restart tomcat (`sudo service tomcat9 restart` if external deployment, or `sudo service rasdaman restart` if embedded). |
| | 382 | |
| | 383 | |
| | 384 | === Modulo operation in WCPS === |