LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-17-2011, 02:20 AM   #1
sanjay87
Member
 
Registered: Oct 2011
Posts: 164

Rep: Reputation: Disabled
Tomcat server getting shutdown frequently


HI
i had installed tomcat server its works fine but its getting stop frequently.i had check out logs it doesint give anythings about error about shutdown ..can someone help me out how can i resolve tomcat stopping issue

i had chkconfig --level 345 tomcat on ..even server restart chkconfig level not staying off

server.xml
<?xml version='1.0' encoding='utf-8'?>
<Server port="8007" shutdown="SHUTDOWN">

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />

<Service name="Catalina">

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8081" />
<Connector port="8081" protocol="AJP/1.3" redirectPort="8081" />

<Engine name="Catalina" defaultHost="localhost">

<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

<Listener className="org.apache.jk.config.ApacheConfig"
modJk="/etc/httpd/modules/mod_jk.so" />

</Host>
</Engine>
</Service>
</Server>
 
Old 11-17-2011, 08:58 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by sanjay87 View Post
HI
i had installed tomcat server its works fine but its getting stop frequently.i had check out logs it doesint give anythings about error about shutdown ..can someone help me out how can i resolve tomcat stopping issue

i had chkconfig --level 345 tomcat on ..even server restart chkconfig level not staying off
How can we help you? You don't give us any details...version/distro of Linux? Tomcat? ANY log messages (not just syslog, have you checked both the apache and tomcat logs?). The chkconfig will only set a service to start at boot time or when the server enters that runlevel. It won't automatically restart a process.

If the only thing crashing is tomcat, and you can restart tomcat manually after a crash, then there has to be a log message SOMEWHERE that tells you why it died.
 
Old 01-20-2012, 06:40 AM   #3
jayakumar01
Member
 
Registered: Nov 2011
Posts: 106

Rep: Reputation: Disabled
Tomcat memory leak error while lauching web application

[root@xx~]# tail -f /tomcat/apache-tomcat-6.0.26/logs/catalina.out
2012-Jan-20 13:33:42:186(MultiDaoSupport.java:getJdbcTemplate:250)-getJdbcTemplate() - start
2012-Jan-20 13:33:42:187(MultiDaoSupport.java:getJdbcTemplate:252)-getJdbcTemplate() - end
2012-Jan-20 13:33:42:188(MultiDaoSupport.java:initTemplateConfig:68)-initTemplateConfig() - end
2012-Jan-20 13:33:42:189(MultiDaoSupport.java:setJdbcTemplate:242)-setJdbcTemplate(JdbcTemplate) - end
2012-Jan-20 13:33:42:189(MultiDaoSupport.java:setJpaTemplate:167)-setJpaTemplate(JpaTemplate) - start
2012-Jan-20 13:33:42:189(MultiDaoSupport.java:setJpaTemplate:171)-setJpaTemplate(JpaTemplate) - end
2012-Jan-20 13:33:42:190(MultiDaoSupport.java:checkDaoConfig:267)-checkDaoConfig() - start
2012-Jan-20 13:33:42:190(MultiDaoSupport.java:checkDaoConfig:273)-checkDaoConfig() - end
2012-Jan-20 13:33:42:664(FlightServiceInvoker.java:init:81)-init starts
2012-Jan-20 13:33:42:958(FlightServiceInvoker.java:init:95)-init ends
2012-Jan-20 13:33:48:592(ContextLoader.java:initWebApplicationContext:215)-Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taxInterceptor' defined in ServletContext resource [/WEB-INF/ctx/common.xml]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolve r.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
at java.security.AccessController.doPrivileged(Native Method)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261 )
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.ja va:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java: 45)
at org.performics.util.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:28)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:519)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiatio nStrategy.java:87)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolve r.java:248)
... 42 more
Caused by: java.lang.NumberFormatException: For input string: "0,1000"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)
at java.lang.Double.valueOf(Double.java:475)
at org.performics.business.mis.interceptors.common.TaxInterceptor.<clinit>(TaxInterceptor.java:55)
... 49 more

2012-Jan-20 13:33:48:594(MasterDataApplicationScopeListener.java:contextInitialized:79)-contextInitialized(ServletContextEvent) - start 20.01.2012 13:33:48 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Error listenerStart
20.01.2012 13:33:48 org.apache.catalina.core.StandardContext start
SCHWERWIEGEND: Context [] startup failed due to previous errors
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SCHWERWIEGEND: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesStopTimerThread
SCHWERWIEGEND: A web application appears to have started a TimerThread named [Timer-0] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-2] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-3] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-4] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-5] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-6] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-7] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-8] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-9] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-10] but has failed to stop it. This is very likely to create a memory leak.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_QuartzSchedulerThread] but has failed to stop it. This is very likely to create a memory leak.
log4j:ERROR LogMananger.repositorySelector was null likely due to error in class reloading, using NOPLoggerRepository.
20.01.2012 13:33:49 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory docs
20.01.2012 13:33:49 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory examples
20.01.2012 13:33:49 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory cms
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
20.01.2012 13:33:49 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
20.01.2012 13:33:49 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8081
20.01.2012 13:33:49 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/12 config=null
20.01.2012 13:33:49 org.apache.catalina.startup.Catalina start
INFO: Server startup in 14104 ms

[root@xxx ~]# free
total used free shared buffers cached
Mem: 8114312 7426824 687488 0 312544 5586636
-/+ buffers/cache: 1527644 6586668
Swap: 4096552 0 4096552
[root@b091 ~]#
 
Old 01-20-2012, 06:50 AM   #4
jayakumar01
Member
 
Registered: Nov 2011
Posts: 106

Rep: Reputation: Disabled
Tomcatshutting down frequently

Hi
Frequently im facing out problem of tomcat service getting shut down automatically .

Ditro os:centos 5.4
Tomcat version :6.0.26
chkconfig level i had made made on for 345 level but still the tomcat breaks up frequently .i never getting out any error about the shutdown in tomcat logs.
 
Old 01-20-2012, 11:14 AM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by jayakumar01 View Post
Hi
Frequently im facing out problem of tomcat service getting shut down automatically .

Ditro os:centos 5.4
Tomcat version :6.0.26
chkconfig level i had made made on for 345 level but still the tomcat breaks up frequently .i never getting out any error about the shutdown in tomcat logs.
Ok...did you read the reply above???

Unless you can identify WHAT is causing the crash, there's no way of anyone being able to help you. There is some application/script/SOMETHING, somewhere, causing the problem(s). Identify what, then debug it...can't get much simpler than that. All you've told us is your tomcat crashes...which gives us NOTHING to go on.
 
Old 01-20-2012, 11:33 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by jayakumar01 View Post
[root@xx~]# tail -f /tomcat/apache-tomcat-6.0.26/logs/catalina.out
2012-Jan-20 13:33:48:592(ContextLoader.java:initWebApplicationContext:215)-Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taxInterceptor' defined in ServletContext resource [/WEB-INF/ctx/common.xml]: Instantiation of bean failed; nested exception is java.lang.ExceptionInInitializerError

Caused by: java.lang.ExceptionInInitializerError

Caused by: java.lang.NumberFormatException: For input string: "0,1000"

SCHWERWIEGEND: A web application registered the JBDC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesStopTimerThread
SCHWERWIEGEND: A web application appears to have started a TimerThread named [Timer-0] via the java.util.Timer API but has failed to stop it. To prevent a memory leak, the timer (and hence the associated thread) has been forcibly cancelled.
20.01.2012 13:33:48 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SCHWERWIEGEND: A web application appears to have started a thread named [DefaultQuartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak.
Ok...you posted a chunk of your tomcat logs, and hijacked someone elses thread with a question too. I'll take it that the version/distro of Linux and the version of tomcat are what you hijacked that other thread with.

However, you STILL don't tell us WHAT web application is causing this, who wrote it, etc. Looks like it was poorly written, and tells you that the JDBC driver wasn't unregistered when the app stopped. Whoever wrote the app probably has more work to do on it...why don't you contact the developer? Also, again...have you bothered to check Google for these errors??? Amazingly, there appears to be over 5,000 hits, along with solutions....

http://www.coderanch.com/t/501922/To...ed-TimerThread
http://wiki.apache.org/tomcat/MemoryLeakProtection

...and one is even on this very site, detailing a bug in 6.0.26 in Tomcat....
http://www.linuxquestions.org/questi...celled-814369/
 
Old 01-20-2012, 01:10 PM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
@jayakumar01: please (and I mean please) don't add confusion by replying in place of someone from your team or don't post in the same thread with two different accounts whatever be the case. In the meanwhile I've merged two strictly related threads of yours into this one, but please (and I repeat please) refrain from this behaviour in the future. Nuff' said!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 5.5 is rebooting frequently without any logs on the server cvhbsk Linux - General 2 02-05-2011 12:20 AM
server hung frequently samprabhu Linux - Server 6 05-10-2010 11:34 AM
RHEL installed DELL server is not getting out of network frequently............... rockhack Linux - Hardware 2 03-30-2010 12:52 AM
Errors on tomcat Server startup and shutdown log tanveer Linux - Server 3 07-16-2008 01:07 AM
How to make Tomcat 4.0.1 and Tomcat 5.0.28 coexist in one server? g18397 Linux - Software 0 05-16-2006 03:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration