Description of problem: I have a project https://github.com/hhimanshu/tweetstream where I connect to server using websocket, see https://github.com/hhimanshu/tweetstream/blob/master/src/main/webapp/tweets.js#L19. This works fine when I run it locally on my laptop, but I see error when deployed to Openshift I even tried port :8000, but no luck var connection = new WebSocket('wss://'+ document.location.host + ':8000' + document.location.pathname + 'tweets'); connection.onopen = function() { connection.send('brazil'); }; connection.onerror = function(error) { console.log('WebSocket Error ' + error); }; connection.onmessage = function(e) { var parse = JSON.parse(e.data); var coordinates = parse["geo"]["coordinates"]; console.log("coordinates:" + JSON.stringify(coordinates, undefined, 2)); }; Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. load app in browser http://map-tweetstream.rhcloud.com/ 2. See console log for error WebSocket connection to 'ws://map-tweetstream.rhcloud.com/tweets' failed: Error during WebSocket handshake: Unexpected response code: 404 tweets.js:19 WebSocket Error [object Event] 3. Actual results: Expected results: Additional info:
Problem was port. I works now https://github.com/hhimanshu/tweetstream/blob/master/src/main/webapp/tweets.js#L7 http://map-tweetstream.rhcloud.com/ Thanks