Websocket causes "client sent invalid method."

Hello,

I’m trying setup nginx for socket proxy. I was able to find that nginx
can
be configured to proxy websockets and added an error log file in the
server
configuration block to isolate the messages, and I get:

client sent invalid method while reading client request line, client:
XX.XX.XX.1, server: , request: ҁb▒▒"

in the access logs I see:

XX.XX.XX.1 - - [30/Jun/2015:17:39:15 -0400]
“\x00\x08\x1B\x19\x94\xD2\x81b\xBD\xF3” 400 172 “-” “-” “-”

The software that is I need to proxy is a remote assistant application
with
a web servlet running inside tomcat and with two client applications,
one
admin and one user, that connect to the server and communicate.

Is there anything that can be done to make it work?

Thank you in advance.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,260007,260007#msg-260007

Hello!

On Tue, Jun 30, 2015 at 11:08:36PM -0400, snagytx wrote:

XX.XX.XX.1 - - [30/Jun/2015:17:39:15 -0400]
“\x00\x08\x1B\x19\x94\xD2\x81b\xBD\xF3” 400 172 “-” “-” “-”

The software that is I need to proxy is a remote assistant application with
a web servlet running inside tomcat and with two client applications, one
admin and one user, that connect to the server and communicate.

Is there anything that can be done to make it work?

The “websocket proxy” is something completely different from what
you are looking for. It’s to proxy the Websocket protocol
connections - that is, to proxy HTTP/1.1 requests with protocol
upgrade.

To proxy arbitrary stream sockets, use the stream module. See
here for details:

http://nginx.org/en/docs/stream/ngx_stream_core_module.html

Note that it’s only available in nginx 1.9.x.


Maxim D.
http://nginx.org/

Thank you. As a temporary solution I used port-forwarding at the
firewall
level, it doesn’t do load balancing but I don’t need it for now.

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,260007,260083#msg-260083

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs