gpt4 book ai didi

tomcat - Grails 应用程序无法在 Tomcat7 中启动 - 无法从日志中获取任何有用的信息?

转载 作者:行者123 更新时间:2023-11-28 23:56:22 27 4
gpt4 key购买 nike

我将 grails 2 应用程序部署到 tomcat7 中,但它就是无法启动。我尝试了很多方法来从 catalina.out 或我的应用程序日志中获取任何信息,但我得到的只是

Jul 30, 2012 5:47:40 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.28
Jul 30, 2012 5:47:40 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/manager.xml
Jul 30, 2012 5:47:41 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /etc/tomcat7/Catalina/localhost/host-manager.xml
Jul 30, 2012 5:47:41 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war
Jul 30, 2012 5:47:41 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jul 30, 2012 5:47:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
Jul 30, 2012 5:47:49 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
Jul 30, 2012 5:47:49 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-127.0.0.1-8081"]
Jul 30, 2012 5:47:49 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 8372 ms

我已经将 logging.properties 放入/var/lib/tomcat/webapps/myApp/WEB-INF/classes 中包含

org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = java.util.logging.ConsoleHandler

但这也没有给我任何更多信息。

此外,我将 grails 应用程序的日志级别更改为调试,但也没有出现错误。目前我不知道如何从 tomcat 或应用程序中获取任何有用的信息,帮助我找到错误:(

干杯,

莫里茨

更新:

对于我尝试运行的环境,我的 Config.groovy 看起来像这样:

staging {
def logDirectory = "/var/log/myApp"

log4j = {
appenders {
rollingFile name: 'stacktrace', file: "${logDirectory}/stacktrace.log".toString(), maxFileSize: '10MB'
rollingFile name: 'myLog', file: "${logDirectory}/myApp_debug.log".toString(), maxFileSize: '10MB'
}

root {
// change the root logger to myLog file
debug 'myLog'
}

debug 'grails.app'
debug 'org.codehaus.groovy.grails.commons' // Core artifact information such as class loading etc.
debug 'org.codehaus.groovy.grails.web' //Grails web request processing
debug 'org.codehaus.groovy.grails.web.mapping' // URL mapping debugging
debug 'org.codehaus.groovy.grails.plugins' // Log plugin activity
warn 'grails.spring' // See what Spring beans Grails and plugins are defining
debug 'org.springframework' // See what Spring is doing
debug 'org.hibernate' // See what Hibernate is doing
debug 'org.codehaus.groovy.grails.web.servlet' // controllers
debug 'org.codehaus.groovy.grails.web.pages' // GSP
info 'org.apache.catalina' // tomcat

// set level for my messages; this uses the root logger (and thus the tomcatLog file)
debug 'myApp_debug.log'
}

grails.serverURL = "someUrl"
}

最佳答案

查看所有日志文件 - catalina.out 中很少有真正的问题。 logs/localhost.2012-07-30.log 和 stacktrace.log 是您最好的选择。

关于tomcat - Grails 应用程序无法在 Tomcat7 中启动 - 无法从日志中获取任何有用的信息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11725057/

27 4 0