From 59cd155eb335180ca120bb776ecc87285c53974a Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Sat, 26 Nov 2022 17:38:27 +0300 Subject: [PATCH] Add notes for 2022-11-26 --- content/posts/2022-11.md | 106 +++++++++++++++++++++++ docs/2022-11/index.html | 107 +++++++++++++++++++++++- docs/categories/index.html | 2 +- docs/categories/notes/index.html | 2 +- docs/categories/notes/page/2/index.html | 2 +- docs/categories/notes/page/3/index.html | 2 +- docs/categories/notes/page/4/index.html | 2 +- docs/categories/notes/page/5/index.html | 2 +- docs/categories/notes/page/6/index.html | 2 +- docs/categories/notes/page/7/index.html | 2 +- docs/index.html | 2 +- docs/page/2/index.html | 2 +- docs/page/3/index.html | 2 +- docs/page/4/index.html | 2 +- docs/page/5/index.html | 2 +- docs/page/6/index.html | 2 +- docs/page/7/index.html | 2 +- docs/page/8/index.html | 2 +- docs/page/9/index.html | 2 +- docs/posts/index.html | 2 +- docs/posts/page/2/index.html | 2 +- docs/posts/page/3/index.html | 2 +- docs/posts/page/4/index.html | 2 +- docs/posts/page/5/index.html | 2 +- docs/posts/page/6/index.html | 2 +- docs/posts/page/7/index.html | 2 +- docs/posts/page/8/index.html | 2 +- docs/posts/page/9/index.html | 2 +- docs/sitemap.xml | 10 +-- 29 files changed, 241 insertions(+), 34 deletions(-) diff --git a/content/posts/2022-11.md b/content/posts/2022-11.md index 6e4a53b15..03bbfce2a 100644 --- a/content/posts/2022-11.md +++ b/content/posts/2022-11.md @@ -247,4 +247,110 @@ $ gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE - - I did some more work on my `post-ciat-pdfs.py` script and tested uploading the items to my local DSpace and DSpace Test - Then I ran the script on CGSpace, uploading ~1,500 PDFs to to existing items +## 2022-11-25 + +- Tony Murray, who is working on IFPRI's CGSpace integration, emailed me to ask some questions about the REST API +- Oh no, I realized there is a logic issue with the PDFbox cropbox code I added a few weeks ago: + +```console +$ JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" dspace filter-media -p "ImageMagick PDF Thumbnail" -v -f -i 10568/77010 +The following MediaFilters are enabled: +Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter +org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter +Loading @mire database changes for module MQM +Changes have been processed +IM Thumbnail tropentag2016_marshall.pdf is replacable. +File: tropentag2016_marshall.pdf.jpg +ERROR filtering, skipping bitstream: + + Item Handle: 10568/77010 + Bundle Name: ORIGINAL + File Size: 1486580 + Checksum: 1ad66d918a56a5e84667386e1a32e352 (MD5) + Asset Store: 0 +java.lang.IndexOutOfBoundsException: 1-based index out of bounds: 2 +java.lang.IndexOutOfBoundsException: 1-based index out of bounds: 2 + at org.apache.pdfbox.pdmodel.PDPageTree.get(PDPageTree.java:325) + at org.apache.pdfbox.pdmodel.PDPageTree.get(PDPageTree.java:248) + at org.apache.pdfbox.pdmodel.PDDocument.getPage(PDDocument.java:1543) + at org.dspace.app.mediafilter.ImageMagickThumbnailFilter.getImageFile(ImageMagickThumbnailFilter.java:167) + at org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.getDestinationStream(ImageMagickPdfThumbnailFilter.java:27) + at com.atmire.dspace.app.mediafilter.AtmireMediaFilter.processBitstream(AtmireMediaFilter.java:103) + at com.atmire.dspace.app.mediafilter.AtmireMediaFilterServiceImpl.filterBitstream(AtmireMediaFilterServiceImpl.java:61) + at org.dspace.app.mediafilter.MediaFilterServiceImpl.filterItem(MediaFilterServiceImpl.java:181) + at org.dspace.app.mediafilter.MediaFilterServiceImpl.applyFiltersItem(MediaFilterServiceImpl.java:159) + at org.dspace.app.mediafilter.MediaFilterCLITool.main(MediaFilterCLITool.java:232) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229) + at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81) +``` + +- Salem gave me a list of CGSpace collections that have double spaces in the names + - Normally this would only be a minor annoyance, but he discovered that the REST API seems to trim the spaces, which causes an issue when trying to reference them! + - He sent me a list of about ten collection UUIDs so I fixed them +- I found a bunch of LIVES presentations on CGSpace that have presentations on SlideShare with incorrect licenses... I updated about fifty of them + +## 2022-11-26 + +- Sync DSpace Test with CGSpace +- I increased the session timeout in Tomcat from thirty minutes to sixty, as requested by Maria a few weeks ago + - See: https://gitlab.inf.unibz.it/commul/docker/clarin-dspace/-/issues/44 +- I re-built DSpace on CGSpace, ran all updates, and rebooted the machine + - Then after coming back up the handle server won't start + - The `handle-server.log` file shows: + +```console +Shutting down... +"2022/11/26 02:12:17 CET" 25 Rotating log files +Error: null + (see the error log for details.) +``` + +- In the `error.log` file I see: + +```console +"2022/11/26 02:12:18 CET" 25 Started new run. +java.lang.UnsupportedOperationException + at java.lang.Runtime.runFinalizersOnExit(Runtime.java:287) + at java.lang.System.runFinalizersOnExit(System.java:1059) + at net.handle.server.Main.initialize(Main.java:124) + at net.handle.server.Main.main(Main.java:75) +Shutting down... +``` + +- Ah, it seems to be due to an [issue in OpenJDK 1.8.0_352](https://groups.google.com/g/dspace-tech/c/PqjfA5mqG4w/m/FhxI5oXhFwAJ?pli=1) +- I see the server upgraded to the new JDK version on 2022-11-10: + +```console +Upgrade: openjdk-8-jdk-headless:amd64 (8u342-b07-0ubuntu1~20.04, 8u352-ga-1~20.04), openjdk-8-jre-headless:amd64 (8u342-b07-0ubuntu1~20.04, 8u352-ga-1~20.04) +End-Date: 2022-11-10 04:10:45 +``` + +- As highlighted in the dspace-tech mailing list thread above, [this OpenJDK release deprecated `Runtime.runFinalizersOnExit`](https://mail.openjdk.org/pipermail/jdk8u-dev/2022-October/015706.html): + +```console + - JDK-8287132: Retire Runtime.runFinalizersOnExit so that it always throws UOE +``` + +- I downloaded the previous versions of the packages from Launchpad: + +```console +# wget https://launchpad.net/~openjdk-security/+archive/ubuntu/ppa/+build/24195357/+files/openjdk-8-jdk-headless_8u342-b07-0ubuntu1~20.04_amd64.deb +# wget https://launchpad.net/~openjdk-security/+archive/ubuntu/ppa/+build/24195357/+files/openjdk-8-jre-headless_8u342-b07-0ubuntu1~20.04_amd64.deb +# dpkg -i openjdk-8-j*8u342-b07*.deb +``` + +- Then the handle-server process starts up fine, so I held these OpenJDK versions for now: + +```console +# apt-mark hold openjdk-8-jdk-headless:amd64 apt-mark hold openjdk-8-jre-headless:amd64 +openjdk-8-jdk-headless set on hold. +openjdk-8-jre-headless set on hold. +``` + +- Start a harvest on AReS + diff --git a/docs/2022-11/index.html b/docs/2022-11/index.html index 71fd69ad6..0b4a285f8 100644 --- a/docs/2022-11/index.html +++ b/docs/2022-11/index.html @@ -24,7 +24,7 @@ I reverted the Cocoon autosave change because it was more of a nuissance that Pe - + @@ -54,9 +54,9 @@ I reverted the Cocoon autosave change because it was more of a nuissance that Pe "@type": "BlogPosting", "headline": "November, 2022", "url": "https://alanorth.github.io/cgspace-notes/2022-11/", - "wordCount": "1785", + "wordCount": "2221", "datePublished": "2022-11-01T09:11:36+03:00", - "dateModified": "2022-11-23T17:10:47+03:00", + "dateModified": "2022-11-24T17:41:34+03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -425,6 +425,107 @@ I reverted the Cocoon autosave change because it was more of a nuissance that Pe +

2022-11-25

+ +
$ JAVA_OPTS="-Xmx1024m -Dfile.encoding=UTF-8" dspace filter-media -p "ImageMagick PDF Thumbnail" -v -f -i 10568/77010
+The following MediaFilters are enabled:
+Full Filter Name: org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
+org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter
+Loading @mire database changes for module MQM
+Changes have been processed
+IM Thumbnail tropentag2016_marshall.pdf is replacable.
+File: tropentag2016_marshall.pdf.jpg
+ERROR filtering, skipping bitstream:
+
+        Item Handle: 10568/77010
+        Bundle Name: ORIGINAL
+        File Size: 1486580
+        Checksum: 1ad66d918a56a5e84667386e1a32e352 (MD5)
+        Asset Store: 0
+java.lang.IndexOutOfBoundsException: 1-based index out of bounds: 2
+java.lang.IndexOutOfBoundsException: 1-based index out of bounds: 2
+        at org.apache.pdfbox.pdmodel.PDPageTree.get(PDPageTree.java:325)
+        at org.apache.pdfbox.pdmodel.PDPageTree.get(PDPageTree.java:248)
+        at org.apache.pdfbox.pdmodel.PDDocument.getPage(PDDocument.java:1543)
+        at org.dspace.app.mediafilter.ImageMagickThumbnailFilter.getImageFile(ImageMagickThumbnailFilter.java:167)
+        at org.dspace.app.mediafilter.ImageMagickPdfThumbnailFilter.getDestinationStream(ImageMagickPdfThumbnailFilter.java:27)
+        at com.atmire.dspace.app.mediafilter.AtmireMediaFilter.processBitstream(AtmireMediaFilter.java:103)
+        at com.atmire.dspace.app.mediafilter.AtmireMediaFilterServiceImpl.filterBitstream(AtmireMediaFilterServiceImpl.java:61)
+        at org.dspace.app.mediafilter.MediaFilterServiceImpl.filterItem(MediaFilterServiceImpl.java:181)
+        at org.dspace.app.mediafilter.MediaFilterServiceImpl.applyFiltersItem(MediaFilterServiceImpl.java:159)
+        at org.dspace.app.mediafilter.MediaFilterCLITool.main(MediaFilterCLITool.java:232)
+        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
+        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
+        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
+        at java.lang.reflect.Method.invoke(Method.java:498)
+        at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
+        at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
+
+

2022-11-26

+ +
Shutting down...
+"2022/11/26 02:12:17 CET" 25 Rotating log files
+Error: null
+       (see the error log for details.)
+
+
"2022/11/26 02:12:18 CET" 25 Started new run.
+java.lang.UnsupportedOperationException
+        at java.lang.Runtime.runFinalizersOnExit(Runtime.java:287)
+        at java.lang.System.runFinalizersOnExit(System.java:1059)
+        at net.handle.server.Main.initialize(Main.java:124)
+        at net.handle.server.Main.main(Main.java:75)
+Shutting down...
+
+
Upgrade: openjdk-8-jdk-headless:amd64 (8u342-b07-0ubuntu1~20.04, 8u352-ga-1~20.04), openjdk-8-jre-headless:amd64 (8u342-b07-0ubuntu1~20.04, 8u352-ga-1~20.04)
+End-Date: 2022-11-10  04:10:45
+
+
  - JDK-8287132: Retire Runtime.runFinalizersOnExit so that it always throws UOE
+
+
# wget https://launchpad.net/~openjdk-security/+archive/ubuntu/ppa/+build/24195357/+files/openjdk-8-jdk-headless_8u342-b07-0ubuntu1~20.04_amd64.deb
+# wget https://launchpad.net/~openjdk-security/+archive/ubuntu/ppa/+build/24195357/+files/openjdk-8-jre-headless_8u342-b07-0ubuntu1~20.04_amd64.deb
+# dpkg -i openjdk-8-j*8u342-b07*.deb
+
+
# apt-mark hold openjdk-8-jdk-headless:amd64 apt-mark hold openjdk-8-jre-headless:amd64 
+openjdk-8-jdk-headless set on hold.
+openjdk-8-jre-headless set on hold.
+
diff --git a/docs/categories/index.html b/docs/categories/index.html index 08c6304b3..520b41a54 100644 --- a/docs/categories/index.html +++ b/docs/categories/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/index.html b/docs/categories/notes/index.html index ca5b7f56f..d3836c563 100644 --- a/docs/categories/notes/index.html +++ b/docs/categories/notes/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/2/index.html b/docs/categories/notes/page/2/index.html index 2b3b7d2fb..15036c74d 100644 --- a/docs/categories/notes/page/2/index.html +++ b/docs/categories/notes/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/3/index.html b/docs/categories/notes/page/3/index.html index 19f4f812a..41efba7db 100644 --- a/docs/categories/notes/page/3/index.html +++ b/docs/categories/notes/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/4/index.html b/docs/categories/notes/page/4/index.html index 4a1b0af72..1df80d407 100644 --- a/docs/categories/notes/page/4/index.html +++ b/docs/categories/notes/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/5/index.html b/docs/categories/notes/page/5/index.html index 3d60afe67..12c82c9bd 100644 --- a/docs/categories/notes/page/5/index.html +++ b/docs/categories/notes/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/6/index.html b/docs/categories/notes/page/6/index.html index 8ed792aac..f01462857 100644 --- a/docs/categories/notes/page/6/index.html +++ b/docs/categories/notes/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/categories/notes/page/7/index.html b/docs/categories/notes/page/7/index.html index 1ea7d9d53..215eda15d 100644 --- a/docs/categories/notes/page/7/index.html +++ b/docs/categories/notes/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/index.html b/docs/index.html index dfcca611f..e42186942 100644 --- a/docs/index.html +++ b/docs/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/2/index.html b/docs/page/2/index.html index b213d0633..7021ffc58 100644 --- a/docs/page/2/index.html +++ b/docs/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/3/index.html b/docs/page/3/index.html index 18af7be8e..1e6453fbf 100644 --- a/docs/page/3/index.html +++ b/docs/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/4/index.html b/docs/page/4/index.html index fba920d1b..557029a49 100644 --- a/docs/page/4/index.html +++ b/docs/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/5/index.html b/docs/page/5/index.html index f19b68c9c..ab3189088 100644 --- a/docs/page/5/index.html +++ b/docs/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/6/index.html b/docs/page/6/index.html index 8e0aa938a..ab92d0c15 100644 --- a/docs/page/6/index.html +++ b/docs/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/7/index.html b/docs/page/7/index.html index 415c6162b..c51a7c289 100644 --- a/docs/page/7/index.html +++ b/docs/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/8/index.html b/docs/page/8/index.html index 52879249d..166949406 100644 --- a/docs/page/8/index.html +++ b/docs/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/page/9/index.html b/docs/page/9/index.html index 5023a3e88..397bfd644 100644 --- a/docs/page/9/index.html +++ b/docs/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/index.html b/docs/posts/index.html index 2a6cc88db..7cdb1f3aa 100644 --- a/docs/posts/index.html +++ b/docs/posts/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/2/index.html b/docs/posts/page/2/index.html index d25092682..a6759b1eb 100644 --- a/docs/posts/page/2/index.html +++ b/docs/posts/page/2/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/3/index.html b/docs/posts/page/3/index.html index c4a502684..d82db80a3 100644 --- a/docs/posts/page/3/index.html +++ b/docs/posts/page/3/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/4/index.html b/docs/posts/page/4/index.html index 5bba20a4a..a94c48757 100644 --- a/docs/posts/page/4/index.html +++ b/docs/posts/page/4/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/5/index.html b/docs/posts/page/5/index.html index 55d79dcff..1ea5ec8a3 100644 --- a/docs/posts/page/5/index.html +++ b/docs/posts/page/5/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/6/index.html b/docs/posts/page/6/index.html index cbf14619b..ee89f2f06 100644 --- a/docs/posts/page/6/index.html +++ b/docs/posts/page/6/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/7/index.html b/docs/posts/page/7/index.html index fd8e5592f..4c23bea37 100644 --- a/docs/posts/page/7/index.html +++ b/docs/posts/page/7/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/8/index.html b/docs/posts/page/8/index.html index 3b240b4e9..815824953 100644 --- a/docs/posts/page/8/index.html +++ b/docs/posts/page/8/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/posts/page/9/index.html b/docs/posts/page/9/index.html index 5afaa7a1c..ba3711a89 100644 --- a/docs/posts/page/9/index.html +++ b/docs/posts/page/9/index.html @@ -10,7 +10,7 @@ - + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 86ff596b0..fee4618f5 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -3,19 +3,19 @@ xmlns:xhtml="http://www.w3.org/1999/xhtml"> https://alanorth.github.io/cgspace-notes/categories/ - 2022-11-23T17:10:47+03:00 + 2022-11-24T17:41:34+03:00 https://alanorth.github.io/cgspace-notes/ - 2022-11-23T17:10:47+03:00 + 2022-11-24T17:41:34+03:00 https://alanorth.github.io/cgspace-notes/categories/notes/ - 2022-11-23T17:10:47+03:00 + 2022-11-24T17:41:34+03:00 https://alanorth.github.io/cgspace-notes/2022-11/ - 2022-11-23T17:10:47+03:00 + 2022-11-24T17:41:34+03:00 https://alanorth.github.io/cgspace-notes/posts/ - 2022-11-23T17:10:47+03:00 + 2022-11-24T17:41:34+03:00 https://alanorth.github.io/cgspace-notes/2022-10/ 2022-10-31T16:59:47+03:00