Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just set up me web app on top of ElasticBeanstalk. Everything seemed to work fine, until I discovered that my instance couldn't use WebSocket, every time I tried to connect internal server error code was retured.

When I checked the logs, I found NullPointerException which is highly unlikely caused by me. Here's stacktrace:

Aug 27, 2013 5:01:18 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [WebSocketChannel] in context with path [] threw exception
    at org.apache.catalina.websocket.WebSocketServlet.getWebSocketAccept(
    at org.apache.catalina.websocket.WebSocketServlet.doGet(
    at javax.servlet.http.HttpServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
    at org.apache.catalina.core.StandardWrapperValve.invoke(
    at org.apache.catalina.core.StandardContextValve.invoke(
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
    at org.apache.catalina.core.StandardHostValve.invoke(
    at org.apache.catalina.valves.ErrorReportValve.invoke(
    at org.apache.catalina.valves.RemoteIpValve.invoke(
    at org.apache.catalina.valves.AccessLogValve.invoke(
    at org.apache.catalina.core.StandardEngineValve.invoke(
    at org.apache.catalina.connector.CoyoteAdapter.service(
    at org.apache.coyote.http11.AbstractHttp11Processor.process(
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
    at java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.util.concurrent.ThreadPoolExecutor$

My instance is running version 7.0.27. When I checked the source code of tomcat to see the source of problem I couldn't understand a thing.

Any ideas what seems to be causing the problem? Does WebSockets not work with ElasticBeanstalk and Apache Tomcat?

share|improve this question
Have a look at… - it may be the solution you need. – Kevin Dec 3 '13 at 19:12

Websockets requires tomcat 7.0.47 or 8, also be sure you have JRE 7 one more thing check that your ELB configured at TCP/SSL level instead of HTTP/HTTPS

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.