You are not logged in.

#1 2012-12-04 09:08:18

hypoglycemic
Member
Registered: 2010-01-14
Posts: 25

Systemctl enable tomcat7 not starting tomcat on boot

I have a fresh upgrade to systemctl and all is going well except tomact is not starting on boot.

'systemctl start tomcat7' is working fine so there does not appear to be problem with tomcat itself.

I have used 'systemctl enable tomcat7' and there was no error reported so it appears that the enable command executes properly.

Is there a specific systemctl log that can help? There appears to be nothing in the tomcat specific logs hmm

Offline

#2 2012-12-04 09:27:36

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Systemctl enable tomcat7 not starting tomcat on boot

systemctl status tomcat7

is what you're looking for. As for the "systemctl log", it's actually called the systemd journal, and you access it with journalctl. The relevant man pages have all the details.

Last edited by tomk (2012-12-04 09:28:23)

Offline

#3 2012-12-04 12:16:25

hypoglycemic
Member
Registered: 2010-01-14
Posts: 25

Re: Systemctl enable tomcat7 not starting tomcat on boot

Thanks for taking the time to help me.

I have this error come up after running systemctl status tomcat7

tomcat7.service - Tomcat 7 servlet container
      Loaded: loaded (/usr/lib/systemd/system/tomcat7.service; enabled)
      Active: failed (Result: exit-code) since Tue, 2012-12-04 21:53:22 EST; 7min ago
     Process: 470 ExecStart=/usr/bin/jsvc -Dcatalina.home=${CATALINA_HOME} -Dcatalina.base=${CATALINA_BASE} -Djava.io.tmpdir=/var/tmp/tomcat7/temp -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar -user tomcat -java-home ${TOMCAT_JAVA_HOME} -wait 10 -pidfile /var/run/tomcat7.pid -errfile /var/log/tomcat7/catalina.err -outfile /var/log/tomcat7/catalina.out $CATALINA_OPTS org.apache.catalina.startup.Bootstrap (code=exited, status=1/FAILURE)
      CGroup: name=systemd:/system/tomcat7.service

Dec 04 21:53:00 flakies systemd[1]: Starting Tomcat 7 servlet container...
Dec 04 21:53:22 flakies systemd[1]: Failed to start Tomcat 7 servlet container.
Dec 04 21:53:22 flakies systemd[1]: Unit tomcat7.service entered failed state

and this comes up in the error log:

Dec 04, 2012 9:53:11 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-7-openjdk/jre/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Dec 04, 2012 9:53:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 04, 2012 9:53:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 7721 ms
Dec 04, 2012 9:53:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 04, 2012 9:53:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
Dec 04, 2012 9:53:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/OpenID.war
Service exit with a return value of 143

Is it possible that one of my apps is stopping the 'enable' version from properly running but the 'start' version running fine? Is the more info I can get?

Below is the error log after running hte start version:
Dec 04, 2012 9:53:11 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-7-openjdk/jre/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Dec 04, 2012 9:53:16 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 04, 2012 9:53:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 7721 ms
Dec 04, 2012 9:53:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 04, 2012 9:53:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
Dec 04, 2012 9:53:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/OpenID.war
Service exit with a return value of 143
Dec 04, 2012 10:14:03 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/lib/jvm/java-7-openjdk/jre/lib/amd64/server:/usr/lib/jvm/java-7-openjdk/jre/lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
Dec 04, 2012 10:14:03 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 04, 2012 10:14:03 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 442 ms
Dec 04, 2012 10:14:03 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 04, 2012 10:14:03 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.33
Dec 04, 2012 10:14:03 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/OpenID.war
Dec 04, 2012 10:14:18 PM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [14,082] milliseconds.
Dec 04, 2012 10:14:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/blog.war
Dec 04, 2012 10:14:18 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: status display disabled
Dec 04, 2012 10:14:18 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
Dec 04, 2012 10:14:18 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/ROOT.war
Dec 04, 2012 10:14:19 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: status display disabled
Dec 04, 2012 10:14:19 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
Dec 04, 2012 10:14:19 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/workshop.war
Dec 04, 2012 10:14:19 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: status display disabled
Dec 04, 2012 10:14:19 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
Dec 04, 2012 10:14:19 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /srv/http/localcity/rss.war
Dec 04, 2012 10:14:20 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: status display disabled
Dec 04, 2012 10:14:20 PM org.apache.catalina.core.ApplicationContext log
INFO: org.tuckey.web.filters.urlrewrite.UrlRewriteFilter INFO: loaded (conf ok)
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /srv/http/localcity/media
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/manager
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/docs
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/examples
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/stand … tedTaglibs is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
Dec 04, 2012 10:14:20 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Dec 04, 2012 10:14:20 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Dec 04, 2012 10:14:20 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@1f294bf3')
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/ROOT
Dec 04, 2012 10:14:20 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /var/lib/tomcat7/webapps/host-manager
Dec 04, 2012 10:14:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 04, 2012 10:14:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 17769 ms

Offline

#4 2013-02-20 16:04:44

ms
Member
From: Bandung, Indonesia
Registered: 2010-07-28
Posts: 80
Website

Re: Systemctl enable tomcat7 not starting tomcat on boot

One of user suggest to increase "-wait" parameter in "/usr/lib/systemd/system/tomcat7.service".

Read more here : https://bugs.archlinux.org/task/33372

Offline

Board footer

Powered by FluxBB