码迷,mamicode.com
首页 > 其他好文 > 详细

jboss每天自动增加的日志突然间不写了?

时间:2015-08-20 19:16:35      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:

第一步是检查:磁盘空间是否不足,第二步是检查jboss里面的jboss-log4j.xml配置信息是否有更改

这个是jboss里面jboss-log4j.xml的详细配置信息:http://my.oschina.net/liangbo/blog/215593

都不是,然后通过翻阅最后一次日志得到的信息如下:

2015-05-19 12:55:53,293 INFO  [org.jboss.bootstrap.microcontainer.ServerImpl] (JBoss Shutdown Hook) Runtime shutdown hook called, forceHalt: true
2015-05-19 12:55:53,293 INFO  [org.apache.coyote.http11.Http11Protocol] (JBoss Shutdown Hook) Pausing Coyote HTTP/1.1 on http-0.0.0.0-8088
2015-05-19 12:55:53,309 INFO  [org.apache.coyote.http11.Http11Protocol] (JBoss Shutdown Hook) Stopping Coyote HTTP/1.1 on http-0.0.0.0-8088
2015-05-19 12:55:53,309 INFO  [org.apache.coyote.ajp.AjpProtocol] (JBoss Shutdown Hook) Pausing Coyote AJP/1.3 on ajp-127.0.0.1-8009
2015-05-19 12:55:53,309 INFO  [org.apache.coyote.ajp.AjpProtocol] (JBoss Shutdown Hook) Stopping Coyote AJP/1.3 on ajp-127.0.0.1-8009
2015-05-19 12:55:53,324 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (JBoss Shutdown Hook) org.jboss.jms.server.connectionfactory.ConnectionFactory@1be1aa0 undeployed
2015-05-19 12:55:53,324 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (JBoss Shutdown Hook) org.jboss.jms.server.connectionfactory.ConnectionFactory@1ff3565 undeployed
2015-05-19 12:55:53,324 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (JBoss Shutdown Hook) org.jboss.jms.server.connectionfactory.ConnectionFactory@167e4ea undeployed
2015-05-19 12:55:53,340 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/web-console
2015-05-19 12:55:53,355 INFO  [org.jboss.jms.server.destination.QueueService] (JBoss Shutdown Hook) Queue[/queue/ExpiryQueue] stopped
2015-05-19 12:55:53,355 INFO  [org.jboss.jms.server.destination.QueueService] (JBoss Shutdown Hook) Queue[/queue/DLQ] stopped
2015-05-19 12:55:53,371 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (JBoss Shutdown Hook) Stopping jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
2015-05-19 12:55:53,434 INFO  [org.jboss.ejb3.EJBContainer] (JBoss Shutdown Hook) STOPPED EJB: org.jboss.profileservice.ejb.SecureProfileServiceBean ejbName: SecureProfileService
2015-05-19 12:55:53,496 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (JBoss Shutdown Hook) Stopping jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
2015-05-19 12:55:53,527 INFO  [org.jboss.ejb3.EJBContainer] (JBoss Shutdown Hook) STOPPED EJB: org.jboss.profileservice.ejb.SecureDeploymentManager ejbName: SecureDeploymentManager
2015-05-19 12:55:53,605 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (JBoss Shutdown Hook) Stopping jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
2015-05-19 12:55:53,605 INFO  [org.jboss.ejb3.EJBContainer] (JBoss Shutdown Hook) STOPPED EJB: org.jboss.profileservice.ejb.SecureManagementView ejbName: SecureManagementView
2015-05-19 12:55:53,652 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager ‘jboss.jca:service=ConnectionFactoryBinding,name=JmsXA‘ from JNDI name ‘java:JmsXA‘
2015-05-19 12:55:53,746 INFO  [org.jboss.jms.server.ServerPeer] (JBoss Shutdown Hook) JMS ServerPeer[0] stopped
2015-05-19 12:55:53,762 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/invoker
2015-05-19 12:55:53,793 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/jbossws
2015-05-19 12:55:53,809 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/admin-console
2015-05-19 12:55:53,809 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/
2015-05-19 12:55:53,809 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/egret-server
2015-05-19 12:55:53,840 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/egret-server]] (JBoss Shutdown Hook) Closing Spring root WebApplicationContext
2015-05-19 12:55:53,840 INFO  [org.springframework.web.context.support.XmlWebApplicationContext] (JBoss Shutdown Hook) Closing Root WebApplicationContext: startup date [Tue May 19 12:50:14 CST 2015]; root of context hierarchy
2015-05-19 12:55:53,918 INFO  [org.springframework.beans.factory.support.DefaultListableBeanFactory] (JBoss Shutdown Hook) Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@13cfb7a: defining beans [reader,sessionFactory,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,transactionManager,txAdvice,org.springframework.aop.config.internalAutoProxyCreator,pointcutMethod,org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0,dataSource,jdbcTemplate,newTransManager,baseDAO,vitalsignDAO,docFormTemplateDAO,DocPatientFormDAO,inOutRecordDAO,dataDictDAO,docMenuDAO,docReportDAO,printLogDAO,nursingCheckedAndEvaluatedDao,wardReportDAO,vitalsignManager,docFormTemplateManager,docPatientFormManager,inOutRecordManager,dataDictManager,docMenuManager,specialDataDictManager,docReportManager,printLogManager,hisInterface,nursingCheckedAndEvaluatedManager,weekSchemaManager,zhikongErrorEvaluateManager,basicOperationArrangementManager,LearnCheckWardDiscussManager,wardReportManager,inpAccidentManager]; root of factory hierarchy
2015-05-19 12:55:53,918 INFO  [org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean] (JBoss Shutdown Hook) Closing Hibernate SessionFactory
2015-05-19 12:55:53,918 INFO  [org.hibernate.impl.SessionFactoryImpl] (JBoss Shutdown Hook) closing
2015-05-19 12:55:53,918 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/jmx-console
2015-05-19 12:55:53,934 INFO  [org.apache.catalina.core.StandardService] (JBoss Shutdown Hook) Stopping service jboss.web
2015-05-19 12:55:54,012 INFO  [org.jboss.mail.MailService] (JBoss Shutdown Hook) Mail service ‘java:/Mail‘ removed from JNDI
2015-05-19 12:55:54,090 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=WuHanEHisDS‘ from JNDI name ‘java:WuHanEHisDS‘
2015-05-19 12:55:54,090 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=WuHanHisDS‘ from JNDI name ‘java:WuHanHisDS‘
2015-05-19 12:55:54,090 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=DefaultDS‘ from JNDI name ‘java:DefaultDS‘
2015-05-19 12:55:54,090 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=WuHanPacsDS‘ from JNDI name ‘java:WuHanPacsDS‘
2015-05-19 12:55:54,105 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (JBoss Shutdown Hook) Unbound ConnectionManager ‘jboss.jca:service=DataSourceBinding,name=WuHanDHisDS‘ from JNDI name ‘java:WuHanDHisDS‘
2015-05-19 12:55:54,402 INFO  [org.quartz.core.QuartzScheduler] (JBoss Shutdown Hook) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.
2015-05-19 12:55:54,402 INFO  [org.quartz.core.QuartzScheduler] (JBoss Shutdown Hook) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED paused.
2015-05-19 12:55:54,418 INFO  [org.quartz.core.QuartzScheduler] (JBoss Shutdown Hook) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.
2015-05-19 12:55:54,684 INFO  [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (JBoss Shutdown Hook) Stopping transaction recovery manager
2015-05-19 12:55:54,684 INFO  [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (JBoss Shutdown Hook) Destroying TransactionManagerService
2015-05-19 12:55:54,965 INFO  [org.jboss.jdbc.HypersonicDatabase] (JBoss Shutdown Hook) Database standalone closed clean
2015-05-19 12:55:55,652 INFO  [org.jboss.wsf.framework.management.DefaultEndpointRegistry] (JBoss Shutdown Hook) remove: jboss.ws:context=egret-server,endpoint=EHisWSServlet
2015-05-19 12:55:55,652 INFO  [org.jboss.wsf.framework.management.DefaultEndpointRegistry] (JBoss Shutdown Hook) remove: jboss.ws:context=egret-server,endpoint=EHisVitalSignWSServlet
发现是挂掉了

通过百度搜索Runtime shutdown hook called, forceHalt: true,得到如下结果:

下面内容来源于:http://blog.knowsky.com/264489.htm

最近遇到了几次JBoss无规律自动关闭的奇怪现象,通过history历史命令和last登录信息,都看不到有人操作过的迹象。

后来查了一些资料,JBoss官方论坛给出的几条解释是:
1.JBoss自己没有设置可以自动shutdown的机制;
2.JBoss可以通过web console进行关闭,但我们已经去掉了相关的软件包;
3.JBoss可能接受Ctrl+C或非后台运行的session中断信号而执行shutdown。

后来我查到我们的情况和第3点很类似:

通过日志可以看到JBoss是在06:02:04接到一个关闭请求的。
2011-10-27 06:02:04,086 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (JBoss Shutdown Hook) Runtime shutdown hook called, forceHalt: true
2011-10-27 06:02:05,089 INFO [org.apache.coyote.http11.Http11Protocol] (JBoss Shutdown Hook) Pausing Coyote HTTP/1.1 on http-0.0.0.0-80
2011-10-27 06:02:05,090 INFO [org.apache.coyote.http11.Http11Protocol] (JBoss Shutdown Hook) Stopping Coyote HTTP/1.1 on http-0.0.0.0-80

而jack是在这个时候退出终端的:
jack pts/0 125.69.77.99 Thu Oct 27 05:20 - 06:02 (00:41)

查看history历史记录,之前最后一次启动JBoss是在05:49:20通过执行restart_jboss.sh脚本完成的:
2011-10-27_05:49:20 ./restart_jboss.sh

接着通过find命令在jack的home目录下找到了该restart_jboss.sh脚本。

继续查看了脚本内容,发现在一系列操作之后,最后执行了service jboss start 和 tail -f ./log/server.log 的动作,我怀疑是jack的非正常退出导致了JBoss的关闭,于是在虚拟机上做了测试。
结果证明确实如此,如果在执行了脚本之后直接关闭了客户端窗口,而不是通过exit正常退出的话,JBoss会自动执行shutdown,情况非常容易重现。

但是按道理说,我们是使用的JBoss官方自带的脚本,应该是与apache等其它软件自带的脚本一样让进程以后台服务的方式运行的,不应该接收非后台运行的session中断信号。但经过反复测试后,证明其并非我们想象中那样值得信赖。

因此,我们今后还是最好加上nohup来确保JBoss不会接收session的中断信号:nohup service jboss start。

特此备注,后续进展,在补充!

相关引文:http://dikar.iteye.com/blog/659444

jboss每天自动增加的日志突然间不写了?

标签:

原文地址:http://my.oschina.net/6tao/blog/495147

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!