質問

I have a nodejs v0.10 server with socket.io (v0.9.16) running on Openshift, for the past 2 months it has no problem receiving data from my Android apps connecting to the server using AndroidAsync (https://github.com/koush/AndroidAsync). Suddenly after Openshift upgrade its service on 25th Feb the Android app fail to connect to the server. Every time the app tries to connect the server, the server will output an error, I run Socket.IO in debug mode and this appear (debug: destroying non-socket.io upgrade).

Funny thing is, the same server also host my web client running the same socket.io library, and it has no problem whatsoever with the web client. Can someone please point me to the right direction? I am connecting to the server with http://www.xxxxxx.com:8000/ where 8000 is the websocket port given by Openshift.

I read that "destroying non-socket.io upgrade" might due to invalid/incompatible socket.io js file, I tried to do a manual check on the socket.io file by typing this in my browser

http://www.xxxxxx.com:8000/socket.io/1/

I got this return code:

An-vI1BJofr45j9c_GmH:60:60:websocket,htmlfile,xhr-polling,jsonp-polling

PS: My Android code hasn't been changed, and so is my server code. PPS: I have successfully connect in localhost environment and my own server. So the problem is most probably originated from Openshift, not sure what have been updated to break it.

役に立ちましたか?

解決

All of a sudden it works again without any code changes. I would however recommended anyone using my approach of connecting to backend server to have a http push backup just incase any future server updates breaks it again.

Would appreciate if anyone from Openshift can help clarify this to prevent sudden death on running production apps. Thanks.

他のヒント

Make sure to check OpenShift Online's system status page to see if your apps have been impacted by a system outage. (fyi: we run on top of AWS)

I would definitely consider using one of OpenShift Online's paid hosting plans for production quality applications. Apps that are created using paid plans go onto a separate array of machines (more resources), and are configured to be more highly-available (no sleeping due to inactivity).

Hope this helps answer your question. Please close if so.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top