0

I have a websocket app that uses socket.io and webrtc. I have been using openshift free hosting lately, and I haven't been getting what I want out of it. At first, my app works for maybe a few days, maybe a week. And then later on, my app starts saying Error during WebSocket handshake: Unexpected response code: 400. So, a week it works, and then a week later, it's giving me an error and doesn't work.

What the heck is going on?

streampaw
  • 11
  • 3
  • Are you using ws:// or wss://? – Schien Jul 12 '15 at 17:34
  • Try using the IP address instead of the hostname. It worked for me before. That's the last trick in my "WS Handshake Bag" – Schien Jul 12 '15 at 17:45
  • Well, I'm not sure it's possible to get the host's ip address via javascript, as said here: http://stackoverflow.com/questions/12600244/how-to-get-host-ip-and-port-number-on-which-the-application-is-running-using-jav – streampaw Jul 12 '15 at 17:54
  • I meant to enter the IP address directly in your JavaScript code. – Schien Jul 12 '15 at 17:58
  • I don't think my server gives out an ip address... I am using openshift, and all it has is the cname, which is basically the location url. – streampaw Jul 12 '15 at 18:35
  • Are you using port 8000 for the url like this ws://-.rhcloud.com:8000 ? –  Jul 14 '15 at 04:02

0 Answers0