-
Notifications
You must be signed in to change notification settings - Fork 39
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
Client concurrences connect but do not send messages #3
Comments
Hmm. Running on the master branch, it seems okay for me. What's in the java client's logs? It looks like this for me
|
Hmm, I'm running: c:\workspace\socket.io-benchmarking\client\src>java -cp .;WebSocket.jar;commons-math-2.2.jar SocketIOLoadTester 100 SocketIOLoadTesterUsing custom concurrency levels: 100 But the clients are all showing as connected on the server so I would expect to see the "All 100 clients connected successfully." message. I'll add so more println's and find out whats going on. Thanks for your help! |
Yeah, presumably it's not getting the right callback on connections. It needs onOpen to fire on each SocketIOClient before they'll start sending. This is a stupid OS-X centrist thing to say, but there may be something with windows that's weird. I've never really done windows dev in a serious way. Also, for what it's worth, I run it via Eclipse with no arguments and let it default to its internal concurrencyLevels list. I honestly haven't tested the argument-based startup so you may have more luck running without arguments. |
Ok. So the client connections are all created and then all the threads hit wait(). This is odd seeing as the connection is registered as open on the server. Opening wireshark shows me that the node.js socket.io server is not sending a response to the WebSocket handshake started by the Java client: GET /socket.io/1/websocket/2157041091073822846 HTTP/1.1 Not sure if socket.io actually supports WebSocket-Version: 8 |
Ah, figured out how to turn on logging by changing: io.set("log level", 3); I'm getting the message: 26 Jan 12:27:57 - info: users: 0 messagesPerSecond: 0 So the request is missing: sec-websocket-key This is probably a bug in the request logic in Java-WebSocket library. Ill raise it with them. |
It might well be, although it must be something platform-specific because everything looks good on my end. Maybe some sort of line termination issue in the requests? It's worked for me with every combination of OS X + Ubuntu as client and server, but I don't have a windows machine handy. |
Ah, ok so its an issue with the draft that the client is using which is unsupported by socket.IO. Adding: import net.tootallnate.websocket.drafts.Draft_17;
To SocketIOClient.java fixes this |
My server logs:
25 Jan 16:37:26 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:27 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:28 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:29 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:30 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:31 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:32 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:33 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:34 - info: users: 102 messagesPerSecond: 0
25 Jan 16:37:35 - info: users: 102 messagesPerSecond: 0
For 100 concurrences (they dont seem to close properly but I don't mind restarting). But it doesn't appear to be sending anything. Do I need to do something on the client in order to get it to send messages?
The text was updated successfully, but these errors were encountered: