I am trying to deploy a Ruby on Rails application that is served through Thin. The application uses websockets, in particular the websocket-rails library .
It works locally. When you try to deploy it does not work. The websocket server is not a standalone application - Web sites are simply part of the main application server. When my javascript makes a connection to the web server, in my production.log file I see the following:
[2014-11-02T23:38:19.942236 #9154] INFO -- : Started GET "/websocket" for <IP ADDRESS> at 2014-11-02 23:38:19 +0000
There is nothing else related to the websocket request in production.log. In my websocket_rails.log, I see:
[32mConnectionManager^[[0m] Connection opened: #<Connection::b2b0d6b0e3faa4432b0c>
[32mConnectionManager^[[0m] Connection closed: #<Connection::b2b0d6b0e3faa4432b0c>
Showing that the request reached the websocket code, and the connection was closed immediately. In the browser, I see
WebSocket connection to 'ws:/<DOMAIN>/websocket' failed: Error during WebSocket handshake: Unexpected response code: 200
. ? Chrome Inspector /websocket :

, , , . ?
!