1.今天我想把tomcat中以前部署的一些项目删除,结果tomcat一直启动不了,可能哪里相关配置的原因,可以想不通会有这样的问题。后来直接加入一个小项目helloworld,改成webtest项目后,tomcat就启动了,好吧!我觉得是不是因为jenkins配置了webtest,又把webtest部署到这个tomcat上的原因,导致直接删除,tomcat找不到文件不能启动。有谁能提供更好的解答吗?
2.输入网址,端口,虽然到了tomcat页面,但是里面的web应用都已经不能正常访问
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException:../appLogs/cfWeb_info.log (Permission denied)
atjava.io.FileOutputStream.open(Native Method)
atjava.io.FileOutputStream.<init>(FileOutputStream.java:212)
atjava.io.FileOutputStream.<init>(FileOutputStream.java:136)
atorg.apache.log4j.FileAppender.setFile(FileAppender.java:294)
atorg.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
atorg.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
atorg.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
atorg.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
atorg.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
atorg.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
atorg.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
atorg.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
atorg.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
atorg.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
atorg.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526)
atorg.apache.log4j.LogManager.<clinit>(LogManager.java:127)
atorg.apache.log4j.Logger.getLogger(Logger.java:104)
atorg.jboss.resteasy.logging.impl.Log4jLogger.<init>(Log4jLogger.java:19)
atsun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
atsun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
atsun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
atjava.lang.reflect.Constructor.newInstance(Constructor.java:525)
atorg.jboss.resteasy.logging.Logger.getLogger(Logger.java:92)
atorg.jboss.resteasy.spi.ResteasyDeployment.<clinit>(ResteasyDeployment.java:75)
atorg.jboss.resteasy.plugins.server.servlet.ConfigurationBootstrap.<init>(ConfigurationBootstrap.java:28)
atorg.jboss.resteasy.plugins.server.servlet.ListenerBootstrap.<init>(ListenerBootstrap.java:27)
atorg.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap.contextInitialized(ResteasyBootstrap.java:26)
atorg.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
atorg.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
atorg.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
atorg.apache.catalina.core.StandardHost.start(StandardHost.java:840)
atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
atorg.apache.catalina.core.StandardService.start(StandardService.java:525)
atorg.apache.catalina.core.StandardServer.start(StandardServer.java:754)
atorg.apache.catalina.startup.Catalina.start(Catalina.java:595)
atsun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
atjava.lang.reflect.Method.invoke(Method.java:601)
atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
log4j:ERROR Either File or DatePatternoptions are not set for appender [infoLog].
INFO[main] (ContextLoader.java:273) 15:31:15,552 -- Root WebApplicationContext:initialization started
INFO[main] (AbstractApplicationContext.java:510) 15:31:15,637 -- Refreshing RootWebApplicationContext: startup date [Thu Sep 25 15:31:15 CST ]; root ofcontext hierarchy
INFO[main] (XmlBeanDefinitionReader.java:315) 15:31:15,687 -- Loading XML beandefinitions from class path resource [applicationContext.xml]
INFO[main] (XmlBeanDefinitionReader.java:315) 15:31:15,720 -- Loading XML beandefinitions from class path resource [app-biz.xml]
INFO[main] (ClassPathScanningCandidateComponentProvider.java:222) 15:31:15,768 --JSR-250 'javax.annotation.ManagedBean' found and supported for componentscanning
INFO[main] (XmlBeanDefinitionReader.java:315) 15:31:15,962 -- Loading XML beandefinitions from class path resource [app-data.xml]
INFO[main] (DefaultListableBeanFactory.java:596) 15:31:16,209 -- Pre-instantiatingsingletons inorg.springframework.beans.factory.support.DefaultListableBeanFactory@64237b68:defining beans[buildPackManagement,domainManagement,routeManagement,orgManagement,userManagement,spaceManagement,loginHandler,connectCF,cloudUtil,keepCennection,logConfigService,buildPackService,patterService,templateManagement,logManagement,serviceManagement,appManagement,basicInfo,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,propertyConfigurer,dataSource,sqlSessionFactory,org.mybatis.spring.mapper.MapperScannerConfigurer#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,appLogConfigMapper,cfServiceBrokerMapper,temSerMapper,patternFieldMapper,cfAppMapper,cfTargetMapper,appTemplateMapper,cfEnvironmentMapper,authUserMapper,cfServiceMapper,appLogPatternsMapper,logPatternMapper,cfUserMapper];root of factory hierarchy
INFO[main] (MLog.java:80) 15:31:16,283 -- MLog clients using log4j logging.
INFO[main] (C3P0Registry.java:204) 15:31:16,324 -- Initializing c3p0-0.9.1.1 [built15-March- 01:32:31; debug? true; trace: 10]
问题是该文件在该路径下,而且出现一个permission denied错误,所以找到该文件后修改权限
chmod 666 ××××,但是还是不能启动tomcat。无可奈何,在webapp中删除该应用,然后让jenkins构建项目,部署过去,正常使用,jenkins持续部署,没有问题。现在猜想是不是这样一个原因,是不是某一次提交的代码有问题,导致tomcat出故障,jenkins部署连接时有问题,后续的构建一直失败!有谁还可以提供这错误原因得大致分析吗?
谢谢
如果觉得《14-9-25日jenkins部署到tomcat的错误日志》对你有帮助,请点赞、收藏,并留下你的观点哦!