[djatoka-devel] problems running DJatoka in a JSVC-wrapped tomcat instance
Status: Beta
Brought to you by:
rchute
From: Pottinger, H. J. <Pot...@um...> - 2012-04-05 19:24:19
|
Hi, I've already posted this to the Islandora Google Groups mail list, but since the issue is specific to Djatoka, I thought I'd take my story of woe to the djatoka-devel list. Apologies for cross-posting. I am trying to get a Djatoka server instance up and running, alongside a demo Fedora Commons repository. I am using JSVC to wrap the Tomcat server that is embedded in Fedora Commons. The crux of the issue is that, while I'm setting the LD_LIBRARY_PATH environment variable in the JSVC start script (and JSVC is seeing that variable, see the debug output below for details), the Djatoka application's debug output is indicating that LD_LIBRARY_PATH is null. Here's the debug output from djatoka.log when I attempt to use the DjatokaOpenURL Demo: 2012-04-05/13:56:32.562/CDT [http-8081-1] DEBUG envParams: LD_LIBRARY_PATH=null | null/kdu_expand 2012-04-05/13:56:32.568/CDT [http-8081-1] INFO processingRemoteURI: http://memory.loc.gov/gmd/gmd3/g3200/g3200/ct000425.jp2 2012-04-05/13:56:45.932/CDT [http-8081-1] DEBUG remoteCacheSize: 1 2012-04-05/13:56:45.943/CDT [http-8081-1] DEBUG null/kdu_expand -quiet -i /tmp/cache1354165284219469834668641784.jp2 -o /dev/stdout -reduce 3 -region {0.0,0.0},{0.6476683937823834,0.335401643468053} 2012-04-05/13:56:45.946/CDT [http-8081-1] ERROR java.io.IOException: Cannot run program "null/kdu_expand" (in directory "null"): java.io.IOException: error=2, No such file or directory java.io.IOException: Cannot run program "null/kdu_expand" (in directory "null"): java.io.IOException: error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593) at java.lang.Runtime.exec(Runtime.java:431) at gov.lanl.adore.djatoka.kdu.KduExtractExe.process(KduExtractExe.java:229) at gov.lanl.adore.djatoka.DjatokaExtractProcessor.extractImage(DjatokaExtractP rocessor.java:157) at gov.lanl.adore.djatoka.DjatokaExtractProcessor.extractImage(DjatokaExtractP rocessor.java:85) at gov.lanl.adore.djatoka.openurl.OpenURLJP2KService.resolve(OpenURLJP2KServic e.java:255) at org.oclc.oomRef.OpenURLRequestProcessorImpl.resolve(OpenURLRequestProcessor Impl.java:82) at gov.lanl.adore.djatoka.openurl.OpenURLServlet.doGet(OpenURLServlet.java:121 ) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:12 7) at com.googlecode.psiprobe.Tomcat60AgentValve.invoke(Tomcat60AgentValve.java:3 0) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:10 2) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Htt p11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.<init>(UNIXProcess.java:148) at java.lang.ProcessImpl.start(ProcessImpl.java:65) at java.lang.ProcessBuilder.start(ProcessBuilder.java:453) ... 23 more 2012-04-05/13:56:45.947/CDT [http-8081-1] DEBUG cacheSize: 1 2012-04-05/13:56:45.947/CDT [http-8081-1] DEBUG makingTile: /var/djatokacache/cache1834139402-5425033306250233200.jpg 0 params: {"reduce": "3", "level": "3", "region": "0,0,500,500", "rotate": "0", "scalingFactor": "1.0", "scalingDims": "", "compLayer": "0" } The pertinent part is: 2012-04-05/13:56:45.946/CDT [http-8081-1] ERROR java.io.IOException: Cannot run program "null/kdu_expand" (in directory "null"): java.io.IOException: error=2, No such file or directory java.io.IOException: Cannot run program "null/kdu_expand" (in directory "null"): However, from the debug output from JSVC startup, I can confirm the LD_LIBRARY_PATH environment variable is getting passed: sudo service fedora restart -Xmx512m -Djava.awt.headless=true -Dkakadu.home=/opt/adore-djatoka-1.1/bin/Linux-x86-32 -Djava.library.path=/opt/adore-djatoka-1.1/lib/Linux-x86-32 -DLD_LIBRARY_PATH=/opt/adore-djatoka-1.1/lib/Linux-x86-32 -Xmx1024M -Xms768M -XX:MaxPermSize=128M -XX:PermSize=32M -XX:+UseParallelGC -Dfile.encoding=UTF-8 -Dcom.sun.management.jmxremote Stopping Fedora's Tomcat with PID 20498... Stopping jsvc.exec: [ OK ] 05/04/2012 13:53:23 21200 jsvc debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -------------- 05/04/2012 13:53:23 21200 jsvc debug: | Detach: True 05/04/2012 13:53:23 21200 jsvc debug: | Show Version: No 05/04/2012 13:53:23 21200 jsvc debug: | Show Help: No 05/04/2012 13:53:23 21200 jsvc debug: | Check Only: Disabled 05/04/2012 13:53:23 21200 jsvc debug: | Stop: False 05/04/2012 13:53:23 21200 jsvc debug: | Wait: 0 05/04/2012 13:53:23 21200 jsvc debug: | Run as service: No 05/04/2012 13:53:23 21200 jsvc debug: | Install service: No 05/04/2012 13:53:23 21200 jsvc debug: | Remove service: No 05/04/2012 13:53:23 21200 jsvc debug: | JVM Name: "null" 05/04/2012 13:53:23 21200 jsvc debug: | Java Home: "/etc/alternatives/java_sdk_sun" 05/04/2012 13:53:23 21200 jsvc debug: | PID File: "/home/fedora/fedora/tomcat/temp/fedora-tomcat-jsvc.pid" 05/04/2012 13:53:23 21200 jsvc debug: | User Name: "fedora" 05/04/2012 13:53:23 21200 jsvc debug: | Extra Options: 4 05/04/2012 13:53:23 21200 jsvc debug: | "-Dcatalina.home=/home/fedora/fedora/tomcat" 05/04/2012 13:53:23 21200 jsvc debug: | "-Dcatalina.base=/home/fedora/fedora/tomcat" 05/04/2012 13:53:23 21200 jsvc debug: | "-Djava.library.path=/opt/adore-djatoka-1.1/lib/Linux-x86-32" 05/04/2012 13:53:23 21200 jsvc debug: | "-Djava.class.path=/etc/alternatives/java_sdk_sun/lib/tools.jar:/home/fedor a/fedora/tomcat/bin/commons-daemon.jar:/home/fedora/fedora/tomcat/bin/boots trap.jar" 05/04/2012 13:53:23 21200 jsvc debug: | Class Invoked: "org.apache.catalina.startup.Bootstrap" 05/04/2012 13:53:23 21200 jsvc debug: | Class Arguments: 0 05/04/2012 13:53:23 21200 jsvc debug: +------------------------------------------------------- 05/04/2012 13:53:23 21201 jsvc debug: user changed to 'fedora' 05/04/2012 13:53:23 21200 jsvc debug: User 'fedora' validated 05/04/2012 13:53:23 21200 jsvc debug: Attempting to locate Java Home in /etc/alternatives/java_sdk_sun 05/04/2012 13:53:23 21200 jsvc debug: Attempting to locate VM configuration file /etc/alternatives/java_sdk_sun/jre/lib/jvm.cfg 05/04/2012 13:53:23 21200 jsvc debug: Attempting to locate VM configuration file /etc/alternatives/java_sdk_sun/lib/jvm.cfg 05/04/2012 13:53:23 21200 jsvc debug: Attempting to locate VM configuration file /etc/alternatives/java_sdk_sun/jre/lib/i386/jvm.cfg 05/04/2012 13:53:23 21200 jsvc debug: Found VM configuration file at /etc/alternatives/java_sdk_sun/jre/lib/i386/jvm.cfg 05/04/2012 13:53:23 21200 jsvc debug: Found VM client definition in configuration 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/client/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Found VM server definition in configuration 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/server/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Found VM hotspot definition in configuration 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/hotspot/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/hotspot/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Cannot locate library for VM hotspot (skipping) 05/04/2012 13:53:23 21200 jsvc debug: Found VM classic definition in configuration 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/classic/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/classic/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Cannot locate library for VM classic (skipping) 05/04/2012 13:53:23 21200 jsvc debug: Found VM native definition in configuration 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/native/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/native/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Cannot locate library for VM native (skipping) 05/04/2012 13:53:23 21200 jsvc debug: Found VM green definition in configuration 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/green/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/green/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Cannot locate library for VM green (skipping) 05/04/2012 13:53:23 21200 jsvc debug: Java Home located in /etc/alternatives/java_sdk_sun 05/04/2012 13:53:23 21200 jsvc debug: +-- DUMPING JAVA HOME STRUCTURE ------------------------ 05/04/2012 13:53:23 21200 jsvc debug: | Java Home: "/etc/alternatives/java_sdk_sun" 05/04/2012 13:53:23 21200 jsvc debug: | Java VM Config.: "/etc/alternatives/java_sdk_sun/jre/lib/i386/jvm.cfg" 05/04/2012 13:53:23 21200 jsvc debug: | Found JVMs: 2 05/04/2012 13:53:23 21200 jsvc debug: | JVM Name: "client" 05/04/2012 13:53:23 21200 jsvc debug: | "/etc/alternatives/java_sdk_sun/jre/lib/i386/client/libjvm.so" 05/04/2012 13:53:23 21200 jsvc debug: | JVM Name: "server" 05/04/2012 13:53:23 21200 jsvc debug: | "/etc/alternatives/java_sdk_sun/jre/lib/i386/server/libjvm.so" 05/04/2012 13:53:23 21200 jsvc debug: +------------------------------------------------------- 05/04/2012 13:53:23 21200 jsvc debug: Using default JVM in /etc/alternatives/java_sdk_sun/jre/lib/i386/client/libjvm.so 05/04/2012 13:53:23 21200 jsvc debug: Invoking w/ LD_LIBRARY_PATH=/opt/adore-djatoka-1.1/lib/Linux-x86-32:/etc/alternatives/j ava_sdk_sun/jre/lib/i386/client:/etc/alternatives/java_sdk_sun/jre/lib/i386 05/04/2012 13:53:23 21200 jsvc.exec debug: +-- DUMPING PARSED COMMAND LINE ARGUMENTS -------------- 05/04/2012 13:53:23 21200 jsvc.exec debug: | Detach: True 05/04/2012 13:53:23 21200 jsvc.exec debug: | Show Version: No 05/04/2012 13:53:23 21200 jsvc.exec debug: | Show Help: No 05/04/2012 13:53:23 21200 jsvc.exec debug: | Check Only: Disabled 05/04/2012 13:53:23 21200 jsvc.exec debug: | Stop: False 05/04/2012 13:53:23 21200 jsvc.exec debug: | Wait: 0 05/04/2012 13:53:23 21200 jsvc.exec debug: | Run as service: No 05/04/2012 13:53:23 21200 jsvc.exec debug: | Install service: No 05/04/2012 13:53:23 21200 jsvc.exec debug: | Remove service: No 05/04/2012 13:53:23 21200 jsvc.exec debug: | JVM Name: "null" 05/04/2012 13:53:23 21200 jsvc.exec debug: | Java Home: "/etc/alternatives/java_sdk_sun" 05/04/2012 13:53:23 21200 jsvc.exec debug: | PID File: "/home/fedora/fedora/tomcat/temp/fedora-tomcat-jsvc.pid" 05/04/2012 13:53:23 21200 jsvc.exec debug: | User Name: "fedora" 05/04/2012 13:53:23 21200 jsvc.exec debug: | Extra Options: 4 05/04/2012 13:53:23 21200 jsvc.exec debug: | "-Dcatalina.home=/home/fedora/fedora/tomcat" 05/04/2012 13:53:23 21200 jsvc.exec debug: | "-Dcatalina.base=/home/fedora/fedora/tomcat" 05/04/2012 13:53:23 21200 jsvc.exec debug: | "-Djava.library.path=/opt/adore-djatoka-1.1/lib/Linux-x86-32" 05/04/2012 13:53:23 21200 jsvc.exec debug: | "-Djava.class.path=/etc/alternatives/java_sdk_sun/lib/tools.jar:/home/fedor a/fedora/tomcat/bin/commons-daemon.jar:/home/fedora/fedora/tomcat/bin/boots trap.jar" 05/04/2012 13:53:23 21200 jsvc.exec debug: | Class Invoked: "org.apache.catalina.startup.Bootstrap" 05/04/2012 13:53:23 21200 jsvc.exec debug: | Class Arguments: 0 05/04/2012 13:53:23 21200 jsvc.exec debug: +------------------------------------------------------- 05/04/2012 13:53:23 21202 jsvc.exec debug: user changed to 'fedora' 05/04/2012 13:53:23 21200 jsvc.exec debug: User 'fedora' validated 05/04/2012 13:53:23 21200 jsvc.exec debug: Attempting to locate Java Home in /etc/alternatives/java_sdk_sun 05/04/2012 13:53:23 21200 jsvc.exec debug: Attempting to locate VM configuration file /etc/alternatives/java_sdk_sun/jre/lib/jvm.cfg 05/04/2012 13:53:23 21200 jsvc.exec debug: Attempting to locate VM configuration file /etc/alternatives/java_sdk_sun/lib/jvm.cfg 05/04/2012 13:53:23 21200 jsvc.exec debug: Attempting to locate VM configuration file /etc/alternatives/java_sdk_sun/jre/lib/i386/jvm.cfg 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM configuration file at /etc/alternatives/java_sdk_sun/jre/lib/i386/jvm.cfg 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM client definition in configuration 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/client/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM server definition in configuration 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/server/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM hotspot definition in configuration 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/hotspot/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/hotspot/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Cannot locate library for VM hotspot (skipping) 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM classic definition in configuration 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/classic/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/classic/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Cannot locate library for VM classic (skipping) 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM native definition in configuration 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/native/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/native/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Cannot locate library for VM native (skipping) 05/04/2012 13:53:23 21200 jsvc.exec debug: Found VM green definition in configuration 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/jre/lib/i386/green/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Checking library /etc/alternatives/java_sdk_sun/lib/i386/green/libjvm.so 05/04/2012 13:53:23 21200 jsvc.exec debug: Cannot locate library for VM green (skipping) 05/04/2012 13:53:23 21200 jsvc.exec debug: Java Home located in /etc/alternatives/java_sdk_sun 05/04/2012 13:53:23 21200 jsvc.exec debug: +-- DUMPING JAVA HOME STRUCTURE ------------------------ 05/04/2012 13:53:23 21200 jsvc.exec debug: | Java Home: "/etc/alternatives/java_sdk_sun" 05/04/2012 13:53:23 21200 jsvc.exec debug: | Java VM Config.: "/etc/alternatives/java_sdk_sun/jre/lib/i386/jvm.cfg" 05/04/2012 13:53:23 21200 jsvc.exec debug: | Found JVMs: 2 05/04/2012 13:53:23 21200 jsvc.exec debug: | JVM Name: "client" 05/04/2012 13:53:23 21200 jsvc.exec debug: | "/etc/alternatives/java_sdk_sun/jre/lib/i386/client/libjvm.so" 05/04/2012 13:53:23 21200 jsvc.exec debug: | JVM Name: "server" 05/04/2012 13:53:23 21200 jsvc.exec debug: | "/etc/alternatives/java_sdk_sun/jre/lib/i386/server/libjvm.so" 05/04/2012 13:53:23 21200 jsvc.exec debug: +------------------------------------------------------- 05/04/2012 13:53:23 21200 jsvc.exec debug: Running w/ LD_LIBRARY_PATH=/opt/adore-djatoka-1.1/lib/Linux-x86-32:/etc/alternatives/j ava_sdk_sun/jre/lib/i386/client:/etc/alternatives/java_sdk_sun/jre/lib/i386 05/04/2012 13:53:23 21203 jsvc.exec debug: redirecting stdout to /home/fedora/fedora/tomcat/logs/catalina.out and stderr to &1 Starting jsvc.exec [ OK ] Fedora's Tomcat running with PID 21204 Erm, help? :-\ -- HARDY POTTINGER <pot...@um...> University of Missouri Library Systems http://lso.umsystem.edu/~pottingerhj/ https://MOspace.umsystem.edu/ "Don't undertake a project unless it is manifestly important and nearly impossible." --Edwin Land |