artsrun-gasparyan / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
0 stars 0 forks source link

Client cannot connect from Google Chrome Browser when using HelloWorld web page #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download jWebSocket-server-1.0-nb-20105
2. Unzip it on Mac OS Leopard running JDK 
3. start ./jWebSocketServer.sh

Client cannot connect from Google Chrome Browser when using HelloWorld web page

Log reported onat the server side :

2012-03-12 17:55:30,382 DEBUG - TCPEngine$EngineListener: Client trying to 
connect on port #62104...
2012-03-12 17:55:30,565 DEBUG - TCPEngine: Parsing handshake request: GET 
/jWebSocket/jWebSocket HTTP/1.1\nUpgrade: websocket\nConnection: Upgrade\nHost: 
127.0.0.1:8787\nOrigin: null\nSec-WebSocket-Protocol: 
org.jwebsocket.json\nSec-WebSocket-Key: 
zq8kT0z20Jcx78WmToCMLQ==\nSec-WebSocket-Version: 13\n\n
2012-03-12 17:55:30,565 ERROR - EngineUtils: Client origin 'null' does not 
match allowed domains.
2012-03-12 17:55:30,566 ERROR - TCPEngine$EngineListener: Client not accepted 
on port 62104 due to handshake issues

and at the client side

Connecting to ws://127.0.0.1:8787/jWebSocket/jWebSocket and logging in as 
'root'...
Ok
jWebSocket connection closed.

Original issue reported on code.google.com by cmoulli...@fusesource.com on 12 Mar 2012 at 5:01

GoogleCodeExporter commented 9 years ago
Same issue as 147 but on MacBookPro OS Leopard
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11-402-10M3527)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02-402, mixed mode)

workaround --> Define <domain>null</domain> in conf/jWebSocketConf.xml as we 
are opening the index.html page using file:/// url and not http://

Original comment by cmoulli...@fusesource.com on 13 Mar 2012 at 8:45

GoogleCodeExporter commented 9 years ago
For what its worth, I had the same problem on Ubuntu 12.04 + Firefox 15.0.  In 
the jWebSocket-1.0/conf/jWebSocket.xml file I added 127.0.0.1 to the list of 
domains to correct the problem.  

Original comment by sethkell...@gmail.com on 6 Sep 2012 at 9:00