Skip to content

lost connect to stompEndPoint #1

@mastershashi

Description

@mastershashi

Hi ,

For me Socket JS is unable to make a connection with the server in cloud foundry .
here is my code
var socket = new SockJS('/websocket-example');
stompClient = Stomp.over(socket);
stompClient.connect({}, function (frame) {
setConnected(true);
console.log('Connected: ' + frame);
showGreeting("Connected");
stompClient.send("/app/user", {}, JSON.stringify({'name': $("#name").val()}));
if (stompClient !== null) {
stompClient.disconnect();
}
setConnected(false);
console.log("Disconnected");
});

In Localhost it is working fine but in in cloud foundry it is not working it unable to establish the connection
Log:
Opening Web Socket...

2sockjs.min.js:2
GET https://websocket-cf.cfapps.ondemand.com/websocket-example/info?t=1536215752774 404 (Not Found)
r._start @ sockjs.min.js:2
(anonymous) @ sockjs.min.js:2
setTimeout (async)
r @ sockjs.min.js:2
n @ sockjs.min.js:3
n @ sockjs.min.js:2
n._getReceiver @ sockjs.min.js:2
n.doXhr @ sockjs.min.js:2
(anonymous) @ sockjs.min.js:2
setTimeout (async)
n @ sockjs.min.js:2
r @ sockjs.min.js:2
sendName @ app.js:37
(anonymous) @ app.js:67
dispatch @ jquery.js:5110
q.handle @ jquery.js:4918
localhost/:1
Failed to load https://websocket-cf.cfapps.sap.hana.ondemand.com/websocket-example/info?t=1536215752774:

Can you please tell me what could be the possible reason for this ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions