Meteor, WebSocket, Nginx 502 Error Meteor, WebSocket, Nginx 502 Error nginx nginx

Meteor, WebSocket, Nginx 502 Error


Are you sure the issue is really coming from NGINX and websocket?

  • First you can try wcat as a websocket CLI to ensure if the websockets are working
  • You can also try to run the app in a console or look at the log (debug / verbose at max level) to see if there is not an underlying error


As per your question edit, CFS uses an HTTP transport as the underlying data transfer layer.

Unfortunately, depending on how you get CFS into your stack, you might end up with an old and buggy version of its dependencies, namely cfs:http-methods, which sometimes tries to end an already ended response, which then translates itself as a cryptic error message.

Fortunately, the bug has been resolved version 0.0.30 onwards and to ensure that Meteor loads that version as the minimum dependency, all you need to do is edit you .meteor/packages file and add the following:

cfs:http-methods@0.0.30

Which will ensure any version that is equal or greater than 0.0.30, which as of this moment, is the latest on Atmosphere (meteor's package server).