Setting up a websocket capable application on an azure ubuntu vm

Okay, so I have created an ubuntu vm in the azure cloud, I have successfully launched nodejs, redis, socket.io, Express and all the components for a game I am writing.

I have setup azure endpoints on internal and external port 8080, and use app.listen(8080) in my js code.

When I browser to http://< app-name >.cloudapp.net:8080/ I can view the result of my nodejs application fine, it displays the html, css etc.

However when it attempts to start a socket connection (using socket.io) I get only this (on my chrome dev console under websockets):

HeadersPreviewResponseWebSocket Frames
Request URL:ws://<app-name>.cloudapp.net:8080/socket.io/1/websocket/13510496541533398587
Request Method:GET
Status Code:101 Switching Protocols
Request Headersview source
Connection:Upgrade
Host:<app-name>.cloudapp.net:8080
Origin:http://<app-name>.cloudapp.net:8080
Sec-WebSocket-Extensions:x-webkit-deflate-frame
Sec-WebSocket-Key:y5vueHE66phl70gle7KCtw==
Sec-WebSocket-Version:13
Upgrade:websocket
(Key3):00:00:00:00:00:00:00:00
Response Headersview source
Connection:Upgrade
Sec-WebSocket-Accept:dn+2lA6sMIXHLEmDS/Q4j/IIwxI=
Upgrade:websocket
(Challenge Response):00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00

It will also crash the nodejs app on azure when i try send anything using socket.emit() on the client (browser); in my azure ssh, it just says 'DEBUG: Program node app.js exited with code null' which isn't particularly helpful.

So it obviously isn't connecting properly? I have also tried in my nodejs listening on port 80, but then I don't even get the standard webpage (html,css,etc).

From what I have read online, it is very possible to get sockets working providing your not using the web role (which I assume the vm is not).

Any idea how I can get this to work? (and preferably on port 80)?

Edit: starting to wonder if this has nothing todo with sockets, realized I get the same switching protocol message, on my home vm (where it is working). Spin off question: How can I view crash details for a nodejs program on a ubunu azure vm?

There is a time out of around 60s on the Windows Azure loadbalancer.

Does it work if you send a message back to the client just after the websocket connection is established?

If it is the case you will have to implement some keep a live message send every minutes.