HTTP错误:503当我在本地运行app-engine时

时间:2016-10-01 10:39:37

标签: java google-app-engine web-development-server

我尝试在本地使用app引擎调试我的java servlet:

/opt/appengine-java-sdk-1.9.42/bin/dev_appserver.sh -p 8090 /Users/me/proj/src/main/webapp

我看到了:

Oct 01, 2016 9:26:27 AM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Started SelectChannelConnector@127.0.0.1:8090
Oct 01, 2016 9:26:27 AM com.google.appengine.tools.development.AbstractModule startup
INFO: Module instance default is running at http://localhost:8090/
Oct 01, 2016 9:26:27 AM com.google.appengine.tools.development.AbstractModule startup
INFO: The admin console is running at http://localhost:8090/_ah/admin
Oct 01, 2016 12:26:27 PM com.google.appengine.tools.development.DevAppServerImpl doStart
INFO: Dev App Server is now running

我导航到http://localhost:8090/demo

但得到此错误:

HTTP ERROR: 503

Problem accessing /demo. Reason:

    SERVICE_UNAVAILABLE
Powered by Jetty://

这是我的web.xml:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE web-app PUBLIC
 "-//Oracle Corporation//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
    <servlet>
        <servlet-name>demo</servlet-name>
        <servlet-class>myapp.DemoServlet</servlet-class>
    </servlet>

    <servlet>
        <servlet-name>check</servlet-name>
        <servlet-class>myapp.CheckServlet</servlet-class>
    </servlet>


    <servlet-mapping>
        <servlet-name>demo</servlet-name>
        <url-pattern>/demo</url-pattern>
    </servlet-mapping>

    <servlet-mapping>
        <servlet-name>check</servlet-name>
        <url-pattern>/check</url-pattern>
    </servlet-mapping>

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app>

1 个答案:

答案 0 :(得分:0)

我以前也遇到过同样的问题。我发现,如果您的服务器试图在目录中查找不存在的文件,则可能会发生此错误。完成console.log()并浏览目录30分钟后,我只是删除了项目,然后将github存储库再次克隆到了我的计算机上。然后,localhost:8080重新开始正常工作。