komga icon indicating copy to clipboard operation
komga copied to clipboard

lucene index rebuild causing issues in docker

Open YouthfulRicker opened this issue 3 years ago • 12 comments

Steps to reproduce

  1. Get the latest komga image for docker (docker pull gotson/komga:latest),
  2. Use docker compose up -d to launch a container,
  3. Leave it running, and the error will appear.

Expected behavior

What I wanted to happen, was for my komga install to run, and I would be able to read manga/comics/webtoons using the webui, as I had been doing for the past few days.

Actual behavior

What happened instead, was after I restarted it, java giving this error java.nio.channels.OverlappingFileLockException: null after trying to rebuild the lucene index.

Logs

komga.log

docker-compose.yml

(the write.lock file is 0kb, so that won't be of much use)

Komga version

0.154.1

Operating system

Docker (MacOS)

Acknowledgements

  • [X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
  • [X] I have written a short but informative title.
  • [X] I have checked the FAQ.
  • [X] I have updated the app to the latest version.
  • [X] I will fill out all of the requested information in this form.

YouthfulRicker avatar May 01 '22 01:05 YouthfulRicker

Try to stop komga, delete the artemis folder located in the config dir, and start komga again.

gotson avatar May 01 '22 01:05 gotson

Thanks, but that didn't help. It's still spitting out the same error.

YouthfulRicker avatar May 01 '22 01:05 YouthfulRicker

~~Check the rights on the docker mounts.~~

gotson avatar May 01 '22 01:05 gotson

Try deleting the lucene folder too, and then start komga.

gotson avatar May 01 '22 01:05 gotson

Ok, I used this [chmod -R a+rwx /Volumes/WD2TB/Media/] command to allow everyone to read and/or write to the config and media folders, and then deleted the artemis and lucene folders. But persistence is strong with this one. It re-created the artemis and lucene folders, with their contents, and gave me the exact same error.

YouthfulRicker avatar May 01 '22 01:05 YouthfulRicker

You may have a duplicate process accessing the same file, which gives the error.

Check if you have 2 komga instances running, or in doubt reboot.

gotson avatar May 01 '22 02:05 gotson

I've rebooted and removed every running task that I wasn't using. Aaaand it's still there. I'll quickly see what happens if I try to create a new database.

YouthfulRicker avatar May 01 '22 02:05 YouthfulRicker

Ok, it does create the database, the log files, and the artemis folder, but when it gets to the lucene rebuild. Same error.

YouthfulRicker avatar May 01 '22 02:05 YouthfulRicker

That error means 2 processes are concurrently trying to access the index. You will need to check your system to find out who's accessing the files.

gotson avatar May 01 '22 02:05 gotson

Ok, shall do.

YouthfulRicker avatar May 01 '22 03:05 YouthfulRicker

This is the output of lsof | grep "/Volumes/WD2TB/" while komga is on (after the error):

com.docke  771 antariksh  113r      DIR               1,12      131072              298492 /Volumes/WD2TB/Media/Data/Komga/Config
com.docke  771 antariksh  114r      DIR               1,12      131072              409224 /Volumes/WD2TB/Media/Data/Komga
com.docke  771 antariksh  115r      DIR               1,12      131072              104696 /Volumes/WD2TB/Media/Data
com.docke  771 antariksh  116r      DIR               1,12      131072              104672 /Volumes/WD2TB/Media
com.docke  771 antariksh  122r      DIR               1,12      131072             3590118 /Volumes/WD2TB/Media/Literature
com.docke  771 antariksh  123r      DIR               1,12      131072              104672 /Volumes/WD2TB/Media
com.docke  771 antariksh  127w      REG               1,12       99230              436568 /Volumes/WD2TB/Media/Data/Komga/Config/logs/komga.log
com.docke  771 antariksh  128u      REG               1,12          19             1310403 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/journal/server.lock
com.docke  771 antariksh  129u      REG               1,12           0                   1 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/journal/serverlock.1
com.docke  771 antariksh  131u      REG               1,12           0                   1 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/journal/serverlock.1
com.docke  771 antariksh  132u      REG               1,12     1048576             1310407 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/bindings/activemq-bindings-1.bindings
com.docke  771 antariksh  133u      REG               1,12     1048576             2813725 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/bindings/activemq-bindings-2.bindings
com.docke  771 antariksh  134u      REG               1,12    10485760             2813900 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/journal/activemq-data-1.amq
com.docke  771 antariksh  135u      REG               1,12    10485760             2814015 /Volumes/WD2TB/Media/Data/Komga/Config/artemis/journal/activemq-data-2.amq
com.docke  771 antariksh  136u      REG               1,12      368640             2814097 /Volumes/WD2TB/Media/Data/Komga/Config/database.sqlite
CleanMyMa  863 antariksh   11r      DIR               1,12      131072             3594810 /Volumes/WD2TB/.Trashes/501

And this is after I turned it off:

CleanMyMa  863              antariksh   11r      DIR               1,12      131072             3594810 /Volumes/WD2TB/.Trashes/501

I can't find any other application/process that is touching it except for docker. The only other thing I can think of, is that, in the log, it is said that the java.nio.channels.OverlappingFileLockException: null error is happening at a lot of places, mainly the index writer and a supposed java.base that I have no idea about.

YouthfulRicker avatar May 01 '22 04:05 YouthfulRicker

In your compose file the mount for /config is /Users/[me]/Documents/komga but in the previous message you mention it's under /Volumes/WD2TB/Media/Data/Komga/Config ?

gotson avatar May 01 '22 08:05 gotson