AWS ELB:加载资源失败:服务器响应状态为 503(服务不可用:后端服务器已满)
AWS ELB: Failed to load resource: the server responded with a status of 503 (Service Unavailable: Back-end server is at capacity)
我的 cloudformation 堆栈部署成功。我正在尝试在 EC2 上部署一个 clojure ring 应用程序。
当我在 my-app.us-west-1.elb.amazonaws.com
访问我的弹性负载平衡端点时,我得到Failed to load resource: the server responded with a status of 503 (Service Unavailable: Back-end server is at capacity)
我通过 sshing 进入 ec2 和 运行 ps -afx
确认 tomcat 是 运行
那么这里可能是什么问题?
更新:好的,所以向 localhost:8080 returns HTTP 500
发出 curl 请求
SEVERE: Servlet.service() for servlet [clj-west.system/servlet-handler servlet] in context with path [] threw exception
java.lang.NullPointerException: Handler returned nil
at ring.util.servlet$make_service_method$fn__52.invoke(servlet.clj:127)
at clj_west.servlet$_service.invoke(servlet.clj:1)
at clj_west.servlet.service(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
基于评论的讨论。该问题已通过更新 ELB 上的健康检查得到解决。
我的 cloudformation 堆栈部署成功。我正在尝试在 EC2 上部署一个 clojure ring 应用程序。
当我在 my-app.us-west-1.elb.amazonaws.com
访问我的弹性负载平衡端点时,我得到Failed to load resource: the server responded with a status of 503 (Service Unavailable: Back-end server is at capacity)
我通过 sshing 进入 ec2 和 运行 ps -afx
那么这里可能是什么问题?
更新:好的,所以向 localhost:8080 returns HTTP 500
发出 curl 请求SEVERE: Servlet.service() for servlet [clj-west.system/servlet-handler servlet] in context with path [] threw exception
java.lang.NullPointerException: Handler returned nil
at ring.util.servlet$make_service_method$fn__52.invoke(servlet.clj:127)
at clj_west.servlet$_service.invoke(servlet.clj:1)
at clj_west.servlet.service(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
基于评论的讨论。该问题已通过更新 ELB 上的健康检查得到解决。