Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websockets test not working at all #49

Open
pablochacin opened this issue Jul 4, 2012 · 9 comments
Open

websockets test not working at all #49

pablochacin opened this issue Jul 4, 2012 · 9 comments

Comments

@pablochacin
Copy link

When testing the webdis build of "Jul 1 22:41:04 2012" with Redis 2.5.11 on Ubuntu 11.04 I've found that the websockets tests doesn't work at all.

Running the websocket test gives this result:

$> ./websocket  -v
ret=0
ret=0
ret=0
ret=0
No message was read.

Opening the websocket.html page shows the "loading" message but nothing happens.

Other tests work fine, so I don't believe it has to do with redis itself and, to the extend of what I understand of webdis, the websocket in a fully webdis side mechanism, which doesn't rely on any redis support.

Regards

Pablo

@nicolasff
Copy link
Owner

Hello Pablo,

Thanks for reporting this; I'm closing it as a duplicate of #49, let's keep the conversation there.

Regards,

Nicolas

@pablochacin
Copy link
Author

Hi Nocolas

This issue you closed is the #49. Which one does it duplicate?

Pablo

On 07/06/2012 12:17 AM, Nicolas Favre-Felix wrote:

Hello Pablo,

Thanks for reporting this; I'm closing it as a duplicate of #49, let's keep the conversation there.

Regards,

Nicolas


Reply to this email directly or view it on GitHub:
#49 (comment)

@nicolasff
Copy link
Owner

@pchacin oops, that was #50. Reopening this one.

@PhE
Copy link

PhE commented Jul 6, 2012

What is the expected output of ./websocket -v ?
When I run, it hangs without displaying anything :

$ ./websocket -v

When I run, it without webdis I get :

$ ./websocket -v
connect: ret=-1: Connection refused
connect: ret=-1: Connection refused
connect: ret=-1: Connection refused
connect: ret=-1: Connection refused
No message was read.

When I shut down webdis while it is running I get :

$ ./websocket -v
ret=0
ret=0
ret=0
ret=0

When I shut down redis while it is running I get :

$ ./websocket -v
ret=-1
ret=-1
ret=-1
ret=-1
No message was read.

@PhE
Copy link

PhE commented Sep 11, 2012

websocket not working is turning to a big issue for me :-/
We have to use an old Chrome version (18) on windows to make it work and it is not easy to get on old Chrome version installer.
On Linux this is even worth : there is no way to get on old Chrome version on a recent distribution.
Is there any plan to make the websocket feature work again ?

@RichardJohnn
Copy link

does this just not work at the moment? that would explain it!
./websocket -v just hangs whether i close redis before or after or leave it running.. and if i publish something..going to the site says it cannot connect to ws://whathaveyou:7379

please give a heads up if i can see this work!! thank you i dig this concept

@RichardJohnn
Copy link

whoa! if i just run webdis instead of the websocket program, the websocket.html page loads everything up fine. (i did set websockets to true in the .json)
this is using Chromium Version 20.0.1132.47 and Firefox 16.0.1

I think you should remove the websocket program, unless I just dont understand what its for.. it lead to two afternoons of confusion, hoho!

@b1c9g76
Copy link

b1c9g76 commented Nov 12, 2012

(NB: Newbie here)

Similar to this, I modified the test to issue a SUBSCRIBE and I get back a subscribe reply as expected and then the websocket closes straight away. I was expecting it to stay up similarly to issuing the same SUBSCRIBE through a webbrowser where it stays open and recieves data as PUBLISH commands are issued.

What am I missing?

var jsonSocket = new WebSocket("ws://127.0.0.1:7379/.json");
jsonSocket.onopen = function() {
console.log("JSON socket connected!");
jsonSocket.send(JSON.stringify(["SUBSCRIBE", "test"]));
};
jsonSocket.onmessage = function(messageEvent) {
console.log("JSON received:", messageEvent.data);
};
jsonSocket.onclose = function() {
console.log("JSON closed");
};

Console output:

JSON socket connected! test.html:55
JSON received: {"SUBSCRIBE":["subscribe","test",1]} test.html:60
JSON closed

@konklone
Copy link

Does commit 2cfc27d fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants