#1 2016-12-03 12:16:43

Bo
Member
From: Melbourne
Registered: 2016-07-04
Posts: 57
Website

Could not run Websocket Sample 31: Simple Echo Server

Hi,

I am trying to run the sample "Project31SimpleEchoServer", but it seems not working.

Loaded the html, got following in the text area:

WebSocket - status 0
onerror - code:undefined, reason:undefined, wasClean:undefined, status:3
onclose - code:1006, reason:, wasClean:false, status:3


Checked it in the Developer Tools, got following error:

Project31SimpleEchoServer.html:18 WebSocket connection to 'ws://desktop-emq701g/' failed: HTTP Authentication failed; no valid credentials available
init @ Project31SimpleEchoServer.html:18
onload @ Project31SimpleEchoServer.html:72

What do I need to config to be able to run this sample? I did not see other people here reported this.

Last edited by Bo (2016-12-03 13:39:29)

Offline

#2 2016-12-03 13:41:44

Bo
Member
From: Melbourne
Registered: 2016-07-04
Posts: 57
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

Tried another machine, did work.

So the problem could be the machine's environment, but what could affect a websocket server? As the browser is working with other websocket echo server.

Offline

#3 2016-12-04 10:39:35

Bo
Member
From: Melbourne
Registered: 2016-07-04
Posts: 57
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

Followed this link (http://cjihrig.com/blog/websockets-in-n … windows-7/) and created a websocket echo server by using Nodejs, it worked with the test html, so it looks like the Synopse sample echo server has something wrong, anybody else has encountered this before?

Offline

#4 2016-12-04 15:36:07

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,667
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

Usually, this is a port issue.
The port you expect to bind is already used by some service or program.

Offline

#5 2016-12-05 05:54:52

Bo
Member
From: Melbourne
Registered: 2016-07-04
Posts: 57
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

ab wrote:

Usually, this is a port issue.
The port you expect to bind is already used by some service or program.

but I believe this is not the case for me as I created the NodeJS echo server on the same port, if I forgot to stop NodeJS one, the sample echo server could not started until I closed the NodeJS one.

Offline

#6 2016-12-05 13:29:23

Junior/RO
Member
Registered: 2011-05-13
Posts: 210

Re: Could not run Websocket Sample 31: Simple Echo Server

In my case, was Skype using port 80.

Offline

#7 2016-12-10 13:06:50

Bo
Member
From: Melbourne
Registered: 2016-07-04
Posts: 57
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

Here is another issue:

I ran the echo server on a Windows Server 2003 R2 Standard Edition, and ran the test html in both Chrome and Edge, got different result:
Chrome: could not connect at all.
Edge: the server reported it was connected, but not the browser, and then the connection dropped automatically after a while.

What can I check why the echo server cannot be connected? And why the behavior are different between Chrome and Edge?

Offline

#8 2016-12-10 13:31:17

Bo
Member
From: Melbourne
Registered: 2016-07-04
Posts: 57
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

Another test case:
Running echo server on Windows 10, running browser locally, both Chrome and Edge are failed to connect, but IE can connect and gets echos.

Does Synopse Websocket only support IE?

Offline

#9 2016-12-10 15:40:39

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: Could not run Websocket Sample 31: Simple Echo Server

You must specify a protocol (a 2nd optional parameter for browser side WebSocket connection). Mormot implementation not work wo protocol

Offline

Board footer

Powered by FluxBB