WebSocket issues

I like the fact that you guys went to WebSockets in v9 but it did present me with a couple issues.  We go through an nginx proxy (or TC server is actually up in EC2) so I had to make a few config changes there and I thought it was working but I still see some stale data.  I just had a build that I thought was taking a while but when I refreshed my browser window it actually had been done for a while.  So one thing I was wondering, is there any kind of a diagnostic page or is there some kind of a heartbeat that's sent over the socket so I can verify that everything's working correctly?

Thanks,
tim

6 comments
Comment actions Permalink

Hi Tim,

Unfortunately we have not implemented any diagnostics page for WebSockets. Please create feature request in our tracker.
Do you see agent's load icon near the word "Agents" (it disappears if they switched off)?

0
Comment actions Permalink

Hi,

Actually, if you see some stale data, then it's definitely a bug.
If WebSocket doesn't work (misconfigured proxy, old browser or other reason) then TeamCity should fallback to polling automatically.

If you would like to inspect if WebSocket works, you can easily do it in the Chrome dev console (for example, as described here http://blog.kaazing.com/2012/05/09/inspecting-websocket-traffic-with-chrome-developer-tools/)

0
Comment actions Permalink

Thanks for the response.  I'm not seeing it right now because we don't have any agents up right now (as I mentioned, we're in EC2) but I believe I saw it earlier.  How will that tell me if WebSockets are connected though?

One thing I did discover, I can watch the WebSocket frames in the dev tools in Chrome and it appears as though there is a heartbeat.  Every minute I see a message that reads "9|ping#Ping".  And I just left it up for an hour and a half and when I came back I saw pings every minute up to the current minute.  But the fact that a few of us have noticed stale data seems to indicate that there may be something going on somewhere.

0
Comment actions Permalink

Seems that there is some problem - agent load should be visible even if there are no agents. It just should be empty. Most probably, you saw it before you configured nginx, because polling was used.

If you see ping message then WebSocket connection works fine. Could you copy paste here messages from the WebSocket frames just after the page is loaded?

0
Comment actions Permalink

Sure, I see a ws hit to 'ws://teamcity.production.bigcharts.com/app/subscriptions?X-Atmosphere-tracking-id=0&X-Atmosphere-Framework=2.2.5-javascript&X-Atmosphere-Transport=websocket&X-Atmosphere-TrackMessageSize=true&X-atmo-protocol=true&browserLocationHost=http%3A%2F%2Fteamcity.production.bigcharts.com'.

The frames that come in, in order, are:

- 40|775b7550-dc2f-4b16-93bd-e084d0546b7a|0||

- events/o;,events/p;,events/q;,events/w;,events/I;,events/a;p:project12,events/b;p:project12,events/c;p:project12,events/e;p:project12,events/v;p:project12,events/t;p:project12,events/u;p:project12,events/r;p:project12,events/s;p:project12,events/x;p:project12,events/m;p:project12,events/l;p:project12,events/n;p:project12,events/p;p:project12,events/q;p:project12,events/a;p:project5,events/b;p:project5,events/c;p:project5,events/e;p:project5,events/v;p:project5,events/t;p:project5,events/u;p:project5,events/r;p:project5,events/s;p:project5,events/x;p:project5,events/m;p:project5,events/l;p:project5,events/n;p:project5,events/p;p:project5,events/q;p:project5,events/a;p:project9,events/b;p:project9,events/c;p:project9,events/e;p:project9,events/v;p:project9,events/t;p:project9,events/u;p:project9,events/r;p:project9,events/s;p:project9,events/x;p:project9,events/m;p:project9,events/l;p:project9,events/n;p:project9,events/p;p:project9,events/q;p:project9,events/a;p:project17,events/b;p:project17,events/c;p:project17,events/e;p:project17,events/v;p:project17,events/t;p:project17,events/u;p:project17,events/r;p:project17,events/s;p:project17,events/x;p:project17,events/m;p:project17,events/l;p:project17,events/n;p:project17,events/p;p:project17,events/q;p:project17,events/a;p:project59,events/b;p:project59,events/c;p:project59,events/e;p:project59,events/v;p:project59,events/t;p:project59,events/u;p:project59,events/r;p:project59,events/s;p:project59,events/x;p:project59,events/m;p:project59,events/l;p:project59,events/n;p:project59,events/p;p:project59,events/q;p:project59,events/a;p:project6,events/b;p:project6,events/c;p:project6,events/e;p:project6,events/v;p:project6,events/t;p:project6,events/u;p:project6,events/r;p:project6,events/s;p:project6,events/x;p:project6,events/m;p:project6,events/l;p:project6,events/n;p:project6,events/p;p:project6,events/q;p:project6,events/a;p:project3,events/b;p:project3,events/c;p:project3,events/e;p:project3,events/v;p:project3,events/t;p:project3,events/u;p:project3,events/r;p:project3,events/s;p:project3,events/x;p:project3,events/m;p:project3,events/l;p:project3,events/n;p:project3,events/p;p:project3,events/q;p:project3,events/a;p:project25,events/b;p:project25,events/c;p:project25,events/e;p:project25,events/v;p:project25,events/t;p:project25,events/u;p:project25,events/r;p:project25,events/s;p:project25,events/x;p:project25,events/m;p:project25,events/l;p:project25,events/n;p:project25,events/p;p:project25,events/q;p:project25,events/a;p:project46,events/b;p:project46,events/c;p:project46,events/e;p:project46,events/v;p:project46,events/t;p:project46,events/u;p:project46,events/r;p:project46,events/s;p:project46,events/x;p:project46,events/m;p:project46,events/l;p:project46,events/n;p:project46,events/p;p:project46,events/q;p:project46,events/a;p:project40,events/b;p:project40,events/c;p:project40,events/e;p:project40,events/v;p:project40,events/t;p:project40,events/u;p:project40,events/r;p:project40,events/s;p:project40,events/x;p:project40,events/m;p:project40,events/l;p:project40,events/n;p:project40,events/p;p:project40,events/q;p:project40,events/a;p:project37,events/b;p:project37,events/c;p:project37,events/e;p:project37,events/v;p:project37,events/t;p:project37,events/u;p:project37,events/r;p:project37,events/s;p:project37,events/x;p:project37,events/m;p:project37,events/l;p:project37,events/n;p:project37,events/p;p:project37,events/q;p:project37,events/a;p:project7,events/b;p:project7,events/c;p:project7,events/e;p:project7,events/v;p:project7,events/t;p:project7,events/u;p:project7,events/r;p:project7,events/s;p:project7,events/x;p:project7,events/m;p:project7,events/l;p:project7,events/n;p:project7,events/p;p:project7,events/q;p:project7,events/a;p:project48,events/b;p:project48,events/c;p:project48,events/e;p:project48,events/v;p:project48,events/t;p:project48,events/u;p:project48,events/r;p:project48,events/s;p:project48,events/x;p:project48,events/m;p:project48,events/l;p:project48,events/n;p:project48,events/p;p:project48,events/q;p:project48,events/a;p:project30,events/b;p:project30,events/c;p:project30,events/e;p:project30,events/v;p:project30,events/t;p:project30,events/u;p:project30,events/r;p:project30,events/s;p:project30,events/x;p:project30,events/m;p:project30,events/l;p:project30,events/n;p:project30,events/p;p:project30,events/q;p:project30,events/a;p:project13,events/b;p:project13,events/c;p:project13,events/e;p:project13,events/v;p:project13,events/t;p:project13,events/u;p:project13,events/r;p:project13,events/s;p:project13,events/x;p:project13,events/m;p:project13,events/l;p:project13,events/n;p:project13,events/p;p:project13,events/q;p:project13,events/a;p:project11,events/b;p:project11,events/c;p:project11,events/e;p:project11,events/v;p:project11,events/t;p:project11,events/u;p:project11,events/r;p:project11,events/s;p:project11,events/x;p:project11,events/m;p:project11,events/l;p:project11,events/n;p:project11,events/p;p:project11,events/q;p:project11,events/a;p:project4,events/b;p:project4,events/c;p:project4,events/e;p:project4,events/v;p:project4,events/t;p:project4,events/u;p:project4,events/r;p:project4,events/s;p:project4,events/x;p:project4,events/m;p:project4,events/l;p:project4,events/n;p:project4,events/p;p:project4,events/q;p:project4,events/a;p:project24,events/b;p:project24,events/c;p:project24,events/e;p:project24,events/v;p:project24,events/t;p:project24,events/u;p:project24,events/r;p:project24,events/s;p:project24,events/x;p:project24,events/m;p:project24,events/l;p:project24,events/n;p:project24,events/p;p:project24,events/q;p:project24,events/a;p:project43,events/b;p:project43,events/c;p:project43,events/e;p:project43,events/v;p:project43,events/t;p:project43,events/u;p:project43,events/r;p:project43,events/s;p:project43,events/x;p:project43,events/m;p:project43,events/l;p:project43,events/n;p:project43,events/p;p:project43,events/q;p:project43,events/a;p:project16,events/b;p:project16,events/c;p:project16,events/e;p:project16,events/v;p:project16,events/t;p:project16,events/u;p:project16,events/r;p:project16,events/s;p:project16,events/x;p:project16,events/m;p:project16,events/l;p:project16,events/n;p:project16,events/p;p:project16,events/q;p:project16,events/a;p:project27,events/b;p:project27,events/c;p:project27,events/e;p:project27,events/v;p:project27,events/t;p:project27,events/u;p:project27,events/r;p:project27,events/s;p:project27,events/x;p:project27,events/m;p:project27,events/l;p:project27,events/n;p:project27,events/p;p:project27,events/q;p:project27,events/a;p:project23,events/b;p:project23,events/c;p:project23,events/e;p:project23,events/v;p:project23,events/t;p:project23,events/u;p:project23,events/r;p:project23,events/s;p:project23,events/x;p:project23,events/m;p:project23,events/l;p:project23,events/n;p:project23,events/p;p:project23,events/q;p:project23,events/a;p:project22,events/b;p:project22,events/c;p:project22,events/e;p:project22,events/v;p:project22,events/t;p:project22,events/u;p:project22,events/r;p:project22,events/s;p:project22,events/x;p:project22,events/m;p:project22,events/l;p:project22,events/n;p:project22,events/p;p:project22,events/q;p:project22,events/a;p:project8,events/b;p:project8,events/c;p:project8,events/e;p:project8,events/v;p:project8,events/t;p:project8,events/u;p:project8,events/r;p:project8,events/s;p:project8,events/x;p:project8,events/m;p:project8,events/l;p:project8,events/n;p:project8,events/p;p:project8,events/q;p:project8,events/a;p:project10,events/b;p:project10,events/c;p:project10,events/e;p:project10,events/v;p:project10,events/t;p:project10,events/u;p:project10,events/r;p:project10,events/s;p:project10,events/x;p:project10,events/m;p:project10,events/l;p:project10,events/n;p:project10,events/p;p:project10,events/q;p:project10,events/a;p:project18,events/b;p:project18,events/c;p:project18,events/e;p:project18,events/v;p:project18,events/t;p:project18,events/u;p:project18,events/r;p:project18,events/s;p:project18,events/x;p:project18,events/m;p:project18,events/l;p:project18,events/n;p:project18,events/p;p:project18,events/q;p:project18,events/a;p:project47,events/b;p:project47,events/c;p:project47,events/e;p:project47,events/v;p:project47,events/t;p:project47,events/u;p:project47,events/r;p:project47,events/s;p:project47,events/x;p:project47,events/m;p:project47,events/l;p:project47,events/n;p:project47,events/p;p:project47,events/q;p:project47,events/a;p:project14,events/b;p:project14,events/c;p:project14,events/e;p:project14,events/v;p:project14,events/t;p:project14,events/u;p:project14,events/r;p:project14,events/s;p:project14,events/x;p:project14,events/m;p:project14,events/l;p:project14,events/n;p:project14,events/p;p:project14,events/q;p:project14,events/a;p:project2,events/b;p:project2,events/c;p:project2,events/e;p:project2,events/v;p:project2,events/t;p:project2,events/u;p:project2,events/r;p:project2,events/s;p:project2,events/x;p:project2,events/m;p:project2,events/l;p:project2,events/n;p:project2,events/p;p:project2,events/q;p:project2,events/a;p:project56,events/b;p:project56,events/c;p:project56,events/e;p:project56,events/v;p:project56,events/t;p:project56,events/u;p:project56,events/r;p:project56,events/s;p:project56,events/x;p:project56,events/m;p:project56,events/l;p:project56,events/n;p:project56,events/p;p:project56,events/q;p:project56,events/H;,statistics,investigationsCounter/1,ping

- 12|events/o;#46

- 22|events/r;p:project5#10

- 21|events/r;p:project6#6

- 9|ping#Ping

- 9|ping#Ping

- ...

0
Comment actions Permalink

Thank you, there is some problem on the server side, websocket itself works fine.

I created an issue in our tracker https://youtrack.jetbrains.com/issue/TW-39393.
Could you attach there several thread dumps and teamcity-ws.log?

0

Please sign in to leave a comment.