- Ubuntu Server 16.04 (w/ LAMP 16.04)
- Java JDK 8
- Maven 3.3.9
-
Islandora 7.x-1.9 by completing Milestones 1-6 under Option 1 of the
installation instructions.
- Adore Djatoka 1.1
- Open Seadragon 7.x-1.9
- Large Image 7.x-1.9
- Newspaper 7.x-1.9
- Paged Content 7.x-1.9
- PDF 7.x-1.9
- OCR 7.x-1.9
- Image Magik 7.x-1.0
- Libraries 7.x-1.0
Open Seadragon is able to connect to Djatoka through http://<Local Server IP Here>:8080/adore-djatoka/resolver
I am able to see an image on the Djatoka website.
In Drupal's logs for Islandora, I get Error like these:
ImageMagick failed to convert.
Error: -1
Command: '/tmp/islandora-49_OBJ.tif[0]' -quality '75' -resize '200 x 200' '/tmp/islandora-49_TN.jpg'
Output
ImageMagick failed to convert.
Error: -1
Command: '/tmp/islandora-49_OBJ.tif[0]' -resize '600 x 800' -quality '75' '/tmp/islandora-49_JPG.jpg'
Output
ImageMagick failed to convert.
Error: -1
Command: '/tmp/islandora-49_OBJ.tif[0]' -compress None '/tmp/islandora-49_OBJ.tif.tif'
Output
ImageMagick failed to convert.
Error: -1
Command:
'/tmp/islandora-49_OBJ.tif[0]' -define numrlvls=6 -define
jp2:tilewidth=1024 -define jp2:tileheight=1024 -define jp2:rate=1.0
-define jp2:lazy -define jp2:prg=rlcp -define
jp2:ilyrrates='0.015625,0.01858,0.0221,0.025,0.03125,0.03716,0.04419,0.05,0.0625,0.075,0.088,0.1,0.125,0.15,0.18,0.21,0.25,0.3,0.35,0.4,0.5,0.6,0.7,0.84'
-define jp2:mode=int '/tmp/islandora-49_JP2.jp2'
Output
Failed to create TN derivative.
Failed to create JPG derivative.
Failed to create JP2 derivative.
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/d5d45a2f-c5ae-48f5-b83e-2509ccb79d1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
~$ which convert
/usr/bin/convert
You should see something like that ( that result goes into Path to the "convert" binary * on the previous form, press save, see if things look better)
/usr/bin/convert -version
Version: ImageMagick 6.7.7-10 2017-02-22 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
$ /usr/bin/convert -version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2017-07-31 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
/usr/bin/convert -compress LZW /tmp/islandora-71_OBJ.tif /tmp/islandora-71_OBJ.tif.pdf /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -compress None '/tmp/islandora-71_OBJ.tif.tif' /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -define numrlvls=6 -define jp2:tilewidth=1024 -define jp2:tileheight=1024 -define jp2:rate=1.0 -define jp2:lazy -define jp2:prg=rlcp -define jp2:ilyrrates='0.015625,0.01858,0.0221,0.025,0.03125,0.03716,0.04419,0.05,0.0625,0.075,0.088,0.1,0.125,0.15,0.18,0.21,0.25,0.3,0.35,0.4,0.5,0.6,0.7,0.84' -define jp2:mode=int '/tmp/islandora-71_JP2.jp2' /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -quality '75' -resize '200 x 200' '/tmp/islandora-71_TN.jpg' /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -resize '600 x 800' -quality '75' '/tmp/islandora-71_JPG.jpg' /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -quality '75' -resize '200 x 200' '/tmp/islandora-73_TN.jpg' /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -resize '600 x 800' -quality '75' '/tmp/islandora-73_JPG.jpg' /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -compress None '/tmp/islandora-73_OBJ.tif.tif' /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -define numrlvls=6 -define jp2:tilewidth=1024 -define jp2:tileheight=1024 -define jp2:rate=1.0 -define jp2:lazy -define jp2:prg=rlcp -define jp2:ilyrrates='0.015625,0.01858,0.0221,0.025,0.03125,0.03716,0.04419,0.05,0.0625,0.075,0.088,0.1,0.125,0.15,0.18,0.21,0.25,0.3,0.35,0.4,0.5,0.6,0.7,0.84' -define jp2:mode=int '/tmp/islandora-73_JP2.jp2' “
And this link
to "Derivatives successfully created."
pointed to the following info:
Created TN derivative.
Created JPG derivative.
Kakadu failed. Trying ImageMagick ...
Created JP2 derivative.
”
Kakadu is
failing to create the proper JP2 derivative, and drupal defaulted to
ImageMagick to do the job. However ImageMagick doesn't have support
for making JP2 derivatives as far as I know.
So something is
wrong with my Kakadu installation.
I went to test Kakadu by
running the following, but I received an error:
$ cd /opt/sidora/adore-djatoka-1.1/bin
$ sudo ./compress.sh -i /home/brendan/Brendans_testShot.png -o /home/brendan/test.jp2
Error: Could not find or load main class gov.lanl.adore.djatoka.DjatokaCompress
$ cd /opt/sidora/adore-djatoka-1.1/bin
$ ./compress.sh -i /home/brendan/Brendans_testShot.png -o /home/brendan/test.jp2
Error: Could not find or load main class gov.lanl.adore.djatoka.DjatokaCompress
$ sudo -E ./compress.sh -i /home/brendan/Brendans_testShot.png -o /home/brendan/test.jp2
Error: Could not find or load main class gov.lanl.adore.djatoka.DjatokaCompress
$ env | grep JAVA
JAVA_OPTS=-Xms1024m -Xmx1024m -Djavax.net.ssl.trustStore=/usr/local/fedora/server/truststore -Djavax.net.ssl.trustStorePassword=tomcat
JAVA_HOME=/usr/lib/jvm/java-8-oracleUniversity of Pittsburgh | University Library System
diff --git a/includes/derivatives.inc b/includes/derivatives.inc
index afb8c74..d7b0faf 100644
--- a/includes/derivatives.inc
+++ b/includes/derivatives.inc
@@ -68,8 +69,7 @@ function islandora_large_image_create_jp2_derivative(AbstractObject $object, $fo
',',
exec(escapeshellcmd("$identify -format \"%h,%W,%y,%x\" $file_path"))
);
- if (((int) $x_resolution < 300 || (int) $y_resolution < 300) ||
- ($height < 1024 || $width < 1024)) {
+ if (($height < 1024 || $width < 1024)) {
$lossless = TRUE;
}
}
@@ -77,7 +77,8 @@ function islandora_large_image_create_jp2_derivative(AbstractObject $object, $fo
if ($kakadu) {
// Create JP2.
if (!$lossless) {
- $derivative_file = islandora_large_image_kdu_compress($uploaded_file, "temporary://{$base_name}_JP2.jp2");
+ error_log('will run kdu compress');
+ $derivative_file = islandora_large_image_kdu_compress($uploaded_file, "temporary://{$base_name}_JP2.jp2");
}
else {
$derivative_file = islandora_large_image_kdu_compress(
@@ -295,7 +296,7 @@ function islandora_large_image_kdu_compress($src, $dest, $args = NULL) {
$unlink_source = TRUE;
}
// Default args.
- $args = isset($args) ? $args : '-rate 0.5 Clayers=1 Clevels=7 "Cprecincts={256,256},{256,256},{256,256},{128,128},{128,128},{64,64},{64,64},{3
+ $args = isset($args) ? $args : '-rate 0.75 Clayers=1 Clevels=7 "Cprecincts={256,256},{256,256},{256,256},{128,128},{128,128},{64,64},{64,64},{
$src = drupal_realpath($src);
$dest = drupal_realpath($dest);
$ret = -1;
Brendan,
Not to pile on here, but sounds like ld can't find the library. You'll need to add a config file to point ld to it and touch up your JAVA_OPTS.
The file should be /etc/ld.so.conf.d/kdu_libs.conf and contain this single line: /usr/local/djatoka/lib/Linux-x86-64
See https://github.com/Islandora-Labs/islandora_vagrant_base_box/blob/master/scripts/djatoka.sh#L35-L36 and https://github.com/Islandora-Labs/islandora_vagrant_base_box/blob/master/configs/kdu_libs.conf for how it's done in islandora_vagrant.
Then you need to add the path to the file to your JAVA_OPTS
environment variable. In either /etc/default/tomcat7 or
/etc/default/tomcat8 (depending on what version you are using),
you'll need to append
-DLD_LIBRARY_PATH=/usr/local/djatoka/lib/Linux-x86-64 to JAVA_OPTS
and then cycle tomat.
From a fresh islandora_vagrant, my JAVA_OPTS look like this:
JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m
-XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC
-Dkakadu.home=/usr/local/djatoka/bin/Linux-x86-64
-Djava.library.path=/usr/local/djatoka/lib/Linux-x86-64
-DLD_LIBRARY_PATH=/usr/local/djatoka/lib/Linux-x86-64"
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/69ee6495-0737-4b3e-b9ea-801f1b4747bf%40googlegroups.com.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.0.212:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http%3A%2F%2F192.168.0.212%2Fdrupal%2Fislandora%2Fobject%2Fislandora%253A124%2Fdatastream%2FJP2%2Fview%3Ftoken%3De3c94b02a665959521f8f4029eb00a1ff8a4f4af06362330cbf3dd3a9bebaea3&svc_id=info%3Alanl-repo%2Fsvc%2FgetMetadata. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).-- Subject: Unit apache2.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit apache2.service has begun starting up.
Aug 15 15:12:14 ttpserver apache2[1586]: * Starting Apache httpd web server apache2
Aug 15 15:12:15 ttpserver apache2[1586]: *
Aug 15 15:12:15 ttpserver apache2[1586]: * The apache2 configtest failed.
Aug 15 15:12:15 ttpserver apache2[1586]: Output of config test was:
Aug 15 15:12:15 ttpserver apache2[1586]: AH00526: Syntax error on line 230 of /etc/apache2/apache2.conf:
Aug 15 15:12:15 ttpserver apache2[1586]: Invalid command 'ProxyPass', perhaps misspelled or defined by a module not included in the server confi
Aug 15 15:12:15 ttpserver apache2[1586]: Action 'configtest' failed.
Aug 15 15:12:15 ttpserver apache2[1586]: The Apache error log may have more information.
Aug 15 15:12:15 ttpserver systemd[1]: apache2.service: Control process exited, code=exited status=1
Aug 15 15:12:15 ttpserver systemd[1]: Failed to start LSB: Apache2 web server.
--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/d65150ad-f74e-428c-b751-f11ea9c09c1d%40googlegroups.com.
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ServerName 192.168.0.212
# Djatoka proxy for Open Seadragon
ProxyPass /adore-djatoka http://localhost:8080/adore-djatoka
ProxyPassReverse /adore-djatoka http://localhost:8080/adore-djatoka--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/24807154-b9d9-422f-ac47-792fd6670592%40googlegroups.com.
$ sudo a2enmod proxy_http
Considering dependency proxy for proxy_http:
Enabling module proxy.
Enabling module proxy_http.Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://192.168.0.212:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http%3A%2F%2F192.168.0.212%2Fdrupal%2Fislandora%2Fobject%2Fislandora%253A125%2Fdatastream%2FJP2%2Fview%3Ftoken%3D6633a8cee6722c8aa1f02a127c17d133b71902eadb7b71058fd5630f02b593b7&svc_id=info%3Alanl-repo%2Fsvc%2FgetMetadata. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).Cross-Origin Request Blocked" problem.
I tried inputting the following code from the SO post into my "/var/www/html/.htaccess" file:Again, I would like a bit of hand holding when giving a solution to try or a link to investigate.Still getting the error.<FilesMatch "\.(php)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
I tried following this part of the guide for the http / https reverse proxy (I implemented both examples):
http://v2p2dev.to.cnr.it/doku.php?id=repo381:revproxy
Still didn't fix the error.
I also tried putting "Header set Access-Control-Allow-Origin "*"" at the top of my .htaccess file, but that only took the server down upon restarting.
ProxyPass /adore-djatoka http://localhost:8080/adore-djatoka
ProxyPassReverse /adore-djatoka http://localhost:8080/adore-djatoka
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyRequests On
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /fedora/describe ajp://192.168.0.212:8080/fedora/describe
ProxyPassReverse /fedora/describe ajp://192.168.0.212:8080/fedora/describe
ProxyPass /fedora/risearch ajp://192.168.0.212:8080/fedora/risearch
ProxyPassReverse /fedora/risearch ajp://192.168.0.212:8080/fedora/risearch
ProxyPass /fedora/get ajp://192.168.0.212:8080/fedora/get
ProxyPassReverse /fedora/get ajp://192.168.0.212:8080/fedora/get
ProxyPass /fedora/services ajp://192.168.0.212:8080/fedora/services
ProxyPassReverse /fedora/services ajp://192.168.0.212:8080/fedora/services
ProxyPass /adore-djatoka ajp://192.168.0.212/adore-djatoka
ProxyPassReverse /adore-djatoka ajp://192.168.0.212/adore-djatoka
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Cross-Origin Request Blocked Error. "Tile 1/0_0 failed to load: http://192.168.0.212/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http%3A%2F%2F192.168.0.212%2Fdrupal%2Fislandora%2Fobject%2Fislandora%253A126%2Fdatastream%2FJP2%2Fview%3Ftoken%3D5aeca0bf0119158427710d1f647ae5a8fdbe1cdd0ec18755e69efcab0e509d88&svc_id=info%3Alanl-repo%2Fsvc%2FgetRegion&svc_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajpeg2000&svc.region=0%2C0%2Cundefined%2Cundefined&svc.level=1 - error: Image load aborted""Tile 1/0_0 failed to load: http://192.168.0.212/adore-djatoka/resolver?url_ver=Z39.88-2004&rft_id=http%3A%2F%2F192.168.0.212%2Fdrupal%2Fislandora%2Fobject%2Fislandora%253A126%2Fdatastream%2FJP2%2Fview%3Ftoken%3D5aeca0bf0119158427710d1f647ae5a8fdbe1cdd0ec18755e69efcab0e509d88&svc_id=info%3Alanl-repo%2Fsvc%2FgetRegion&svc_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Ajpeg2000&svc.region=0%2C0%2Cundefined%2Cundefined&svc.level=1 - error: Image load aborted"region=0%2C0%2Cundefined%2Cundefined&svc.level=1" like so:
I'm able to see the image clear as dayTypeError: viewer.viewport is undefined[Learn More] islandora_openseadragon.js:55:17
update_clip http://192.168.0.212/drupal/sites/all/modules/islandora_openseadragon/js/islandora_openseadragon.js:55:17
getHandler/< http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:2912:21
raiseEvent http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:2934:13
checkCompletion http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:7385:21
doOne/options.success http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:7437:17
addTiledImage/< http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:8217:21
waitUntilReady http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:8935:13
getTileSourceImplementation/< http://192.168.0.212/drupal/sites/all/libraries/openseadragon/openseadragon.js:8996:13