You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
The One2ManyCallApp refuses connections when the HTML client page is served from a different machine #15
But my existing site isn't on that server, it's on a dedicated Apache server that only serves static HTML/Javascript files. I expect that this would be the case with almost all real-world uses of this software (am I wrong?).
Since it's the same Kurento server (or "Java client"), and since the browser client is using the same HTML/Javascript, one would expect things to keep working on this new page. But the socket won't even open, it gives me this error:
WebSocket connection to 'ws://chat-server-rtc.dev.t3ach.co/call' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
I know that browsers don't like cross-domain communication, but this is the server refusing the connection, so I don't think we can blame the browser. There must be some way to modify the server so that it accepts cross-domain socket connections.
The only suggestion that I've found, after extensive searching, is to use the WebSocketHandlerRegistry.setAllowedOrigins method, and this just makes the problem worse (connections get refused even from the same server using the 100% unmodified page), whether I allow all domains or only a specific one.
Isn't this a very common requirement for any kind of specialized server that does something other than displaying static files? Being able to access it from a page hosted on a standard web server? It is in my experience, but I'm really second-guessing myself here, because I'm apparently the first person to have this problem.
If what I'm trying to do is outside of the scope of supported features, I'll have to maintain two separate public-facing web sites that look identical, and they'll need to share user state such as logins. I'll do that if I need to, but it seems like a lot of code duplication and added complexity.
Instead of copying the content of the app, have you tried proxying via Apache? This
WebSocket connection to 'ws://chat-server-rtc.dev.t3ach.co/call' failed: Error in connection
establishment: net::ERR_CONNECTION_REFUSED
clearly indicates that it's trying to connect to a place where the websockets are not listening (note that the port is missing)
What you are asking is indeed very common, but I think that how to best serve your web-app is something that is not particular to Kurento. I'm setting an invalid flag on this one for that reason.
Activity
igracia commentedon Nov 17, 2015
Instead of copying the content of the app, have you tried proxying via Apache? This
clearly indicates that it's trying to connect to a place where the websockets are not listening (note that the port is missing)
What you are asking is indeed very common, but I think that how to best serve your web-app is something that is not particular to Kurento. I'm setting an
invalidflag on this one for that reason.igracia commentedon Dec 22, 2015
I'm closing this, as it is not a bug, and there has been no feedback for over a month.