[jetty-user] Work-around for websockets under Ubuntu

Chris Haynes <[email protected]>
Newsgroups gmane.comp.java.jetty.support
Message-ID <1296389434.17126.19.camel@nangpa>
Just a note to anyone attempting to test Jetty's WebSockets under Ubuntu
10.04 with client and server running on the same machine.

It seems that you cannot use 'localhost' or its numeric equivalents
under (only?) this version of Ubuntu - Jetty (and a JS-based  webSocket
server I tried in desperation) don't receive the connection request.

In the client you have to use the 'real' address of the machine (as
shown by 'ifconfig') and, to circumvent Jetty's block against testing
from what now appears to it to to be a  'remote' machine you have to
call the test page directly; in my case: http://192.168.0.3:8080/ws/

If anyone knows why Ubuntu is being so uncooperative and how to get it
to play nicely, please do let us know; this has taken me 8 hours to work
around.

In case it is relevant, I am using Chrome 5.0.342.9 beta
.
The hint which gave me the solution was posted by bradleym06 here:
http://code.google.com/p/chromium/issues/detail?id=35101

Chris Haynes

[PS:  I followed the Jetty instructions:"You can disable the remote
address checking by editing contexts/test.d/override-web.xml and
changing the "remote" init parameter to true for the TestFilter" - but
still the test seemed blocked if trying to navigate to the test from
http://192.168.0.3:8080/  . Using the direct test URL '/ws' as above
seemed to circumvent the block].




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.