This is more of a network question , I believe. Not sure what the issue is. I have a chat application which uses faye and it runs fine on my system(rails app)
with localhost:3000 having faye mounted on it.I recently deployed this rails app onto bluehost server and when I try to use the faye client on browser ,its giving me this error:
WebSocket connection to 'ws://chat.xyz.com/faye' failed: Error during WebSocket handshake: Unexpected response code: 500
The below requests\handshakes keep on repeating.
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp3
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp4
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp5
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp6
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp7
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp8
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ing%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp9
GET ...chat.xyz.com/faye?message=%5B%7B%22channel%22%3A%22%2Fmet…ng%22%5D%2C%22id%22%3A%221%22%2C%22ext%22%3A%7B%7D%7D%5D&jsonp=jsonp10
And the failed handshakes\requests keep on getting repeated. Seeing the same on server logs also(except the 500 message obviously). The logs dont give any error apart from these repeats
Is it because of proxy\firewall issue. I recently came across an article :
http://www.infoq.com/articles/Web-Sockets-Proxy-Servers
I am not sure whether its related to blocking of requests by proxy servers.
Tried switching to secure protcol. https. Didn't help.
I use a simple client like this:
var client = new Faye.Client('http://chat.xyz.com/faye');
Any help would be great.
Related
This is the error that I am getting on console while firing an event using tinker.
I am able to connect to XXXs.XXX.com:8443/laravel-websockets, where I can see the default channel and socketId is being created.
The socket has been deployed on nginx server. Server is secured with the whitelisting and blacklisting IPs/Urls. The project is running on XXXs.XXX.com:8443 port and on same the websocket is running on XXXs.XXX.com:6001 port.
For the pusher credentials, I am using: PUSHER_APP_ID=MY_ID, PUSHER_APP_KEY='MY_KEY', PUSHER_APP_SECRET=MY_SECRET,
Also the certificate has been attached, and hence no issue while connecting to socket.
Since there's no issue on local system, so I doubt there is some server/system related issue, but unable to find one.
I set up an API Gateway through Gravitee.io and a Springboot application, and everything seems to work fine as per the rest endpoints, running in https also.
Now, I would like to open a websocket connection through the same port (8080), but when the client tries to do it, this error come up server-side:
Handshake failed due to invalid Upgrade header: null
Looking for some solutions online, seems like a port issue, which could be potentially easy to manage with a tomcat server. But there is a way to address this issue using Gravitee.io ?
Thanks
I would advice you to create an issue in gravitee.io repository at https://github.com/gravitee-io/issues/issues/new
Websocket is not yet ready within Gravitee.io
I'm trying to diagnose an issue whereby an embedded device running an HTTP client to issue requests to a Node.js Web application running on Heroku is receiving empty responses with status code 400.
The problem I'm facing is that the presumably failing requests do not even appear in the Heroku logs, so it's certainly not the Web application code returning those 400s.
On the other hand issuing requests to the Web application from a browser works just fine and the requests do appear in the Heroku logs.
I'm trying to figure out whether the embedded client is really sending requests at all and I'm wondering if there are any reasons why Heroku might send back those 400s without the requests even appearing in the logs.
The cause was related to a badly implemented HTTP client in the device that was issuing requests omitting the host header.
Adding the header solved the problem.
I am working on a pyramid realtime app that would benefit from utilizing websockets. I found that the gevent-socketio library would probably be best for my purposes.
When testing locally on my PC, the websocket transport is used and runs just fine. However, when testing on a server, the handshake fails reporting a 401 response. It then falls back to a long polling transport, which works, but I would really benefit from the speed of websocket.
This makes me believe that there is some kind of authorization issue happening since I am not connecting to the local machine anymore, but I am at a complete loss as to where to look for help.
EDIT:
Now the issue was narrowed down to the fact that we were using mod_proxy, a lighttpd module, to instance the server for development and production. Is there any work around for proxying or do we have to a abandon the idea of server instancing? Ideally we would like to have some way of authorizing users to access our development server, which is how we had it set up with mod_proxy.
So I have a faye server and a rails web application. It all worked fine till recently. Now the browser is not sending anythin to the server. There a no error not on the server not even in browser (I can create an instance of Faye.Client just fine). But when I do publish the server gets nothing. It doesn't even get anythin on the meta channel, like connect or subscribe. The thing is that if I send something with curl the server shows the message (cause I'm logging it).
I can't pin point the problem. :/
Make sure the code to send messages is being reached. Make sure your client is still valid. Test an earlier code version etc. Just a few ideas.
Solved the problem. The url to which faye was connecting was not OK, but faye failed silently because the url responded. :/