[Zoo-discuss] Zoo-project installation and running on Centos-6
Francesco Barchetta
francesco.barchetta at terradue.com
Thu Jan 7 09:44:33 PST 2016
Dear Gerald,
thanks for updating and validating a new procedure.
I’m trying to follow it and the installation phase comes more smooth now.
Unfortunately I still cannot run the HelloWorldJava service.
This is what I get if I use java-1.7.0-openjdk (and later versions):
./zoo_loader.cgi "Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=myName"
Error occurred during initialization of VM
java.lang.StackOverflowError
at java.lang.Object.<clinit>(Object.java:41)
If I use a 1.6.0 version of libjvm.so I get:
./zoo_loader.cgi "Service=WPS&Request=Execute&Version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=myName"
<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0">
<ows:Exception exceptionCode="InternalError">
<ows:ExceptionText>ZOO Kernel failed to process your request, receiving signal 11 = SIGSEGV</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Can you figure out what is the problem here?
Thanks in advance,
Francesco.
On 05/gen/2016, at 08:08, Fenoy Gerald <gerald.fenoy at geolabs.fr> wrote:
> Dear Francesco,
> I do apologize for answering so late.
>
> After you send this email, I’ve setup a fresh CentOS 6 and used the following setup procedure :
>
> rpm -Uvh http://elgis.argeo.org/repos/6/elgis-release-6-6_0.noarch.rpm
> rpm -Uvh \
> http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
> wget\
> http://proj.badc.rl.ac.uk/cedaservices/raw-attachment/ticket/670/armadillo-3.800.2-1.el6.x86_64.rpm
> yum install armadillo-3.800.2-1.el6.x86_64.rpm
> yum install hdf5.so.6
> yum install gcc-c++ zlib-devel libxml2-devel bison openssl \
> python-devel subversion libxslt-devel libcurl-devel \
> gdal-devel proj-devel libuuid-devel openssl-devel fcgi-devel
> yum install java-1.7.0-openjdk-devel
>
> Then I make sure tu use correct version of both java and java using the update-alternatives --config java and update-alternatives --config java commands
>
> Everything now works well for the Java support on this platform. There were few mistakes which was fixed on the way inside the ZOO-Project Java support which did not appear when using this support on MacOS X.
>
> I have jus updated the installation documentation for CentOS and I thank you for your comment and your help for this.
>
> Best regards,
>
>> Le 18 déc. 2015 à 18:55, Francesco Barchetta <francesco.barchetta at terradue.com> a écrit :
>>
>> Dear Gerald,
>>
>> thank you for the quick response.
>>
>>> For the parameters you added to your httpd.conf for LD_LIBRARY_PATH, I think it is not required. Nevertheless, you should need to run ldconfig after you setup your ZOO-Kernel (by running make install). This should probably solve your issue with GetCapabilities and DescribeProcess.
>>
>> as you can see from the procedure I’ve described, I did the make install but it wasn’t enough.
>>
>>> For the issue when trying to Execute a Java service, I supposed that the issue came because you did not setup the ZOO-API Java Class.
>>
>> Sorry to have missed this in the previous email. I’ve compiled and copied the ZOO-API Java Class but nothing has changed. This is the content of my cgi environment:
>>
>> -rw-r--r-- 1 root root 1527 Dec 17 16:30 HelloJava.class
>> -rwxr-xr-x 1 root root 691 Dec 18 12:43 HelloWorldJava.zcfg
>> -rwxr-xr-x 1 root root 48038 Dec 17 15:29 libZOO.so
>> -rw-r--r-- 1 root root 759 Dec 17 16:05 main.cfg
>> -rw-r--r-- 1 root root 1580 Dec 17 16:35 test_service.py
>> -rw-r--r-- 1 root root 840 Dec 17 16:43 test_service.pyc
>> -rw-r--r-- 1 root root 648 Dec 17 15:29 ZOO.class
>> -rwxr-xr-x 1 root root 445354 Dec 17 16:05 zoo_loader.cgi
>>
>>> Maybe it can help me if you can provide the back trace from gdb after the segfault.
>>
>> Here is the complete backtrace:
>>
>> (gdb) run "Service=WPS&request=Execute&service=WPS&version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=Test"
>> Starting program: /var/www/cgi-bin/zoo_loader.cgi "Service=WPS&request=Execute&service=WPS&version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=Test"
>> [Thread debugging using libthread_db enabled]
>> [New Thread 0x7fffe7283700 (LWP 7268)]
>> [New Thread 0x7fffe7182700 (LWP 7269)]
>> [New Thread 0x7fffe6b8b700 (LWP 7270)]
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x00007ffff500204a in frame::frame(long*, long*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> Missing separate debuginfos, use: debuginfo-install libidn-1.18-2.el6.x86_64
>> (gdb) bt
>> #0 0x00007ffff500204a in frame::frame(long*, long*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #1 0x00007ffff51d6acf in java_lang_Throwable::fill_in_stack_trace(Handle, Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #2 0x00007ffff51d6b79 in java_lang_Throwable::fill_in_stack_trace(Handle) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #3 0x00007ffff5126d67 in Exceptions::throw_stack_overflow_exception(Thread*, char const*, int) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #4 0x00007ffff51d04e1 in JavaCalls::call_helper(JavaValue*, methodHandle*, JavaCallArguments*, Thread*) ()
>> from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #5 0x00007ffff5400869 in os::os_exception_wrapper(void (*)(JavaValue*, methodHandle*, JavaCallArguments*, Thread*), JavaValue*, methodHandle*, JavaCallArguments*, Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #6 0x00007ffff51d03b5 in JavaCalls::call(JavaValue*, methodHandle, JavaCallArguments*, Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #7 0x00007ffff519ffb5 in instanceKlass::call_class_initializer_impl(instanceKlassHandle, Thread*) ()
>> from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #8 0x00007ffff519e538 in instanceKlass::initialize_impl(instanceKlassHandle, Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #9 0x00007ffff519d8fa in instanceKlass::initialize(Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #10 0x00007ffff519e7fc in instanceKlass::initialize_impl(instanceKlassHandle, Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #11 0x00007ffff519d8fa in instanceKlass::initialize(Thread*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #12 0x00007ffff550f654 in Threads::create_vm(JavaVMInitArgs*, bool*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #13 0x00007ffff520b790 in JNI_CreateJavaVM () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>> #14 0x000000000040ceb4 in zoo_java_support ()
>> #15 0x0000000000406fa3 in loadServiceAndRun (myMap=0x7fffffffe188, s1=0x65d0b0, request_inputs=0x65be20, inputs=<value optimized out>, ioutputs=
>> 0x7fffffffe178, eres=0x7fffffffe19c) at zoo_service_loader.c:622
>> #16 0x00000000004090c6 in runRequest (inputs=<value optimized out>) at zoo_service_loader.c:2141
>> #17 0x000000000040628a in cgiMain () at zoo_loader.c:402
>> #18 0x000000000042b63f in main (argc=2, argv=0x7fffffffe458) at cgic.c:312
>>
>>
>> Best regards,
>>
>> Francesco.
>>
>> On 18/dic/2015, at 11:32, Fenoy Gerald <gerald.fenoy at geolabs.fr> wrote:
>>
>>> Hello Francesco,
>>> nice to hear that you are willing to adopt the ZOO-Project.
>>>
>>> First of all, I have to say that this documentation has been written 5 years ago, so any help on setting up the ZOO-Project on CentOS is probably needed. The original version was there : [1].
>>>
>>> For the package names I have to admit that I don’t have access to any CentOS host to verify the package names, so the correct names will help us to fix this part of the documentation.
>>>
>>> For the parameters you added to your httpd.conf for LD_LIBRARY_PATH, I think it is not required. Nevertheless, you should need to run ldconfig after you setup your ZOO-Kernel (by running make install). This should probably solve your issue with GetCapabilities and DescribeProcess.
>>>
>>> I suppose that there is no need anymore for removing any line from ulinet.c to get it working. I hope you can confirm this by executing services passing parameter by reference rather than by value.
>>>
>>> For the issue when trying to Execute a Java service, I supposed that the issue came because you did not setup the ZOO-API Java Class. So I tried it locally but I have a standard Exception report returned in this case and it contains the following information: * Exception in thread "main" java.lang.NoClassDefFoundError: ZOO * . So there should be no problem here. Maybe it can help me if you can provide the back trace from gdb after the segfault.
>>>
>>> I hope to hear back from you,
>>> Best regards,
>>>
>>> [1] http://zoo-project.org/trac/wiki/ZooDocumentation/ZOOKernel/CentOS_installation
>>>
>>>
>>>> Le 18 déc. 2015 à 10:47, Francesco Barchetta <francesco.barchetta at terradue.com> a écrit :
>>>>
>>>> Hello!
>>>>
>>>> In the context of our Earth Observation projects my company (Terradue UK) would like to adopt your implementation of WPS, .
>>>>
>>>> The typical environment where to install the server is a VM with CentOS release 6.7 x86_64 .
>>>>
>>>> INSTALLATION:
>>>>
>>>> From the official documentation:
>>>>
>>>> http://zoo-project.org/docs/install/centos.html
>>>>
>>>> If I've tried to follow the list of commands I quickly found some issue or incorrect steps:
>>>>
>>>> yum install apache2
>>>> do you mean httpd?
>>>> yum install build-essentials
>>>> do you mean yum groupinstall "Development Tools” ?
>>>> yum install gcc-c++
>>>> yum install libxml2-devel
>>>> yum install zlib-devel
>>>> yum install bison
>>>> yum install openssl
>>>> yum install python-devel
>>>> yum install subversion
>>>>
>>>> Additional prerequisites found:
>>>>
>>>> yum install libxslt-devel.x86_64
>>>> yum install libcurl-devel
>>>> yum install gdal-devel
>>>> yum install proj-devel.x86_64
>>>> yum install libuuid-devel
>>>> yum install openssl-devel
>>>>
>>>> FOR GDAL 1.8.0 (otherwise zoo-kernel will complain about VSILFILE)
>>>>
>>>> wget http://download.osgeo.org/gdal/gdal-1.8.0.tar.gz
>>>> tar xzf gdal-1.8.0.tar.gz
>>>> cd gdal-1.8.0
>>>> ./configure # add your options here
>>>> make
>>>> make install
>>>>
>>>> TO INSTALL FASTCGI
>>>>
>>>> wget http://www.fastcgi.com/dist/fcgi.tar.gz
>>>> tar xzf fcgi.tar.gz
>>>> cd fcgi-2.4.1-SNAP-0311112127/
>>>>
>>>> PATCH (from http://stackoverflow.com/questions/4577453/fcgio-cpp50-error-eof-was-not-declared-in-this-scope):
>>>>
>>>> --- include/fcgio.h 2012-01-23 15:23:51.136063795 +0000
>>>> +++ include/fcgio.h 2012-01-23 15:22:19.057221383 +0000
>>>> @@ -31,6 +31,7 @@
>>>> #define FCGIO_H
>>>>
>>>> #include <iostream>
>>>> +#include <stdio.h>
>>>>
>>>> #include "fcgiapp.h"
>>>>
>>>> ./configure
>>>> make
>>>> make install
>>>> echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf
>>>> ldconfig
>>>>
>>>> TO INSTALL autoconf tools (OK)
>>>>
>>>> TO INSTALL FLEX TOOL (OK)
>>>>
>>>> CURL:
>>>>
>>>> To avoid the installation of a different version of Curl, I want to follow the guide about changing the file ulinet.c but the link to the code is broken and:
>>>>
>>>> line 173 is :
>>>>
>>>> printf("\n**[PROXY SETTINGS DETECTION %s (%d) %s:%li (%s)]**\n",proto,proxy_enabled,(char*)proxy_host,proxy_port,buffer);
>>>>
>>>> line 175 is a white line
>>>>
>>>> Should I comment these lines?
>>>>
>>>> Anyway our base line version is 7.19.7. Is it good?
>>>>
>>>> INSTALL ZOO-KERNEL
>>>> Since this section is totally missing I got inspiration from the previous version (still incomplete and not working):
>>>>
>>>> http://www.zoo-project.org/docs/kernel/install-centos.html
>>>>
>>>> svn co http://svn.zoo-project.org/svn/trunk zoo-project
>>>> cd zoo-project/thirds/cgic206
>>>> edit file Makefile in order to set the current fgci path adding:
>>>> LIBS= -L./ -lcgic /usr/local/lib/libfcgi.so
>>>> make
>>>> cd ../../zoo-project/zoo-kernel
>>>> autoconf
>>>> ./configure --with-java=/usr/java/jdk1.6.0_35/ --with-python --with-gdal_config=/usr/bin/gdal-config
>>>> make zoo_loader.cgi
>>>> make install
>>>> cp main.cfg /var/www/cgi-bin/
>>>> cp zoo_loader.cgi /var/www/cgi-bin/
>>>>
>>>> In httpd.conf I have to add:
>>>> SetEnv LD_LIBRARY_PATH /usr/local/lib/
>>>>
>>>> Now the GetCapabilities and DescribeProcess calls work fine.
>>>>
>>>> EXECUTE:
>>>>
>>>> HelloPy works fine.
>>>>
>>>> HelloWorldJava is not working:
>>>>
>>>> From the Browser => 500 Internal Server Error
>>>>
>>>> Form the command line:
>>>>
>>>> ./zoo_loader.cgi "Service=WPS&request=Execute&service=WPS&version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=Test"Content-Type: text/xml; charset=UTF-8
>>>> Status: 501 Internal Server Error
>>>>
>>>> Segmentation fault
>>>>
>>>>
>>>> With gdb:
>>>>
>>>> (gdb) run "Service=WPS&request=Execute&service=WPS&version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=Test"
>>>> Starting program: /var/www/cgi-bin/zoo_loader.cgi "Service=WPS&request=Execute&service=WPS&version=1.0.0&Identifier=HelloWorldJava&DataInputs=S=Test"
>>>> [Thread debugging using libthread_db enabled]
>>>> [New Thread 0x7fffe7283700 (LWP 29445)]
>>>> [New Thread 0x7fffe7182700 (LWP 29446)]
>>>> [New Thread 0x7fffe6b8b700 (LWP 29447)]
>>>>
>>>> Program received signal SIGSEGV, Segmentation fault.
>>>> 0x00007ffff500204a in frame::frame(long*, long*) () from /usr/java/jdk1.6.0_35/jre/lib/amd64/server/libjvm.so
>>>>
>>>>
>>>> CONCLUSIONS
>>>>
>>>> I hope that my experience could help you to improve the installation procedure description and I hope you could help me to find out the reason of the failed execution.
>>>>
>>>> Best Regards,
>>>>
>>>> Francesco Barchetta
>>>>
>>>> Terradue UK
>>>> _______________________________________________
>>>> Zoo-discuss mailing list
>>>> Zoo-discuss at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/zoo-discuss
>>>
>>>
>>>
>>> Gérald Fenoy
>>> http://wiki.osgeo.org/wiki/User:Djay
>>>
>>
>> _______________________________________________
>> Zoo-discuss mailing list
>> Zoo-discuss at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/zoo-discuss
>
>
>
> Gérald Fenoy
> http://wiki.osgeo.org/wiki/User:Djay
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2014 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/zoo-discuss/attachments/20160107/01400f81/attachment.bin>
More information about the Zoo-discuss
mailing list