harvard-lts / fits

File Information Tool Set
http://fitstool.org
GNU Lesser General Public License v2.1
92 stars 46 forks source link

NLNZ Metadata Extractor FileNotFoundException for MP3 on read-only NFS mount #382

Closed rstanonik closed 1 year ago

rstanonik commented 1 year ago

Hi, We're running the docker FITS on files on a read-only NFS share. It throws an error for MP3 files. If I copy the files to a local, writable directory, then no error occurs. Another test was to copy the file to a local directory and make that read-only, in which case no error occurred, so maybe NFS and read-only is the issue. Below is example output of the error. Thanks, Ron

rstanonik@lib-fits:~$ fits.sh -i dams4/bb/00/00/85/4v/20775-bb0000854v-1-1.mp3 java.io.FileNotFoundException: dams4/bb/00/00/85/4v/20775-bb0000854v-1-1.mp3 (Permission denied) at java.base/java.io.RandomAccessFile.open0(Native Method) at java.base/java.io.RandomAccessFile.open(Unknown Source) at java.base/java.io.RandomAccessFile.(Unknown Source) at java.base/java.io.RandomAccessFile.(Unknown Source) at org.farng.mp3.MP3File.(Unknown Source) at org.farng.mp3.MP3File.(Unknown Source) at nz.govt.natlib.adapter.jID3LibMp3.ID3TagLibMP3Adapter.adapt(ID3TagLibMP3Adapter.java:89) at edu.harvard.hul.ois.fits.tools.nlnz.MetadataExtractor.extractInfo(MetadataExtractor.java:114) at edu.harvard.hul.ois.fits.tools.ToolBase.run(ToolBase.java:271) at java.base/java.lang.Thread.run(Unknown Source) 2023-02-28 18:51:58 - ERROR - MetadataExtractor:122 - NLNZ Metadata Extractor error while harvesting file: java.lang.RuntimeException 2023-02-28 18:51:59 - ERROR - Fits:683 - Tool error processing file: 20775-bb0000854v-1-1.mp3 NLNZ Metadata Extractor error while harvesting file 20775-bb0000854v-1-1.mp3 (java.io.FileNotFoundException: dams4/bb/00/00/85/4v/20775-bb0000854v-1-1.mp3 (Permission denied)) edu.harvard.hul.ois.fits.exceptions.FitsToolException: NLNZ Metadata Extractor error while harvesting file 20775-bb0000854v-1-1.mp3 (java.io.FileNotFoundException: dams4/bb/00/00/85/4v/20775-bb0000854v-1-1.mp3 (Permission denied)) at edu.harvard.hul.ois.fits.tools.nlnz.MetadataExtractor.extractInfo(MetadataExtractor.java:124) ~[fits-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at edu.harvard.hul.ois.fits.tools.ToolBase.run(ToolBase.java:271) ~[fits-1.6.0-SNAPSHOT.jar:1.6.0-SNAPSHOT] at java.lang.Thread.run(Unknown Source) ~[?:?] <?xml version="1.0" encoding="UTF-8"?>

fmt/134 /work/dams4/bb/00/00/85/4v/20775-bb0000854v-1-1.mp3 20775-bb0000854v-1-1.mp3 2353152 75b19403b63f1646181a20e5907265ea 1368217801000
pwinckles commented 1 year ago

Unfortunately, that's a bug in NLNZ Metadata Extractor and not FITS. As far as I can tell, that tool is essentially abandoned, but you could try cutting them a ticket https://github.com/DIA-NZ/Metadata-Extraction-Tool

daveneiman commented 1 year ago

@rstanonik you could also remove or comment-out the NLNZ tool in the fits.xml configuration file if you find it is not supplying any useful metadata in the first place.