Hi Stian,

I found the issue thanks to your answer, /etc/fuseki wasn't created.
Somehow I missed to look into /catalina.out/ logfile, sorry for that.
Here the error with a straightforward indication:

[2015-04-02 09:51:07] Config     INFO  FUSEKI_HOME=unset
[2015-04-02 09:51:07] Config     INFO FUSEKI_BASE=/etc/fuseki
[2015-04-02 09:51:07] Server     ERROR Exception in server initialization
org.apache.jena.fuseki.FusekiConfigException: Failed to create directory: /etc/fuseki

After I created it with the respective ownership, fuseki started without errors and runs http://134.34.201.195:8080/fuseki/
Thank you for your quick answers and your effort to attempt to reproduce it.

Regards,
Sorin

Am 02.04.2015 um 01:37 schrieb Stian Soiland-Reyes:
I am not sure what that could be - there are no earlier errors? Try

     tail -n100 /var/log/tomcat7/catalina.out


Did you also change the ownership of /etc/fuseki so Tomcat would have
write access to it?

     mkdir /etc/fuseki
     chown tomcat7:tomcat7 /etc/fuseki


You can override this location by setting the FUSEKI_BASE environment
variable in /etc/default/tomcat7 - but still need to ensure the
'tomcat7' user (as it is in Ubuntu) has write access.



I am afraid I was unable to reproduce, using

docker run -it ubuntu:12:04 bash

apt-get update
apt-get install openjdk-7-jdk
apt-get install tomcat7
apt-get install wget
cd /tmp
wget 
http://mirror.vorboss.net/apache/jena/binaries/apache-jena-fuseki-2.0.0.tar.gz
wget 
http://www.apache.org/dist/jena/binaries/apache-jena-fuseki-2.0.0.tar.gz.asc
wget http://www.apache.org/dist/jena/KEYS  # broken https in 12.04
gpg --import KEYS
gpg --verify apache-jena-fuseki-2.0.0.tar.gz.asc
tar zxfv apache-jena-fuseki-2.0.0.tar.gz
mv apache-jena-fuseki-2.0.0/fuseki.war /var/lib/tomcat7/webapps/
mkdir /etc/fuseki
chown tomcat7:tomcat7 /etc/fuseki
/etc/init.d/tomcat7 restart

root@f973c6d9e0ec:/tmp# tail -f /var/log/tomcat7/catalina.out
[2015-04-01 23:13:16] Config     INFO  FUSEKI_BASE=/etc/fuseki
[2015-04-01 23:13:16] Config     INFO  Shiro file: file:///etc/fuseki/shiro.ini
[2015-04-01 23:13:16] Config     INFO  Context path = /fuseki
[2015-04-01 23:13:16] Config     INFO  Configuration file:
/etc/fuseki/config.ttl
Apr 01, 2015 11:13:18 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Apr 01, 2015 11:13:18 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Apr 01, 2015 11:13:18 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 11575 ms



On 1 April 2015 at 17:27, Sorin Gheorghiu
<[email protected]> wrote:
I could change to Java7 by editing JAVA_HOME variable in
/etc/default/tomcat7,
but I got a *listenerStart *error during a new fuseki start attempt:

Apr 01, 2015 6:21:16 PM org.apache.catalina.core.StandardContext
startInternal
Schwerwiegend: Error listenerStart
Apr 01, 2015 6:21:16 PM org.apache.catalina.core.StandardContext
startInternal
Schwerwiegend: Context [/fuseki] startup failed due to previous errors

Regards,
Sorin


Am 01.04.2015 um 17:49 schrieb Stian Soiland-Reyes:
The JAVA_HOME environment variable is not (and should not) be passed
through to a service startup script, as it would not work on reboot.

Instead you have to modify something like /etc/default/tomcat or run
updates-alternatives -config java to change the default java OS-wide.

In some distributions simply uninstalling java 6 is enough, but I don't
think that works in Ubuntu 12.04 as it would probably uninstall tomcat as
well.
On 1 Apr 2015 15:45, "Sorin Gheorghiu" <[email protected]>
wrote:

Indeed, Tomcat Manager shows current version Java6:

Server Information
Tomcat Version  JVM Version     JVM Vendor      OS Name         OS
Version      OS Architecture
Apache Tomcat/7.0.26    1.6.0_27-b27    Sun Microsystems Inc.   Linux
2.6.32-37-pve     amd64



Regards,
Sorin


Am 01.04.2015 um 16:21 schrieb Andy Seaborne:

Tomcat 7 only requires Java 6

It looks like it is being run with Java6 despite your command line
settings showing Java7.

Are you running tomcat as a service?

      Andy

On 01/04/15 15:00, Sorin Gheorghiu wrote:

Hi Jena team,

Following the installation instructions from
http://jena.apache.org/documentation/serving_data/ the fuseki server
2.0.0 starts from command line and it runs as well on local port 3030.

# cd /opt/apache-jena-fuseki-2.0.0
# ./fuseki-server
[2015-04-01 15:32:01] Server     INFO  Fuseki 2.0.0
2015-03-08T09:49:20+0000
[2015-04-01 15:32:01] Config     INFO
FUSEKI_HOME=/opt/apache-jena-fuseki-2.0.0
[2015-04-01 15:32:01] Config     INFO
FUSEKI_BASE=/opt/apache-jena-fuseki-2.0.0/run
[2015-04-01 15:32:01] Servlet    INFO  Initializing Shiro environment
[2015-04-01 15:32:01] Config     INFO  Shiro file:
file:///opt/apache-jena-fuseki-2.0.0/run/shiro.ini
[2015-04-01 15:32:02] Server     INFO  Started 2015/04/01 15:32:02 CEST
on port 3030

But *fuseki.war* failed to start on Tomcat 7.0 (see error [1]). An
upgrade to Java to 1.7.0_51 didn't help, the error still occurs.

# java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)

# echo $JAVA_HOME
/usr/lib/jvm/java-7-openjdk-amd64/

# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:        12.04
Codename:       precise

It seems no permission issue for Tomcat to read the jar files, for
example:

# ls -lrt
/var/lib/tomcat7/webapps/fuseki/WEB-INF/lib/jena-fuseki-core-2.0.0.jar
-rw-r--r-- 1 tomcat7 tomcat7 252125 Mär  8 09:57
/var/lib/tomcat7/webapps/fuseki/WEB-INF/lib/jena-fuseki-core-2.0.0.jar

That's not the WAR file.


Could you provide any advice how to fix this error please?

Thank you in advance,
Sorin

[1]

01.04.2015 15:19:01 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: start: Starting web application '/fuseki'
01.04.2015 15:19:01 org.apache.catalina.core.ApplicationContext log
SCHWERWIEGEND: FAIL - Application at context path /fuseki could not be
started
org.apache.catalina.LifecycleException: Failed to start component
[StandardEngine[Catalina].StandardHost[localhost].StandardContext
[/fuseki]]
           at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
           at

org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1247)

           at

org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:747)


           at

org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:222)


           at
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
           at
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
           at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:305)

           at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

           at

org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:194)


           at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:243)

           at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

           at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(
SetCharacterEncodingFilter.java:108)

           at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:243)

           at
org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)

           at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)


           at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)


           at

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)


           at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)


           at

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)


           at

org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)

           at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)


           at

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)

           at
org.apache.coyote.http11.AbstractHttp11Processor.process(
AbstractHttp11Processor.java:987)

           at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.
process(AbstractProtocol.java:579)

           at

org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)


           at

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)


           at

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)


           at java.lang.Thread.run(Thread.java:679)
Caused by: java.lang.UnsupportedClassVersionError:
org/apache/jena/fuseki/server/FusekiServerEnvironmentInit : Unsupported
major.mi                                    nor version 51.0 (unable to
load class org.apache.jena.fuseki.server.FusekiServerEnvironmentInit)
           at

org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2840)


           at

org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1160)


           at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1668)


           at

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)


           at

org.apache.catalina.startup.WebAnnotationSet.loadClassAnnotation(WebAnnotationSet.java:144)


           at
org.apache.catalina.startup.WebAnnotationSet.
loadApplicationListenerAnnotations(WebAnnotationSet.java:73)

           at

org.apache.catalina.startup.WebAnnotationSet.loadApplicationAnnotations(WebAnnotationSet.java:56)


           at

org.apache.catalina.startup.ContextConfig.applicationAnnotationsConfig(ContextConfig.java:381)


           at

org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:858)


           at

org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345)


           at

org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)


           at

org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)


           at

org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5161)


           at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
           ... 27 more
01.04.2015 15:19:02 org.apache.catalina.core.ApplicationContext log
INFO: HTMLManager: list: Listing contexts for virtual host 'localhost'




--
Sorin Gheorghiu             Tel: +49 7531 88-3198
Universität Konstanz        Raum: B703
78464 Konstanz              [email protected]

- KIM: Abteilung Contentdienste -


--
Sorin Gheorghiu             Tel: +49 7531 88-3198
Universität Konstanz        Raum: B703
78464 Konstanz              [email protected]

- KIM: Abteilung Contentdienste -




--
Sorin Gheorghiu             Tel: +49 7531 88-3198
Universität Konstanz        Raum: B703
78464 Konstanz              [email protected]

- KIM: Abteilung Contentdienste -

Reply via email to