gotson / komga

Media server for comics/mangas/BDs/magazines/eBooks with API, OPDS and Kobo Sync support
https://komga.org
MIT License
4.07k stars 241 forks source link

Failed to cleanup the Artemis directory & missing Database after upgrading from 0.165.0 to 1.6.4 #1276

Closed pein0saga closed 1 year ago

pein0saga commented 1 year ago

Steps to reproduce

Expected behavior

Start normally

Actual behavior

errors in log

2023-10-31T05:44:15.356+08:00  WARN 29504 --- [main] o.g.k.infrastructure.jms.ArtemisCleanup  : Failed to cleanup the Artemis directory

java.nio.file.FileSystemException: D:\Applications\Scoop\apps\komga\current\config\artemis\bindings\activemq-bindings-1.bindings: The process cannot access the file because it is being used by another process
    at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92) ~[na:na]
    at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) ~[na:na]
    at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) ~[na:na]

error message in webpage

Snipaste_2023-10-31_05-46-55

errors in console when try to restart app

2023-10-31T06:39:02.809+08:00  INFO 37820 --- [           main] o.a.l.s.MemorySegmentIndexInputProvider  : Using MemorySegmentIndexInput with Java 20; to disable start with -Dorg.apache.lucene.store.MMapDirectory.enableMemorySegments=false
2023-10-31T06:39:03.263+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteUdfPool - Starting...
2023-10-31T06:39:03.371+08:00 DEBUG 37820 --- [           main] o.g.k.i.datasource.SqliteUdfDataSource   : Adding custom REGEXP function
2023-10-31T06:39:03.372+08:00 DEBUG 37820 --- [           main] o.g.k.i.datasource.SqliteUdfDataSource   : Adding custom UDF_STRIP_ACCENTS function
2023-10-31T06:39:03.374+08:00 DEBUG 37820 --- [           main] o.g.k.i.datasource.SqliteUdfDataSource   : Adding custom COLLATION_UNICODE_3 collation
2023-10-31T06:39:03.510+08:00 DEBUG 37820 --- [           main] o.g.k.i.datasource.SqliteUdfDataSource   : Adding custom REGEXP function
2023-10-31T06:39:03.511+08:00 DEBUG 37820 --- [           main] o.g.k.i.datasource.SqliteUdfDataSource   : Adding custom UDF_STRIP_ACCENTS function
2023-10-31T06:39:03.512+08:00 DEBUG 37820 --- [           main] o.g.k.i.datasource.SqliteUdfDataSource   : Adding custom COLLATION_UNICODE_3 collation
2023-10-31T06:39:03.514+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.pool.HikariPool        : SqliteUdfPool - Added connection org.sqlite.jdbc4.JDBC4Connection@2d7a9786
2023-10-31T06:39:03.517+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteUdfPool - Start completed.
2023-10-31T06:39:03.607+08:00  INFO 37820 --- [           main] o.f.c.internal.license.VersionPrinter    : Flyway Community Edition 9.16.3 by Redgate
2023-10-31T06:39:03.608+08:00  INFO 37820 --- [           main] o.f.c.internal.license.VersionPrinter    : See release notes here: https://rd.gt/416ObMi
2023-10-31T06:39:03.609+08:00  INFO 37820 --- [           main] o.f.c.internal.license.VersionPrinter    :
2023-10-31T06:39:03.651+08:00  INFO 37820 --- [           main] o.f.c.i.database.base.BaseDatabaseType   : Database: jdbc:sqlite:D:\Applications\Scoop\apps\komga\current\config/database.sqlite (SQLite 3.43)
2023-10-31T06:39:03.726+08:00  INFO 37820 --- [           main] o.f.core.internal.command.DbValidate     : Successfully validated 71 migrations (execution time 00:00.047s)
2023-10-31T06:39:03.733+08:00  INFO 37820 --- [           main] o.f.core.internal.command.DbMigrate      : Current version of schema "main": 20231026164836
2023-10-31T06:39:03.733+08:00  INFO 37820 --- [           main] o.f.core.internal.command.DbMigrate      : Schema "main" is up to date. No migration necessary.
2023-10-31T06:39:04.828+08:00  INFO 37820 --- [           main] o.j.i.D.logVersionSupport                : Version                  : Database version is supported by dialect SQLITE: 3.43.2
2023-10-31T06:39:05.006+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteTaskPool - Starting...
2023-10-31T06:39:05.008+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.pool.HikariPool        : SqliteTaskPool - Added connection org.sqlite.jdbc4.JDBC4Connection@39c85c1a
2023-10-31T06:39:05.008+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteTaskPool - Start completed.
2023-10-31T06:39:05.072+08:00  INFO 37820 --- [           main] o.f.c.i.database.base.BaseDatabaseType   : Database: jdbc:sqlite:D:\Applications\Scoop\apps\komga\current\config/tasks.sqlite (SQLite 3.43)
2023-10-31T06:39:05.075+08:00  INFO 37820 --- [           main] o.f.core.internal.command.DbValidate     : Successfully validated 1 migration (execution time 00:00.001s)
2023-10-31T06:39:05.076+08:00  INFO 37820 --- [           main] o.f.core.internal.command.DbMigrate      : Current version of schema "main": 20231013114850
2023-10-31T06:39:05.077+08:00  INFO 37820 --- [           main] o.f.core.internal.command.DbMigrate      : Schema "main" is up to date. No migration necessary.
2023-10-31T06:39:05.242+08:00  WARN 37820 --- [           main] c.g.g.n.j.i.plugins.JxlImageReaderSpi    : Missing Foreign Linker API, plugin will be disabled. Try adding JVM arguments: --enable-preview
2023-10-31T06:39:05.243+08:00  INFO 37820 --- [           main] c.g.g.n.j.i.plugins.JxlImageReaderSpi    : Deregistering service provider
2023-10-31T06:39:05.260+08:00  INFO 37820 --- [           main] o.g.k.i.image.ImageConverter             : Supported read formats: [JPEG 2000, JPG, tiff, bmp, bigtiff, wbp, PCX, gif, WBMP, PNG, RAW, JPEG, PNM, BigTIFF, tif, TIFF, wbmp, jpeg, jbig2, jpeg-lossless, jpg, JPEG2000, BMP, WBP, pcx, GIF, png, BIGTIFF, raw, webp, JPEG-LOSSLESS, JBIG2, pnm, TIF, jpeg2000, WEBP, jpeg 2000]
2023-10-31T06:39:05.260+08:00  INFO 37820 --- [           main] o.g.k.i.image.ImageConverter             : Supported read mediaTypes: [image/vnd.wap.wbmp, image/jpeg, image/x-portable-graymap, image/bmp, image/gif, image/x-windows-pcx, image/x-pc-paintbrush, image/x-raw, image/webp, image/x-pcx, image/x-portable-bitmap, image/png, image/x-jb2, image/pcx, image/x-windows-bmp, image/x-webp, image/jpeg2000, image/jp2, image/x-bmp, image/x-png, image/x-portable-pixmap, image/tiff, image/x-tiff, image/x-jbig2, image/x-portable-anymap]
2023-10-31T06:39:05.260+08:00  INFO 37820 --- [           main] o.g.k.i.image.ImageConverter             : Supported write formats: [JPG, JPEG 2000, tiff, bigtiff, bmp, PCX, gif, WBMP, PNG, RAW, JPEG, PNM, BigTIFF, tif, TIFF, jpeg, wbmp, jpg, JPEG2000, BMP, pcx, GIF, png, BIGTIFF, raw, pnm, TIF, jpeg2000, jpeg 2000]
2023-10-31T06:39:05.261+08:00  INFO 37820 --- [           main] o.g.k.i.image.ImageConverter             : Supported write mediaTypes: [image/vnd.wap.wbmp, image/png, image/jpeg, image/x-portable-graymap, image/bmp, image/pcx, image/x-windows-bmp, image/gif, image/x-windows-pcx, image/jpeg2000, image/x-pc-paintbrush, image/x-raw, image/x-bmp, image/jp2, image/x-pcx, image/x-png, image/x-portable-bitmap, image/x-portable-pixmap, image/tiff, image/x-tiff, image/x-portable-anymap]
2023-10-31T06:39:06.399+08:00  INFO 37820 --- [           main] o.s.b.a.w.s.WelcomePageHandlerMapping    : Adding welcome page: class path resource [public/index.html]
2023-10-31T06:39:06.816+08:00  INFO 37820 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 18 endpoint(s) beneath base path '/actuator'
2023-10-31T06:39:06.901+08:00  INFO 37820 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Will secure Or [Mvc [pattern='/api/**'], Mvc [pattern='/opds/**'], Mvc [pattern='/sse/**'], Mvc [pattern='/oauth2/authorization/**'], Mvc [pattern='/login/oauth2/code/**'], EndpointRequestMatcher includes=[*], excludes=[], includeLinks=true] with [org.springframework.security.web.session.DisableEncodeUrlFilter@2eb1c615, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2674d4f6, org.springframework.security.web.context.SecurityContextHolderFilter@7af1d072, org.springframework.security.web.header.HeaderWriterFilter@6818fd48, org.springframework.web.filter.CorsFilter@5d9d2119, org.springframework.security.web.authentication.logout.LogoutFilter@1894fa9f, org.springframework.security.web.session.ConcurrentSessionFilter@33bdd01, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@7caf1e5, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@642c6461, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@3ace6346, org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter@7ddeb27f, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5a4464c5, org.springframework.security.web.session.SessionManagementFilter@2e4eda17, org.springframework.security.web.access.ExceptionTranslationFilter@15369d73, org.springframework.security.web.access.intercept.AuthorizationFilter@4e17442f]
2023-10-31T06:39:07.294+08:00  WARN 37820 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'
2023-10-31T06:39:07.307+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteTaskPool - Shutdown initiated...
2023-10-31T06:39:07.309+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteTaskPool - Shutdown completed.
2023-10-31T06:39:07.313+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteUdfPool - Shutdown initiated...
2023-10-31T06:39:07.313+08:00  INFO 37820 --- [           main] com.zaxxer.hikari.HikariDataSource       : SqliteUdfPool - Shutdown completed.
2023-10-31T06:39:07.316+08:00  INFO 37820 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-10-31T06:39:07.336+08:00  INFO 37820 --- [           main] .s.b.a.l.ConditionEvaluationReportLogger :

Logs

komga.log

Komga version

Version: 1.6.4

Operating system

WIN 10

Other details

Do I need to reboot PC to let library upgrading take effect ? If so, please add some notification.

komga:
  libraries-scan-cron: "0 0 */8 * * ?"  # periodic scan every 8 hours
  libraries-scan-startup: true         # scan libraries at startup
  libraries-scan-directory-exclusions:  # patterns to exclude directories from the scan
    - "#recycle" # synology NAS recycle bin
  remember-me:
    key: changeMe!    # required to activate the remember-me auto-login via cookies
    validity: 30d     # validity of the cookie in seconds, here 30 days
server:
  port: 9002

Acknowledgements

gotson commented 1 year ago

The process cannot access the file because it is being used by another process

That probably means you have 2 instances of Komga running.

pein0saga commented 1 year ago

The process cannot access the file because it is being used by another process

That probably means you have 2 instances of Komga running.

I'm not sure if the older version database is migrated successfully. Should I manually delete the folder ?

image

gotson commented 1 year ago

Scoop is not officially supported. I have no idea how it's installed or run.

pein0saga commented 1 year ago

Scoop is not officially supported. I have no idea how it's installed or run.

Everything got OK after PC rebooting.