-
-
Notifications
You must be signed in to change notification settings - Fork 890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeError: You need to use a gevent-socketio server. #102
Comments
How are you starting your server? You can't do |
Oops so sorry, I guest I didn't read the documentation properly. Now my application works fine with socket.io locally and thank you very much for providing flask-socket.io. It is extremely easy to use and thank you once again |
Hi There, from main2 import socketio as application def application(environ, start_response): 2015-03-22 20:53:15,827 :Traceback (most recent call last): How should I create wsgi.py file to run socketio. |
Based on this thread it appears pythonanywhere does not support the WebSocket protocol. |
Hi There, |
So basically, any plan that gives you a server, either virtual or physical, is going to work fine because you have full control of your stack, you just get a machine and you can install whatever you want in it. What you get from pythonanywhere is different. Here you don't get full control of a server, you just install your application on a server that is controlled by them. So here the stack is is chosen by the service provider not by you. So while this has some restrictions, it is much easier to setup an application because you don't have to worry about setting up the server. If you are looking for a service similar to pythonanywhere that has support for WebSocket, then I recommend you check out Heroku. They have a free tier so you can try before you buy. |
Traceback (most recent call last): |
Okay, this is all expected.
The above error occurs because you are trying to open port 80 and you are not the root user. In Unix only the root user can access ports below 1024.
This error suggests you have another service that is running on port 5000. Maybe another Flask application? |
if I set socketio.run(app) by default, I will get the following error [Mon Mar 23 22:13:50.897494 2015] [:error] [pid 24826:tid 140210539063040] [client 89.101.241.102:2765] mod_wsgi (pid=24826): Exception occurred processing WSGI script '/var/www/FlaskApp/flaskapp.wsgi'. |
Not sure about this one. I recommend that you try to run the example app from this repository and see if that one works for you. |
I currently running your application, below is the flaskapp.wsgi file from test_soc import app as application If I change the 'app' to socketio I will get the following error and if I don't change, I will get the following error Traceback (most recent call last): |
Why are you creating a wsgi file? Sockets aren't part of WSGI, so you can't work with this extension when only WSGI is supported. Try running the application by executing |
I'm so sorry if my knowledge on server setup is poor, as I'm running my Flask app with apache2 server with aide of this link:https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps. |
Sorry this is so complicated. WebSocket is kind of a black sheep, apache2 also does not support this protocol. I recommend that you read the documentation of this extension for the recommended deployment stack. Basically nginx+gunicorn is what I recommend, but if you want to start off without things being so complicated then gunicorn alone is a good choice. |
Hi there, I receive an error when it uses websocket File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 327, in run |
@jasdevsidhu what server and browser are you using for this last test? |
Given than the deployment options are different in release 1.0, I'm going to close this. Please reopen if you have problems with 1.0. |
Hi there I followed all the steps to used flask.sockets.io but I am facing the following problem
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1836, in call
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/dist-packages/flask_socketio/init.py", line 27, in call
raise RuntimeError('You need to use a gevent-socketio server.')
RuntimeError: You need to use a gevent-socketio server.
Can anyone help me out.
The text was updated successfully, but these errors were encountered: