0
Under review

Only scans a few hundred comics (over 5k in library), then stops ("Could not open file" )

thomas 8 years ago updated 8 years ago 2

I've been trying to get Ubooquity working in docker via popular docker image (https://github.com/hurricanehrndz/ubooquity) and also via a fork of that with some fixes I've found from here: http://ubooquity.userecho.com/topics/84-comics-not-imported-umlaut-mark-bug/


No matter what I do though, Ubooquity only scans ~315 comics. First, everything looks fine, a few hundred lines like this:


20160429 23:41:31 [Scanner thread] INFO com.ubooquity.data.database.b - Inserting/updating comic entry in database : /media/comics/Adventure Time
20160429 23:41:31 [Scanner thread] INFO com.ubooquity.b.c - Reading metadata of comic file: /media/comics/Adventure Time/Adventure Time 001.cbr

However there are also a few like this, getting permission denied errors:


20160429 23:40:56 [Scanner thread] WARN com.ubooquity.f.a - Failed to read file, will try to guess format: /media/comics/Dark Horse Presents/Dark Horse Presents 140.cbr20160429 23:40:56 [Scanner thread] WARN com.ubooquity.f.a - Could not read header of archive: /media/comics/Dark Horse Presents/Dark Horse Presents 140.cbr20160429 23:40:56 [Scanner thread] WARN com.ubooquity.f.a - Failed to guess file format20160429 23:40:56 [Scanner thread] INFO com.ubooquity.data.database.b - Inserting/updating comic entry in database : /media/comics/Dark Horse Presents/Dark Horse Presents 140.cbr20160429 23:40:56 [Scanner thread] WARN com.ubooquity.f.a - Could not open file: /media/comics/Dark Horse Presents/Dark Horse Presents 140.cbrjava.io.FileNotFoundException: /media/comics/Dark Horse Presents/Dark Horse Presents 140.cbr (Permission denied)      at java.io.RandomAccessFile.open(Native Method) ~[na:1.7.0_95]      at java.io.RandomAccessFile.(RandomAccessFile.java:241) ~[na:1.7.0_95]
      at com.github.junrar.io.ReadOnlyAccessFile.(ReadOnlyAccessFile.java:39) ~[junrar-0.7.jar.5968508007590811661.tmp:na]
      at com.github.junrar.impl.FileVolume.getReadOnlyAccess(FileVolume.java:46) ~[junrar-0.7.jar.5968508007590811661.tmp:na]
      at com.github.junrar.Archive.setVolume(Archive.java:581) ~[junrar-0.7.jar.5968508007590811661.tmp:na]
      at com.github.junrar.Archive.(Archive.java:108) ~[junrar-0.7.jar.5968508007590811661.tmp:na]
      at com.github.junrar.Archive.(Archive.java:113) ~[junrar-0.7.jar.5968508007590811661.tmp:na]
      at com.ubooquity.fileformat.cbr.a.a(SourceFile:40) ~[Ubooquity.jar:1.9.1]
      at com.ubooquity.f.a.a(SourceFile:89) [Ubooquity.jar:1.9.1]
      at com.ubooquity.f.a.a(SourceFile:43) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.b.a(SourceFile:67) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.a.b(SourceFile:531) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.a.c(SourceFile:470) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.a.b(SourceFile:35) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.a$1.run(SourceFile:123) [Ubooquity.jar:1.9.1]
      at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]

Then after a while it can't read directories at all?


20160429 23:31:09 [Scanner thread] INFO com.ubooquity.data.database.b - Inserting/updating comic entry in database : /media/comics/Some Comic Name
20160429 23:31:09 [Scanner thread] ERROR com.ubooquity.data.feeder.a - Error while scanning comics shared directories
java.lang.NullPointerException: null
      at java.util.Arrays$ArrayList.(Arrays.java:2842) ~[na:1.7.0_95]
      at java.util.Arrays.asList(Arrays.java:2828) ~[na:1.7.0_95]
      at com.ubooquity.data.feeder.a.c(SourceFile:454) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.a.b(SourceFile:35) [Ubooquity.jar:1.9.1]
      at com.ubooquity.data.feeder.a$1.run(SourceFile:123) [Ubooquity.jar:1.9.1]
      at java.lang.Thread.run(Thread.java:745) [na:1.7.0_95]
I have plenty of memory available, and the files/folders are all set to 777 permissions.


Max memory: 1324 MB
Free memory: 168 MB
Total memory: 415 MB
The library is ~5500 comics , in ~600 folders. But it seems like it's able to add the first ~300 comics just fine, no warnings or errors--then looks like it can't open any other directories


I also have a non-docker version of Ubooquity (same version) that works fine, running on the same exact device. No idea where to start, or what the actual problem might be.

Under review

I have never used Docker, so I won"t be able to help much unfortunately.


What I can confirm is that the "permission denied" and the "NullPointerException" you get are coming from problems with the file system as seen by Ubooquity (the second one happens when Ubooquity tries to list the content of a scanned directory but encounters an I/O error).

It's as if Ubooquity suddenly lost the rights to access files in the middle of a scan.


I'm afraid this is a pure Docker issue.


Thanks, I will continue looking into docker-related solutions. I appreciate the response.