Internet Explorer 9 with sockjs-tornado

387 views
Skip to first unread message

theyak

unread,
Nov 9, 2012, 1:47:25 AM11/9/12
to soc...@googlegroups.com
Just set up a very simply server in python that doesn't really do anything but count number of connections, messages received, and disconnections. Client side is also just as simple. The client sends one message upon connect and the server responds with a message. That's it. The python server is sitting on socket.example.com:80 while the index page is from www.example.com:80. Different computers, but same top level  domain names.

Things seem to work reasonably well for IE 10, FireFox, Chrome, and Safari users - currently sitting at about 92% success rate (I would like to see this number be higher) . However, it's not working at all for IE 9 and under. Is it suppose to? I'd definitely expect it to at least work with IE 9.


Marek Majkowski

unread,
Nov 9, 2012, 11:09:08 AM11/9/12
to yakk...@gmail.com, soc...@googlegroups.com
Hi,
Well, SockJS should work on IE6+. Can you check if it works on our
deployed setup?

https://sockjs.popcnt.org/example-cursors.html
https://sockjs.cloudfoundry.com/example-cursors.html

The latter has websockets disabled. You can try it with both
http and https.

Marek

theyak

unread,
Nov 9, 2012, 8:00:50 PM11/9/12
to soc...@googlegroups.com, yakk...@gmail.com
Thanks, I did figure out the problem although I don't know why it was a problem. The problem arose only when the following conditions were met:

Different servers, although top level domain name was the same.
Port 80

When I ran on port 80 from the same server, all good. When I run on a different port, e.g., port 82, all good even on the different servers. I don't know why this would be the case. No problems using port 80 with sockjs node or socket.io.

Marek Majkowski

unread,
Nov 9, 2012, 8:25:15 PM11/9/12
to yakk...@gmail.com, Serge Koval, soc...@googlegroups.com
On Sat, Nov 10, 2012 at 1:00 AM, theyak <yakk...@gmail.com> wrote:
> Thanks, I did figure out the problem although I don't know why it was a
> problem. The problem arose only when the following conditions were met:
>
> Different servers, although top level domain name was the same.
> Port 80
>
> When I ran on port 80 from the same server, all good. When I run on a
> different port, e.g., port 82, all good even on the different servers. I
> don't know why this would be the case. No problems using port 80 with sockjs
> node or socket.io.

theyak,

I think it's unlikely that your description is correct. It's hard to believe
that port number has anything to do with the issue. Although
it would be nice to understand what is wrong.


Serge,

can you comment?
If I understand correctly, theyak is describing
the following dns setup:
- www.blah.com -> 127.0.0.1
- sockjs.blah.com -> 127.0.0.1

You run single server on port 80 on 127.0.0.1, and with
this setup for some reason SockJS on IE9 doesn't work.

Marek

Serge S. Koval

unread,
Nov 10, 2012, 5:24:49 AM11/10/12
to Marek Majkowski, yakk...@gmail.com, soc...@googlegroups.com
Let me confirm setup:
- One server running one sockjs-tornado instance on port 80
- Server has two DNS names pointing to it: www.example.com and socket.example.com
- Page is opened on www.example.com
- Page is attempting to make SockJS connection to socket.example.com
- Connection fails on IE9, but works on rest of the browsers
- When you switch to port 82, open page from www.example.com:82 and connect to socket.example.com:82 it starts working

Additional questions:
1. What's SockJS client version?
2. Are you testing it from the same PC along with other browsers? (same network conditions)

I tried to reproduce it and SockJS is working. It is using worst-possible transport, but it is working.
- Internet Explorer 9.0.8112.16421 on Windows 7
- Two hosts file entries:
127.0.0.1 www.example.com
- Modified chat example to listen on port 80 and connect to http://socket.example.com/chat
- Opened www.example.com, clicked connect
- It successfully connected and used iframe-htmlfile transport

Overall, I see no reasons why it won't work. Maybe there are some security settings in IE9 that prevent using HTMLFile object (it is ActiveX control anyway) and SockJS does not have other cross domain transports? But this does not explain why it started working after you switched ports.

Serge.

theyak

unread,
Nov 10, 2012, 5:26:39 PM11/10/12
to soc...@googlegroups.com, Marek Majkowski, yakk...@gmail.com
I'll do more testing this week. To clarify:


- One server running one sockjs-tornado instance on port 80

Correct.


- Server has two DNS names pointing to it: www.example.com and socket.example.com

Not quite. www.example.com is one computer and IP while socket.example.com is another computer and IP. That is, the subdomains point two different IPs and computers.


- Page is opened on www.example.com

Page is opened on www.example.com. I've tried serving my JS client from both www.example.com and socket.example.com with no differences noticed.


- Page is attempting to make SockJS connection to socket.example.com

Correct.


- Connection fails on IE9, but works on rest of the browsers

Connection fails with IE 9 and under. Works pretty well on most other browsers.


- When you switch to port 82, open page from www.example.com:82 and connect to socket.example.com:82 it starts working

Correct. In fact, my overall success rate for all browsers went up. Before it was about 91%, not including IE browsers, and now, after moving to port 82, it is at 97% for all browsers.

1. What's SockJS client version?

SockJS client version is 0.3 from //cdn.sockjs.org/sockjs-0.3.min.js


2. Are you testing it from the same PC along with other browsers? (same network conditions)

Nope. This was from many PCs from our website's users from around the world. However, IE 9 and under never successfully from any of our users, including myself when testing.

Again, I'll do more testing this week. I'll probably set up 2 completely clean EC2 instances and test that way to see if I can figure anything out.

Marek Majkowski

unread,
Nov 12, 2012, 8:07:49 AM11/12/12
to theyak, soc...@googlegroups.com
On Sat, Nov 10, 2012 at 10:26 PM, theyak <yakk...@gmail.com> wrote:
> I'll do more testing this week. To clarify:
>
> [...]
> - Server has two DNS names pointing to it: www.example.com and
> socket.example.com
>
> Not quite. www.example.com is one computer and IP while socket.example.com
> is another computer and IP. That is, the subdomains point two different IPs
> and computers.
>
> - Page is opened on www.example.com
>
> Page is opened on www.example.com. I've tried serving my JS client from both
> www.example.com and socket.example.com with no differences noticed.

Okay, I'm lost. What is served on "www.example.com" and what server hosts it?
What is served on "socket.example.com" and what server hosts it?

>> - One server running one sockjs-tornado instance on port 80
> Correct.

Yeah, but exactly, what is served there?

Marek
Reply all
Reply to author
Forward
0 new messages