今天访问以前的网站项目,突然发现无法访问了,并且报错为403.
但是,tomcat自带的项目是能够访问的
tomcat--log
09-Dec-2019 23:40:10.472 SEVERE [http-nio-8081-exec-12] org.apache.catalina.core.StandardHostValve.custom Exception Processing ErrorPage[errorCode=403, location=/WEB-INF/jsp/403.jsp]
org.apache.jasper.JasperException: java.lang.IllegalStateException: No output folder
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:604)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:712)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:384)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:394)
at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:253)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:175)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:853)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: No output folder
at org.apache.jasper.JspCompilationContext.createOutputDir(JspCompilationContext.java:695)
at org.apache.jasper.JspCompilationContext.getOutputDir(JspCompilationContext.java:202)
at org.apache.jasper.JspCompilationContext.getClassFileName(JspCompilationContext.java:543)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:468)
at org.apache.jasper.compiler.Compiler.isOutDated(Compiler.java:434)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:596)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
... 25 more
找了半天原因,想到的可能原因有两个
1、原来数据库的内容被修改过,部分数据可能出现冲突或是不完整
2、tomcat在CentOS上的部分权限不够
之后整理了数据库数据,给tomcat了777的权限
[root@Fleischer local]# ls
aegis cloudmonitor games lib libexec redis share tomcat
bin etc include lib64 nginx sbin src
[root@Fleischer local]# chmod -R 777 tomcat
之后就能够正常运行了,特此记录。