Islandora Large Image - Can't view Images after ingesting. Error Creating JP2/TN/JPG derivatives.

809 views
Skip to first unread message

Brendan C

unread,
Aug 1, 2017, 8:07:15 PM8/1/17
to islandora
Hey everyone.

I've got a weird problem with Islandora's Large Image Solution Pack.

When I ingest and image to a Large Image Collection or Newspaper Collection, I can see the image as an object, but the image itself isn't being displayed.

So far I've tried ingesting TIFF files to a Large Image Collection, and PDF files to a Newspaper Collection.

Here are my specs/modules

- 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.

It might be the fault of Image Magik being out of date.... If so, could someone please direct me to a link to the latest version please? I can't seem to find it.

If that's not it. does anyone have any ideas on what to fix or where to start looking?

Thanks for any help!

- Brendan C

Jared Whiklo

unread,
Aug 1, 2017, 8:19:03 PM8/1/17
to isla...@googlegroups.com
Hi,

I'd start by trying to execute those convert commands on the server with a copy of the tiff.

This might give you a better error message to start from.

Cheers,
Jared

--
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.

dp...@metro.org

unread,
Aug 1, 2017, 10:46:25 PM8/1/17
to islandora
Hi, 
First: what is the output of  your islandora´s site 
you can enable debugging to get better messages.  (you should see  something like ""admin/config/media/image-toolkit"  configuration form?Does that look ok?. If that looks ok, wich means you have something like "ImageMagick was found and returns this version information." you could enable "debugging" to get better messages.  

If that does not look ok, on your Linux terminal type


~$ 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)


now run (replace with your output of the previous command)

/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


Do you get something like that?. Is that your version? 

Error -1 is not a standard Unix error code if I remember right, traditionally it would be 0 for success or positive (until 255 I think? or more?) for other errors. So that -  is probably coming from a bad shell execution, guessing here of course, maybe because Imagemagick binaries are missing or wrongly called by the Drupal imagemagick module, which is really a php wrapper around the real binaries.

My 25cents

Diego Pino
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.

Brendan C

unread,
Aug 2, 2017, 6:33:44 PM8/2/17
to islandora
Hi and thanks for the reply,

I enabled the ImageMagik debugging information and got the following for the version command (This was also displayed on the config page when enabled):

$ /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

With the debugging enabled I went to ingest a TIFF file as a page in a newspaper collection. This is the Debug info:
  • Debug: ImageMagick command:
    /usr/bin/convert -compress LZW /tmp/islandora-71_OBJ.tif /tmp/islandora-71_OBJ.tif.pdf
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -compress None '/tmp/islandora-71_OBJ.tif.tif'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /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'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -quality '75' -resize '200 x 200' '/tmp/islandora-71_TN.jpg'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]' -resize '600 x 800' -quality '75' '/tmp/islandora-71_JPG.jpg'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Derivatives successfully created.
  • "LargeImageTest_Bucket2.tiff" (ID: islandora:71) has been ingested.

Error message

  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Notice: Undefined variable: viewer_id in include() (line 14 of /var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php).
  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Notice: Undefined variable: viewer_id in include() (line 14 of /var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php).
  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
The link "Derivatives successfully created." pointed to the following info:
  • Skipped adding OCR to islandora:37.
  • Skipped adding HOCR to islandora:37.
  • Skipped adding OCR to islandora:40.
  • Skipped adding HOCR to islandora:40.
  • Skipped adding OCR to islandora:42.
  • Skipped adding HOCR to islandora:42.
  • Generated PDF on islandora:68.
  • Skipped adding OCR to islandora:68.
  • Skipped adding HOCR to islandora:68.
  • Kakadu failed. Trying ImageMagick ...
  • Created JP2 derivative.
  • Created TN derivative.
  • Created JPG derivative.
  • Generated PDF on islandora:71.
  • Skipped adding OCR to islandora:71.
  • Skipped adding HOCR to islandora:71.
  • Kakadu failed. Trying ImageMagick ...
  • Created JP2 derivative.
  • Created TN derivative.
  • Created JPG derivative.
Adding an image to a Large Image Collection gave me this debug info:
  • Debug: ImageMagick command:
    /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -quality '75' -resize '200 x 200' '/tmp/islandora-73_TN.jpg'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -resize '600 x 800' -quality '75' '/tmp/islandora-73_JPG.jpg'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]' -compress None '/tmp/islandora-73_OBJ.tif.tif'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Debug: ImageMagick command:
    /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'
    in _imagemagick_convert_exec() (line 495 of /var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module).
  • Derivatives successfully created.
  • "New Object" (ID: islandora:73) has been ingested.

Error message

  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Notice: Undefined variable: viewer_id in include() (line 14 of /var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php).
  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Notice: Undefined variable: viewer_id in include() (line 14 of /var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php).
  • Warning: include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc): failed to open stream: No such file or directory in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
  • Warning: include_once(): Failed opening '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc' for inclusion (include_path='.:/usr/share/php') in include_once() (line 1065 of /var/www/html/drupal/includes/theme.inc).
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.
Despite how the outputs claim derivatives were made, I cannot see the contents of the image when I view them.
However, I am able to see the thumbnails of the images.

Not sure where to go from here... since yesterday I wasn't able to view anything, and now today I can only see thumbnails?

Jared Whiklo

unread,
Aug 3, 2017, 9:10:56 AM8/3/17
to isla...@googlegroups.com
Hi Brendan,

Those errors seem to indicate that the problem is not with generating
derivatives but with viewing them.

The islandora_openseadragon module provides the deep zoom viewer which
displays the JP2 version.

Do you have that installed in Drupal?

cheers,
jared

On 2017-08-02 5:33 PM, Brendan C wrote:
> Hi and thanks for the reply,
>
> I enabled the ImageMagik debugging information and got the following for
> the version command (This was also displayed on the config page when
> enabled):
>
> |
> $ /usr/bin/convert -version
>
> Version:ImageMagick6.8.9-9Q16 x86_64 2017-07-31http://www.imagemagick.org
> Copyright:Copyright(C)1999-2014ImageMagickStudioLLC
> Features:DPC ModulesOpenMP
> Delegates:bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms
> lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
> |
>
> With the debugging enabled I went to ingest a TIFF file as a page in a
> newspaper collection. This is the Debug info:
>
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert -compress LZW /tmp/islandora-71_OBJ.tif
> /tmp/islandora-71_OBJ.tif.pdf
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]'-compress
> None'/tmp/islandora-71_OBJ.tif.tif'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /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'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]'-quality '75'-resize
> '200 x 200''/tmp/islandora-71_TN.jpg'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert '/tmp/islandora-71_OBJ.tif[0]'-resize '600 x
> 800'-quality '75''/tmp/islandora-71_JPG.jpg'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * Derivatives successfully created.
> * "LargeImageTest_Bucket2.tiff" (ID: islandora:71) has been ingested.
>
>
> Error message
>
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Notice/: Undefined variable: viewer_id in /include()/ (line /14/ of
> //var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php/).
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Notice/: Undefined variable: viewer_id in /include()/ (line /14/ of
> //var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php/).
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
>
> The link "Derivatives successfully created." pointed to the following info:
>
> * Skipped adding OCR to islandora:37.
> * Skipped adding HOCR to islandora:37.
> * Skipped adding OCR to islandora:40.
> * Skipped adding HOCR to islandora:40.
> * Skipped adding OCR to islandora:42.
> * Skipped adding HOCR to islandora:42.
> * Generated /PDF/ on /islandora:68/.
> * Skipped adding OCR to islandora:68.
> * Skipped adding HOCR to islandora:68.
> * Kakadu failed. Trying ImageMagick ...
> * Created JP2 derivative.
> * Created TN derivative.
> * Created JPG derivative.
> * Generated /PDF/ on /islandora:71/.
> * Skipped adding OCR to islandora:71.
> * Skipped adding HOCR to islandora:71.
> * Kakadu failed. Trying ImageMagick ...
> * Created JP2 derivative.
> * Created TN derivative.
> * Created JPG derivative.
>
> Adding an image to a Large Image Collection gave me this debug info:
>
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]'-quality '75'-resize
> '200 x 200''/tmp/islandora-73_TN.jpg'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]'-resize '600 x
> 800'-quality '75''/tmp/islandora-73_JPG.jpg'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /usr/bin/convert '/tmp/islandora-73_OBJ.tif[0]'-compress
> None'/tmp/islandora-73_OBJ.tif.tif'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * /Debug/: ImageMagick command:
> |
> /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'
> |
> in /_imagemagick_convert_exec()/ (line /495/ of
> //var/www/html/drupal/sites/all/modules/imagemagick/imagemagick.module/).
> * Derivatives successfully created.
> * "New Object" (ID: islandora:73) has been ingested.
>
>
> Error message
>
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Notice/: Undefined variable: viewer_id in /include()/ (line /14/ of
> //var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php/).
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Notice/: Undefined variable: viewer_id in /include()/ (line /14/ of
> //var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/islandora-openseadragon.tpl.php/).
> * /Warning/:
> include_once(/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc):
> failed to open stream: No such file or directory in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
> * /Warning/: include_once(): Failed opening
> '/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc'
> for inclusion (include_path='.:/usr/share/php') in /include_once()/
> (line /1065/ of //var/www/html/drupal/includes/theme.inc/).
>
> 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.
> ImageMagickfailed to convert.
> Error:-1
> Command:'/tmp/islandora-49_OBJ.tif[0]'-quality '75'-resize
> '200 x 200''/tmp/islandora-49_TN.jpg'
> Output
>
> ImageMagickfailed to convert.
> Error:-1
> Command:'/tmp/islandora-49_OBJ.tif[0]'-resize '600 x
> 800'-quality '75''/tmp/islandora-49_JPG.jpg'
> Output
>
> ImageMagickfailed to convert.
> Error:-1
> Command:'/tmp/islandora-49_OBJ.tif[0]'-compress
> None'/tmp/islandora-49_OBJ.tif.tif'
> Output
>
> ImageMagickfailed 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
>
> Failedto create TN derivative.
>
> Failedto create JPG derivative.
>
> Failedto create JP2 derivative.
> |
>
> It might be the fault of Image Magik being out of date....
> If so, could someone please direct me to a link to the
> latest version please? I can't seem to find it.
>
> If that's not it. does anyone have any ideas on what to fix
> or where to start looking?
>
> Thanks for any help!
>
> - Brendan C
>
> --
> For more information about using this group, please read our
> Listserv Guidelines:
> http://islandora.ca/content/welcome-islandora-listserv
> <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
> <https://groups.google.com/group/islandora>.
> <https://groups.google.com/d/msgid/islandora/d5d45a2f-c5ae-48f5-b83e-2509ccb79d1c%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout
> <https://groups.google.com/d/optout>.
>
> --
> 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
> <mailto: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/82ace6d8-b014-4659-9fae-f96db2fb50c5%40googlegroups.com
> <https://groups.google.com/d/msgid/islandora/82ace6d8-b014-4659-9fae-f96db2fb50c5%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
Jared Whiklo
jwh...@gmail.com
--------------------------------------------------
Everyone wants a bus service to their door, but no one wants a bus
service in their street.

signature.asc
Message has been deleted

Brendan C

unread,
Aug 3, 2017, 2:21:38 PM8/3/17
to islandora
Hello Jared,

I do have the Open Seadragon module installed (Version 7.x-1.9) and enabled. It is also the viewer selected to use for the Large Image and the Newspaper modules. Upon taking a second look (with a rested mind) it seems that a file is missing inside Open Seadragon's module folder. As the errors complain about this file:

/var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc

I've checked the contents of .../islandora_openseadragon/theme/ on my server, and the only file in there is islandora-openseadragon.tpl.php

I downloaded the Open Seadragon module from here[1], and unzipped the contents as root.

Is the download missing files? Or is the file not necessary? If this file can be found at another download or other link, could I please be pointed to it?

- Brendan C

[1] https://wiki.duraspace.org/display/ISLANDORA/Release+Notes+and+Downloads

Jared Whiklo

unread,
Aug 3, 2017, 7:03:31 PM8/3/17
to isla...@googlegroups.com
Hi Brendan,

The theme.inc was only added to islandora_openseadragon 10 days ago, so
it was not part of the 1.9 release.

So I am not sure what is trying to call that file.

Had you installed the bleeding edge of islandora_openseadragon (using git)?

Have you tried clearing the Drupal cache (Admin -> Development ->
Performance)?

If you go directly to Fedora do the objects have all the various
datastreams?

For the above I would take a large image object and go to
http://localhost:8080/fedora/object/<object's pid> then viewing the
object's datastreams (can't remember the link text) and making note of
which ones you have for large. If you are prompted for a password, it is
the fedoraAdmin username/password combo you need to use.

cheers,
jared


On 2017-08-03 1:21 PM, Brendan C wrote:
> Hello Jared,
>
> I do have the Open Seadragon module installed (Version 7.x-1.9) and
> enabled. It is also the viewer selected to use for the Large Image and
> the Newspaper modules. Upon taking a second look (with a rested mind) it
> seems that a file is missing inside Open Seadragon's module folder. As
> the errors complain about this file:
>
> */var/www/html/drupal/sites/all/modules/islandora_openseadragon/theme/theme.inc*
>
> I've checked the contents of *.../islandora_openseadragon/theme/ *on my
> server, and the only file in there is *islandora-openseadragon.tpl.php*
>
> I downloaded the Open Seadragon module from here[1], and unzipped the
> contents as root.
>
> Is the download missing files? Or is the file not necessary? If this
> file can be found at another download or other link, could I please be
> pointed to it?
>
> - Brendan C
>
> [1]
> https://wiki.duraspace.org/display/ISLANDORA/Release+Notes+and+Downloads
> <https://wiki.duraspace.org/display/ISLANDORA/Release+Notes+and+Downloads>
>
> --
> 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
> <mailto: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/9537fb7b-6826-4fca-95a3-0a22875d3ba9%40googlegroups.com
> <https://groups.google.com/d/msgid/islandora/9537fb7b-6826-4fca-95a3-0a22875d3ba9%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

--
Jared Whiklo
jwh...@gmail.com
--------------------------------------------------
How about never? Is never good for you?

signature.asc

Brendan C

unread,
Aug 4, 2017, 6:51:20 PM8/4/17
to islandora
Hi Jared,

Thank you for your continued suggestions. I attempted each as follows:

Viewing the large images as objects in Fedora does display image datastreams such as TN (thumbnail), JP2, Jpeg and OBJ (which has the original TIFF file)

I viewed the contents of each datastream, and I was only able to see an image from the TN and Jpeg datastreams,
I could not see an image by view the contents of the JP2 or TIFF datasteams, those had broken image icons.

I then cleared the Drupal Cache (Admin -> Config -> Development -> Performance) and tried to view a large image.
Surprisingly, I was able to see the HUD icons(Zoom In, Fullscreen, etc.) of the viewer, but not the image itself.
AND I didn't see any complaints about theme.inc

The bleeding edge version of islandora_openseadragon on Github lists itself as version 7.x-dev.
I've already tried to use this version, but it seems to have a problem connecting to the Djatoka site... no matter how
many variations of the link to the Base URL I tried. For example:

adore-djatoka/resolver
http://localhost:8080/adore-djatoka/resolver
http://localhost:8080/adore-djatoka
http://<Local Server IP>:8080/adore-djatoka/resolver
http://<Local Server IP>:8080/adore-djatoka
(excluding "http://" from the above didn't work either)

I tried again but the outcome was the same: no connection to Djatoka, and no image displayed.
The HUD elements were available to see like the 7.x-1.9 however.

The 7.x-1.9 version of Open Seadragon was able to connect to the Djatoka site using "http://<Local Server IP>:8080/adore-djatoka/resolver"
So I used this version instead, thinking that the 7.x-dev version was still being developed


Still I notice that my ImageMagik module is out of date, at version 7.x-1.0.
If a 7.x-1.9 version exists, I would appreciate if I could be provided with a link to it.
Because this might be the problem if the outdated conversions of the images are problematic to the image viewer.

Additionally, if a version of Djatoka that is newer than this link: https://sourceforge.net/projects/djatoka/files/djatoka/1.1/
It might also solve my problem.

Again, thanks for the suggestions. Is there anything else I should try?

Thanks!
- Brendan C.

Brendan C

unread,
Aug 10, 2017, 3:03:24 PM8/10/17
to islandora

Hello again,

I'm still having trouble with viewing the Large Images, but I think I've narrowed down the problem.

First, let me visualize the problem a bit:

My Open Seadragon (Version 7.x-1.9) seems functional, but it cannot display a large image in its viewer. The image appears black. Upon downloading the image from the viewer, it is a blank PNG file.

Upon viewing the image as an object on the Fedora Repository, only the Thumbnail and Jpeg datastreams could yield a viewable image. The TIFF and JP2 datastreams showed a broken image icon.

Here's the kicker: When ingesting a Large Image, a link was provided to a log of the derivative creation. For example, here is the log when ingesting a TIFF image to a Large Image Collection I noted earlier:


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


My Kakadu installation was bundled with Djatoka, and I followed instructions from here:
https://confluence.si.edu/display/SIDKB/Djatoka+Image+Server+Installation+and+Configuration

And followed any instruction not documented there on Islandora's site:
https://wiki.duraspace.org/display/ISLANDORA/Djatoka

I could uninstall Djatoka and try again, but is there anything else I should do or try before then?

Thanks,
- Brendan C

dp...@metro.org

unread,
Aug 10, 2017, 3:52:53 PM8/10/17
to islandora
Brendan, that Error you are seeing is just some missing environmental vars for  compress.sh 
Compress.sh uses inside this: java -classpath ${CLASSPATH} ${JAVA_OPTS} gov.lanl.adore.djatoka.DjatokaCompress $* 

What happens there is that you are running a "sudo" but  sudo does not pass current environment by default. (its like switching users, does your admin user have vars CLASSPATH and JAVA_OPTS?)  Try a sudo -E instead (or no sudo at all!) and make sure 
you have those vars by typing "env"

Also, imagemagick does support JP2 
For centos,
Ubuntu

Are you running SIDORA?

Good luck. 

Brendan C

unread,
Aug 10, 2017, 6:11:57 PM8/10/17
to islandora
Hi there,

I tried running the command without sudo, and with sudo -E but the error persisted

$ 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

I checked to see if the $JAVA_OPTS var existed and it does:
$ 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-oracle

But the var $CLASSPATH does not exist. It doesn't seem like It should though,
as Instructions on Islandora tell to comment CLASSPATH out
of /.../adore-djatoka-1.1/bin/env.sh (Under "Installation Steps" Part 3-b)
https://wiki.duraspace.org/display/ISLANDORA/Djatoka

I'm not running SIDORA, but the instructions for Djatoka on that website seemed
clearer, so I adapted them to fit my Islandora Installation. My full specifications are listed in my first post.
https://confluence.si.edu/display/SIDKB/Djatoka+Image+Server+Installation+and+Configuration

I created the $CATALINA_HOME/bin/setenv.sh file as listed
in the Sidora Instructions, but I removed it and tried the ./compress commands again.
The error still came up, even after restarting fedora.

Any other thoughts?

Thanks again,
- Brendan C

bgil...@pitt.edu

unread,
Aug 14, 2017, 11:28:47 AM8/14/17
to islandora
Brendan,

I noticed a similar issue with JP2 derivative creation and traced the issue to lower-bit samples of the TIF source files.  In some cases, our images were outsourced and the TIF files were 1-bit (if that's possible).

There is a clue in the code in includes/derivatives.inc at the beginning of the islandora_large_image_kdu_compress function where it says:
  // Kakadu does a poor job of converting low bit depths.

I wrote an option for islandora_solution_pack_large_images that will make a RGB 8-bit copy of the source OBJ before creating the derivatives.  I have yet to push this option back to the main repository, but I feel that it would allow your JP2 to be created correctly.

If you want to pull in my code, it is in our repo https://github.com/ulsdevteam/islandora_solution_pack_large_image/commits/uls_normalize_source_for_jp2 in the "uls_normalize_source_for_jp2" feature branch of the forked code and the changeset (for cherry-pick) is 0f9ca77fd9b0b9ef452d699e1cf3e08cf406bd9f .  Essentially, the code only adds the checkbox to the admin form and a few lines to do this RGB 8-bit copy inside the islandora_large_image_create_jp2_derivative function.

I hope this helps.

Brian Gillingham

University of Pittsburgh | University Library System

dp...@metro.org

unread,
Aug 14, 2017, 2:27:38 PM8/14/17
to islandora
Brendan,

First start by making sure "env.sh" file inside your djatoka/bin folder is correct. I have no experience at all with the Sidora documentation, but I do know that the $Classpath used by compress is set there.
Sadly looking at the documentation in https://wiki.duraspace.org/pages/viewpage.action?pageId=83236113, i see why your experience could be wrong: who thought classpath needed to be commented out? (sorry not your fault.. but that is strange and most likely wrong!)
What they are doing there is to remove the classpath so it does not interfer with the catalina's one when using the env.sh (called, invoked) from there, but that is wrong. The correct way of doing that is to append new stuff to classpath in both cases.

Probably worth a ticket for the Documentation IG and the nice folks from DevOps IG, or maybe I'm getting that out of context (the dangers of mixing documentation also). But as it is stated, that wiki entry does not seem cool with your setup.

Anyway:
This is mine:
As you can see classpath is defined there. Give it a try. Also, we have the same setup in our islandora vagrant dev machines.

What Brian Says is correct (++= and I would encourage him to make a pull request (which could get merged if the review goes well and we could be even happier =). There are a few weird things happening also in islandora solution pack large image, like if you start with a JP2 under certain options it degrades your original image and makes it grow in size-bytes(sweet, recompressing what actually does not need to) so your experience will vary, but I would start with fixing your Datoka and making sure all pieces work together (and still work after making changes) before doing that.

best

Diego Pino N
Metro.org


Side note: In case someone wonders about that piece i'm mentioning, here just some test code, not an actual pull to clarify the issue (not solve it). Start by uploading a Lossless JP2 instead of a TIFF image and see what happens. (weird stuff like checking for resolution is a miss understanding of what resolution is meant for, i could have a 100px by 100px file that is "flagged" as 600dpi.. which would just mean, print it/display it kinda ultra small, but the fact about it being 100px by 100px would not be affected.

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;



Daniel Lamb

unread,
Aug 15, 2017, 8:56:49 AM8/15/17
to isla...@googlegroups.com

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"

We sed those in here: https://github.com/Islandora-Labs/islandora_vagrant_base_box/blob/af2984c9aa0c1c3e553959e92eb021e7fb3e0e67/scripts/gsearch.sh#L36

FWIW, if I have any issues with install, I look towards the vagrant build for inspiration.  It's actively maintained, known to work every time, and is pretty easy to copy/paste your way through.

Hope that helps,
Danny
--
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.

Brendan C

unread,
Aug 15, 2017, 6:19:08 PM8/15/17
to islandora
Hello everyone and thanks for the continued support.

I've gotten Kakadu to behave and fucntion properly. Now it creates JP2s just fine. Unfortunately, the images are still unable to be viewed, but I believe I have a good lead.

Here's what happened:

First, I downloaded the development version of the Large Image pack, and followed the edits to enable the RGB 8-bit conversion before derivatives are made.
Although it didn't solve the problem then, this function may prove useful in the future.
Thank you Brian.

Next, I investigated the env.sh file in /opt/adore-djatoka-1.1/bin/
I straighted it out according to Diego's points. Yet Kakadu still kept failing.
But further inspection revealed that something might be wrong with my Djatoka environment variables, particularly $KAKADU_LIBRARY_PATH
This variable pointed to "/usr/local/Djatoka/lib/Linux-x86-64", but that directory didn't exist.
I tried to change the variabe by setting it with the 'export' command and by editing the file "/etc/environment", but Kakadu still failed after rebooting

Then Danny posted suggesting I make changes to the environment variables, and that I point them to "/usr/local/Djatoka/lib/Linux-x86-64"
This prompted me to believe that perhaps the Djatoka installation is supposed to be in "/usr/local/" with fedora and the like.

So I made the "/usr/bin/Djatoaka" directory and copied the files from "/opt/adore-djatoka-1.1/" to there.
I ran $ /usr/bin/kdu_compress and got a wall of help text. No errors
I went and ingested a TIFF image to a Large Collection and checked how the derivatives were made
There was no text saying "Kakadu Failed" or that ImageMagick made the JP2's so I assume the problem has fixed.

------------------------------------

As to why the images still do not appear in the Open Seadragon viewer, I think the problem is a Same Origin Issue.

I wasn't able to properly get the proxy statements to work as outlined in the instructions[1] so I ignored the proxies and carried on.
The only way I figured out this might be the issue is because I right clicked on the viewer and did "Inspect Element" to see if I could find any info of value.

In the "Console" tab of the Element Viewer I saw the following error:

Given this, can someone explain how I get the proxy to work?
I've tried inserting the outlined lines at the very end of "/etc/apache2/apache2.conf", but then apache2 doesn't start up. I've gotten the following info, but not much else:

from apache2's error.log
[Tue Aug 15 15:05:41.311034 2017] [mpm_prefork:notice] [pid 1267] AH00169: caught SIGTERM, shutting down

Brendan C

unread,
Aug 15, 2017, 6:23:13 PM8/15/17
to islandora
Sorry, sent that post too early. using journalctl -xe gave this in regards to the Apache2 failure:

-- 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.

Again, thanks for any suggestions, I really appreciate it.
You've all been helpful

- Brendan C

Phil Redmon

unread,
Aug 15, 2017, 9:52:47 PM8/15/17
to islandora
I'm sitting here with baited breath, I thought for sure you'd be posting your apache config! Post your apache config around line 230 and lets see if you have any errors with your reverse proxy.

--
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.

Brendan C

unread,
Aug 16, 2017, 11:56:45 AM8/16/17
to islandora
Ack, I'm sorry -- should've known better. I also forgot to link the instructions for Open Seadragon at [1] (here: https://wiki.duraspace.org/display/ISLANDORA/Open+Seadragon)

Here's line 225 to line 231 of my apache2.conf file:
# 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

Thanks,
- Brendan C.

Phil Redmon

unread,
Aug 16, 2017, 12:24:11 PM8/16/17
to islandora
I missed this:

Aug 15 15:12:15 ttpserver apache2[1586]: Invalid command 'ProxyPass', perhaps misspelled or defined by a module notincluded in the server confi 

You need to install/enable mod_proxy [1], or i guess it's called proxy_http on ubuntu.


--
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.

Brendan C

unread,
Aug 16, 2017, 12:27:18 PM8/16/17
to islandora
Update: I fixed apache2 not starting by enabling the proxy mods:

$ sudo a2enmod proxy_http
Considering dependency proxy for proxy_http:
Enabling module proxy.
Enabling module proxy_http.

I thought they were already enabled but I was wrong.

I rebooted and I ingested a new image to a Large Image Collection to see if I could see something.
The viewer still shows a black screen and the error in the Element Viewer pops up again:

Are my proxy statements missing something, or do I have to enable more mods, or is a different thing out of whack?

Thanks again,
- Brendan C.

dp...@metro.org

unread,
Aug 16, 2017, 2:53:55 PM8/16/17
to islandora
Ajax is complaining because you have different IP's there (caller versus called)

Brendan C

unread,
Aug 16, 2017, 7:33:35 PM8/16/17
to islandora
Hello Diego,

I'm sorry. This is a crucial piece of info I should've mentioned a while ago:
I'm not very familiar with Islandora, or its surrounding software.

I was under the impression I could follow the Islandora instructions for Djatoka, Open Seadragon, and the like,
without trouble or a need for strong knowledge in PHP, Java Script, AJAX, Apache, etc.

Although I've had about 2 years worth of Java experience, and have been able to glean a fair amount of knowledge in the
surrounding Islandora software, I'm unable to understand a wall of code in this area without a bit of baby talk
or hand holding.

------------------

I'm not sure what to make of the first link you sent. [1]
I don't really know what the context is or what files in the posts are talking about.

Neither do I fully understand where I am to implement steps from the guide. [2]
This seems like a different take on an Islandora installation which has small differences in settings and
file directories that I think may be an unfit refrence for my problem.

What exactly am I looking for in these two links you've referenced?

- Brendan C.

[1] https://stackoverflow.com/questions/22363268/cross-origin-request-blocked
[2] http://v2p2dev.to.cnr.it/doku.php

Brendan C

unread,
Aug 16, 2017, 7:51:49 PM8/16/17
to islandora
Additionally,

I should say that I was trying to follow and implement some of the lines of code in the StackOverflow post and the guide.

Yet my attempts to do didn't fix my "Cross-Origin Request Blocked" problem.

I trie
d inputting the following code from the SO post into my "/var/www/html/.htaccess" file:
<FilesMatch "\.(php)$">
 
<IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
 
</IfModule>
</FilesMatch>
Still getting the error.

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.

Again, I would like a bit of hand holding when giving a solution to try or a link to investigate.

Thank you for your patience and continued support.
- Brendan C.

dp...@metro.org

unread,
Aug 17, 2017, 11:57:26 AM8/17/17
to islandora
Hi Brendan,

The first link [1] I posted was just to refer you to the "why" you were getting that error. Most of the issues you are having are not Islandora related at all, just normal DevOps stuff/issues/problems you would get installing any server side system that has a web server and tomcat/java (which is good, plenty of help around!).

The second link [2] is a comprehensive, step by step (hand-holding) guide written by a community member, curated and tested over and over. I referred you to that list because the proxy part is pretty well explained and easy to follow, but that said everything is a connected flow of steps, so you need to look a bit back, compare with your own decisions (since you followed other guides) and adapt accordingly. 

Sadly we can only try to help based on the info you give us, so sorry for pre-assuming some facts about your installation (lack of background). I also have no way of knowing how much about Linux you know, wrongly assuming that if you decided to go for Sidora, you had some previous experience with Islandora. So lets try to correct this:

I would like to know if what you are deploying is:

1. Production or test/dev server
2. Is the rest of your islandora-fedora environment working? Solr and gsearch indexing, etc?
3. You have multiple machines (like drupal/islandora on one machine, tomcat /adore/fedora,etc on another) or a Single one with all
4. You have restrictions on communication between machines
5. Have you deployed other Web Services, Apache, Tomcat, etc before islandora and you feel comfortable running Linux-command-line tools.


why?
If answers to 1 =="test/dev" and 2 is "no" then i would suggest starting over with your installation, following a single guide, and in special looking at what Daniel Lamb recommended to you: our Islandora Vagrant machines, which are in fact built using just a sequence of bash scripts you could easily execute manually and by doing so learn how to deploy islandora, or, as I did my first time (a few years ago) follow the v2p2dev.to.cnt.it [2] guide By Giancarlo form CNR which in my humble opinion is the most comprehensive step by step guide around. 

Personal opinion on this of course.

If those are not your answers, means you are already in a production environment with objects etc, and you feel you are almost done or are not interested in going back, we can debug further:

Question 3, about how many machines IS very relevant. The error /(cross scripting) you see is not common if you followed the guides. As [1] explains, the issue you have there is that the "caller" (islandora, apache, drupal, all the same) runs on a different IP address than the Service that is loaded via ajax (Adore Djatoja the "called"). That should not happen at all if the same apache server that is serving islandora is, in fact, proxying Adore. For now, forget the .htaccess changes, that is really never needed if the other pieces are working. In all these years i have never seen someone needing to do that. If you need to understand that further read [3] (don´t copy or change anything, just read the thread, someone gives a pretty comprehensive answer there explaining the how)

So, question 3 is pretty important. Having a functional proxy enabled means you can access Adore Djatoka on port 80 directly (same as your islandora site), using the same domain name or IP that islandora runs on. Is that already working?

Can you try to access http://yourdomain.org/adore-djatoka ? does that work?
Can you access http://yourdomain.org:8080/adore-djatoja? can you access 127.0.0.1:8080/adore-djatoka from command line? (using curl, wget.. )

Your proxypass statements in  /etc/apache2/sites-enabled/000-default.conf 
(assuming again something here, you run Ubuntu 14.04, etc)

looks lile  (that is what you pasted)

 ProxyPass /adore-djatoka http://localhost:8080/adore-djatoka

 ProxyPassReverse /adore-djatoka http://localhost:8080/adore-djatoka


but I see also, your server is "ServerName 192.168.0.212"
So this means: if someone calls 192.168.0.2/adore-djatoka it will get data proxied from localhost:8080/adore-djatoka, basically 127.0.0.1:8080/adore-djatoka,
So, lets try: 192.168.0.212/adore-djatoka. Do you see the page?


This part is what confuses me about your setup.:

I see Adore is called from http://192.168.0.212:8080/adore-djatoka/ (copied from your error statement) and that ends in cross scripting issues., so what IP is your Islandora/drupal/apache running on and your Adore and why is it calling adore from port 8080? So question 3 is super relevant. Maybe you are editing the wrong Apache config? Or maybe your setting (admin/islandora/islandora_viewers/openseadragon) for "The location of the Adore-Djatoka server OpenURL resolver" i  still wrong and after the changes,  (assuming you can actually access the proxied URLs) you forgot to update that to actually point to the new endpoint? 

Let's start with this. Sorry if not comprehensive enough or not even clear enough, but I feel it s better to go step by step. Dismiss if you are not interested in going this way.

Diego Pino
Metro.org

Brendan C

unread,
Aug 17, 2017, 7:29:46 PM8/17/17
to islandora

Hello Diego,

Thanks very much for the big reply, here's the info that I understand you want in order to help you help me:

1. This is a production server. More specifically It will be the repository for a newspaper collection, and It will host the web services to view newspaper issues.
2. The rest of my Islandora installation seems to be working just fine. Solr and Gsearch might be a little wonky but they seem to work fine for the most part.
3. I have one single machine with all the software on it. Soon I hope to get all the newspapers on it as well.
4. I don't know if I have restrictions on communications between machines. As it stands, I connect and work on the machine from a remote Ubuntu computer using SSH and its local IP. The server does not have a domain name like "example.com", it's not broadcasted outside the local network yet.
5. I have no previous experience in deploying web services. This project is my only exposure.

Additionally,

I can access http://192.168.0.212/adore-djatoka and http://192.168.0.212:8080/adore-djatoja
I'm not entirely sure I can access 127.0.0.1:8080/adore-djatoka from command line (I used "wget 127.0.0.1:8080/adore-djatoka" and it downloaded a file simply called 'adore-djatoka')

This is what my "/etc/apache2/sites-enabled/000-default.conf" file looks like when I'm able to do this. Sorry for the long post:

<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
The port 8080 was taken out of the Djatoka proxies to allow Seadragon to connect to it.

Currently I have two installations of Djatoka which have the exact same files and setup, but are in different places:
/usr/local/djatoka
/opt/adore-djatoka-1.1

I tried deleting the installation in "/opt/adore-djatoka-1.1" but then
I wasn't able see images on djatoka when setting the base URL to "http://192.168.0.212/adore-djatoka/resolver" anymore.
And Open Seadragon couldn't connect to "http://192.168.0.212/adore-djatoka/resolver" (It also needs the proxies in "/etc/apache2/sites-enabled/000-default.conf" to be without port 8080)

So I put the old installation back in by copying it from /usr/bin/djatoka
I've been meaning to fix this...
The only reason that I have 2 is that there are environment variables and/or files that keep referencing the Djatoka installation to "/usr/local/djatoka/"
so kdu_compress doesn't work without it there, and I haven't been able to fix that.

When I set Open Seadragon to connect to "http://192.168.0.212:8080/adore-djatoka/resolver"
That's when I get the Cross-Origin Request Blocked Error.

But when I read that you said my connection to Djatoka might be wrong, I tried having Open Seadragon to connect to "http://192.168.0.212/adore-djatoka/resolver"
That's when I get a different error. No longer a Cross-Origin Issue:
-- See the pictures I posted for more info.

These errors pop up more if a move the red square in the top right of the viewer around.
I assume thats the section of the image I should be viewing (like a mini map), I wasn't able to move this when I got the Cross-Origin error.
Moving it causes requests for more tiles to be retrieved, but they can't be shown.

At this point, I'm thinking that something else might be wrong after the Cross-Origin error, as it seems I don't run into it when I don't use port 8080 in my Djatoka URL.
Either that or I haven't run into it yet.

The apache2.conf file that I was trying to edit was in "/etc/apache2/"

I think I got everything you asked for...
If you need anymore info I'll get right to it.

Thanks so much for helping me.
- Brendan C.

Brendan C

unread,
Aug 17, 2017, 7:54:39 PM8/17/17
to islandora
Quick Update:

Open Seadragon is trying to load the Image in tiles in the error:
but If I visit the URL without  "region=0%2C0%2Cundefined%2Cundefined&svc.level=1" like so:

I'm able to see the image clear as day
Add if I add something like "region=0,0,1000,1000" to the URL I'll see that region of pixels (from width=0,height=0 to w=1000, h=1000)

So for some reason the region parameter is being passed undefined variables?

I gotta leave it for today, but I'll be back tomorrow and hopefully sort this problem out once and for all

- Brendan C.

Brendan C

unread,
Aug 18, 2017, 12:12:52 PM8/18/17
to islandora

Another Update:

This picture is also probably very important - I should've posted the drop down of this box initially.

Hope this helps clear up what wrong. Heres the text just in case:
TypeError: 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

-Brendan C.

Brendan C

unread,
Aug 18, 2017, 7:44:47 PM8/18/17
to islandora
I've fixed the Viewer Issue.

Turns out, my Libraries for Open Seadragon (located in /var/www/html/drupal/sites/all/libraries/opensedragon) were incorrect.
That's why the variables for svc.region were being all wonky.

I removed them and replaced the libraries with the ones from https://github.com/Islandora/islandora_openseadragon

I rebooted and checked out a large image and I could finally see an image.
So now I have Seadragon connected to Djatoka on port 80
and Kakadu is working just fine creating derivatives.

Thank you all for your time and help, I really appreciate it!
- Brendan C.


dp...@metro.org

unread,
Aug 20, 2017, 1:13:12 PM8/20/17
to islandora
Hi, seems like you got it working, congrats!

Best

Diego
Reply all
Reply to author
Forward
0 new messages