Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openseadragon does not display Paged Content #1294

Open
Natkeeran opened this issue Oct 8, 2019 · 22 comments
Open

openseadragon does not display Paged Content #1294

Natkeeran opened this issue Oct 8, 2019 · 22 comments
Labels
Subject: Drupal related specifically to Drupal, usually pointing somewhere on drupal.org
Milestone

Comments

@Natkeeran
Copy link
Contributor

openseadragon does not display Paged Content.

Claw-playbook version: 1d1ffc2f1ff8f712992916320dc2196fc930dfb9

Steps to reproduce

  • Create a Repository Item with model Paged Content
  • Add a Child with model Page
  • Add a media to that child (File - Tiff) with Media Use being Original
  • Go to the Paged Content node

Expected

  • The content is shown in the openseadragon viewer

Actual

  • The viewer is shown, but there is a 500 error
AJAX request returned 500: http://127.0.0.1:8080/cantaloupe/iiif/2/http%3A%2F%2Flocalhost%3A8000%2Fsites%2Fdefault%2Ffiles%2F2019-10%2F2-Service%2520File.jpg
@seth-shaw-unlv
Copy link
Contributor

This would be a cantaloupe error. What does Tomcat error log say caused the 500?

@Natkeeran
Copy link
Contributor Author

I am not seeing any issues in Tomcat:

cantaloupe is throwing errors:

2019-10-15 14:19:24,334 DEBUG [http-nio-8080-exec-5] e.i.l.c.p.i.AbstractImageReader [AbstractImageReader.java:121] createReader(): using com.sun.imageio.plugins.jpeg.JPEGImageReader
2019-10-15 14:19:24,341 ERROR [http-nio-8080-exec-5] o.r.C.WebApplication [Slf4jLogger.java:230] Exception or error caught in server resource
org.restlet.resource.ResourceException: Internal Server Error (500) - The server encountered an unexpected condition which prevented it from fulfilling the request
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:539)
        at org.restlet.resource.ServerResource.get(ServerResource.java:742)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:617)
        at org.restlet.resource.ServerResource.doNegotiatedHandle(ServerResource.java:678)
        at org.restlet.resource.ServerResource.doConditionalHandle(ServerResource.java:356)
        at org.restlet.resource.ServerResource.handle(ServerResource.java:1043)
        at org.restlet.resource.Finder.handle(Finder.java:236)
        at org.restlet.routing.Filter.doHandle(Filter.java:150)
        at org.restlet.routing.Filter.handle(Filter.java:197)
        at org.restlet.routing.Filter.doHandle(Filter.java:150)
        at org.restlet.routing.Filter.handle(Filter.java:197)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
        at org.restlet.engine.application.ApplicationHelper.handle(ApplicationHelper.java:77)
        at org.restlet.Application.handle(Application.java:385)
        at org.restlet.routing.Filter.doHandle(Filter.java:150)
        at org.restlet.routing.Filter.handle(Filter.java:197)
        at org.restlet.routing.Router.doHandle(Router.java:422)
        at org.restlet.routing.Router.handle(Router.java:641)
        at org.restlet.routing.Filter.doHandle(Filter.java:150)
        at org.restlet.routing.Filter.handle(Filter.java:197)
        at org.restlet.routing.Router.doHandle(Router.java:422)
        at org.restlet.routing.Router.handle(Router.java:641)
        at org.restlet.routing.Filter.doHandle(Filter.java:150)
        at org.restlet.routing.Filter.handle(Filter.java:197)
        at org.restlet.engine.CompositeHelper.handle(CompositeHelper.java:202)
        at org.restlet.Component.handle(Component.java:408)
        at org.restlet.Server.handle(Server.java:507)
        at org.restlet.engine.connector.ServerHelper.handle(ServerHelper.java:63)
        at org.restlet.engine.adapter.HttpServerHelper.handle(HttpServerHelper.java:143)
        at org.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:1117)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:200)
  	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
        at ca.islandora.syn.valve.SynValve.invoke(SynValve.java:60)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: edu.illinois.library.cantaloupe.processor.ProcessorException: Not a JPEG file: starts with 0x00 0x38
        at edu.illinois.library.cantaloupe.processor.AbstractImageIOProcessor.readImageInfo(AbstractImageIOProcessor.java:76)
        at edu.illinois.library.cantaloupe.resource.AbstractResource.readInfo(AbstractResource.java:647)
        at edu.illinois.library.cantaloupe.resource.AbstractResource.getOrReadInfo(AbstractResource.java:610)
        at edu.illinois.library.cantaloupe.resource.iiif.v2.InformationResource.doGet(InformationResource.java:100)
        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.restlet.resource.ServerResource.doHandle(ServerResource.java:523)
        ... 66 common frames omitted
Caused by: javax.imageio.IIOException: Not a JPEG file: starts with 0x00 0x38
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(JPEGImageReader.java:628)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(JPEGImageReader.java:622)
        at com.sun.imageio.plugins.jpeg.JPEGImageReader.getWidth(JPEGImageReader.java:735)
        at edu.illinois.library.cantaloupe.processor.imageio.AbstractImageReader.getSize(AbstractImageReader.java:188)
        at edu.illinois.library.cantaloupe.processor.imageio.ImageReader.getSize(ImageReader.java:180)
        at edu.illinois.library.cantaloupe.processor.AbstractImageIOProcessor.readImageInfo(AbstractImageIOProcessor.java:69)
        ... 74 common frames omitted

@whikloj
Copy link
Member

whikloj commented Oct 15, 2019

Does that file exist and is it retrievable?

http://localhost:8000/sites/default/files/2019-10/2-Service File.jpg

@dannylamb
Copy link
Contributor

Any updates on this one?

@mjordan
Copy link
Contributor

mjordan commented Nov 20, 2019

@seth-shaw-unlv over at #1355 you say you can't replicate this error. I wonder if you are running a different OS than @Natkeeran ?

@seth-shaw-unlv
Copy link
Contributor

I've tested both Ubuntu and CentOS.

@seth-shaw-unlv
Copy link
Contributor

As I mentioned on the other thread, I think this is a bad derivative. We need confirmation that the JPEG is good (as @whikloj requested above) to continue debugging this.

@mjordan
Copy link
Contributor

mjordan commented Nov 20, 2019

It's happening for me too, one of the reasons the IIIF docs came in this late. I'll check my logs to confirm.

@mjordan
Copy link
Contributor

mjordan commented Nov 20, 2019

Where is the tomcat log located on Ubuntu?

@seth-shaw-unlv
Copy link
Contributor

Not sure off the top of my head (I play in CentOS more often than not) but according to ansible-role-tomcat8 it is probably in /var/lib/tomcat8 somewhere.

@seth-shaw-unlv
Copy link
Contributor

Cantaloupe also has their own application-specific log file @ /var/log/cantaloupe/application.log on CentOS.

@seth-shaw-unlv
Copy link
Contributor

Actually, we may drop Tomcat logs in the same place for both CentOS and Ubuntu: /opt/tomcat/logs/, but I'd have to spin up a new box to check.

@mjordan
Copy link
Contributor

mjordan commented Nov 20, 2019

Thanks! Then this is not happening to me, tailing that log shows nothing when I view my paged content object. OTOH, Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://127.0.0.1:8080/cantaloupe/iiif/2/http%3A%2F%2Flocalhost%3A8000%2F_flysystem%2Ffedora%2F2019-11%2Frungh_01.jpg. (Reason: CORS request did not succeed). is still showing up in the web console for paged objects. So not sure.

@seth-shaw-unlv
Copy link
Contributor

You know, I don't think I've tried using OpenSeadragon with CORS enabled.... this is probably a separate ticket, though.

@mjordan
Copy link
Contributor

mjordan commented Nov 20, 2019

Yes, I agree, I haven't figured it out to my satisfaction, and I think we are missing potential issues by running vagrants on localhost (and accessing them from localhost). We need to test a variety of server/client combinations. The OSD github issue queue has lots of references to CORS.

@mjordan
Copy link
Contributor

mjordan commented Nov 20, 2019

I can open it, but not at the moment, I've reached my multiasking limit.

@Natkeeran
Copy link
Contributor Author

The issue persists in the latest playbook (Dec 13).

localhost:8000/sites/default/files/2019-12/2-Service File.jpg exists and retrievable.

@whikloj
Copy link
Member

whikloj commented Dec 16, 2019

This seems to be something with the convert generation of the Service File or the Cantaloupe configuration. Using the same Tiff from @Natkeeran's system I was able to ingest it into my vagrant and generate a Jpeg that is accurately displayed in Cantaloupe. It's a weird one.

@Natkeeran Natkeeran added bug and removed bug labels Dec 16, 2019
@Natkeeran
Copy link
Contributor Author

Natkeeran commented Dec 17, 2019

Seems like jpgs generated from some tiff files don't seem to load properly. Attaching some example of those tiff files. OBJ Datastream-3.tiff is from an existing book object in islandora 7.x.

Thus, the issue seems to be with the imagemagick conversion! @whikloj suggested that we should use jpeg2000 anyway.

OBJ Datastream-3.tiff.txt
UTSC.tiff.txt

@dannylamb
Copy link
Contributor

I think it has something to do with our specially compiled version of imagemagick in Ubuntu. We do it to include jp2 support, but something just seems up with it. Folks with CENTOS don't seem to have these issues and can use an official package to install imagemagick with jp2 support. So that appears to support my theory at least.

@dannylamb dannylamb added this to the 1.1.0 milestone Jan 30, 2020
@dannylamb
Copy link
Contributor

We've sorted out the issue with Imagemagick and JP2s in Ubuntu. We need to re-evaluate this to see if it's still an issue.

@dannylamb
Copy link
Contributor

Looks ok on latest build.

image

@Natkeeran You got a bad image you can share to see if we're still making bad derivatives? Wouldn't mind testing with that to double check here.

@kstapelfeldt kstapelfeldt added the Subject: Drupal related specifically to Drupal, usually pointing somewhere on drupal.org label Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Subject: Drupal related specifically to Drupal, usually pointing somewhere on drupal.org
Projects
Development

No branches or pull requests

6 participants