Strophe to Openfire: Error during WebSocket handshake: Unexpected response code: 302 - websocket

I am writing a simple chat client (using strophe) which connects to my Openfire server. Strophe works successfully with BOSH, but for some reason cannot connect using websockets.
I have installed the latest version (websockets-0.0.0.6) of "WebSockets Plugin" plugin for OpenFire, using the default path "ws". My client url is ws://my-server:7070/ws.
I get the following error in my browser console:
WebSocket connection to 'ws://localhost:7070/ws' failed: Error during
WebSocket handshake: Unexpected response code: 302
I look at other related post (stackoverflow.com/questions/22983302/strophe-failed-to-connect-openfire-by-websocket) but have not been successful.
Has anyone come across this problem before?
Any help would really be appreciated.
Thanks in advance.

I'm assuming you were using the latest version of Strophe. The openfire-websocket is developed against with older version Strophe 1.0 . They are not capable now.
You can take a look at https://community.igniterealtime.org/thread/53783

Related

Unexpected server response: 404 Handshake Details

some times age web sockets working perfeclty with me but now not working why what is problem
websockets are not working
just install channels==3.0.4 and django
its work with me of lots of strugle

Spring Websocket 400 Error: Handshake failed due to invalid Upgrade header: null

I am using wss (secured web sockets) with spring 4.2.x from backend and STOMP for javascript client. I can run it successfully under http, but failed when under https.
The only error I met is:
ERROR o.s.w.s.s.s.DefaultHandshakeHandler - Handshake failed due to invalid Upgrade header: null
The JS error is:
WebSocket connection to 'wss://.example.com/.../websocket' failed: Error during WebSocket handshake: Unexpected response code: 400
I googled a lot and understand that I should do some configuration on wildfly to make it support wss requests. But I don't know how. Thanks in advance if someone can give any idea!

Websocket implementation not working in Apache Ofbiz

I am checking the Websocket implementation in Apache Ofbiz.
I followed the parent ticket OFBIZ-7073 and its child tickets.
But I am getting the following error-
ExamplePushNotifications.js:23 WebSocket connection to 'wss://localhost:8443/example/ws/pushNotifications' failed: Error during WebSocket handshake: Unexpected response code: 404
I think that the request is redirecting to control servlet rather than tomcat server. Therefore IMO, we need to make some changes in example/web.xml.
How should I proceed?
Thanks in advance!

WebSocket Request: 426 Upgrade required

I'm a licensed user of the Paw 2.2.7 Rest client and I would like to issue a WebSocket request.
I currently get back the response: 426 Upgrade Required. I would like to define a proper WebSocket request within the client.
Is it possible? If so, how would I define such a request?
I appreciate the feedback.
I was able to create a simple Websocket iOS-based app to perform my testing. I like PAWS so I hope you add WebSocket support in the future.

Getting updates via xively websockets

I am trying to subscribe to datastream updates via the xively-js javascript library.
However, all I am getting is a 503 error right after creating the websocket:
WebSocket connection to 'ws://api.xively.com:8080/' failed: Unexpected response code: 503
The same error is produced by the xively-js sample-app at
http://xively.github.io/xively-js/sample-app/
Both IE10 and Chrome give the same result.
I can't seem to find any working xively websocket sample. Does somebody have any?
I have found the answer to my own question. It looks like non-secure websockets don't work for some reason.
The secure version wss://api.xively.com:8094 is working fine.

Resources