flask pit

no python application found, check your startup logs for errors

When an error like " Mon Mar 23 10 : 26 : 49 2015 - - no python application found, check your startup logs for errors -" is reported in the log, you need to check the xml file. There must be no spaces at the end of the line in this file. There can be no spaces on the left and right of the parameters. This problem has been bugging me all night! ! ! Errors like " ImportError : No module named wsgi" are reported in the log. You need to check the pythonpath option of your xml file. In a virtual environment, you need to configure it to the directory where uwsgi is located (in a non-virtual environment, you only need to configure it to where the project is located. path)

I looked at the system's environment variable PATH, which has / usr/lib64/bin path (python2.6.6), but no /usr/local/bin path (python2.7.9), so

Go /etc/profile to add  export PATH=/usr/local/bin:$PATH , log out, log in again, and then start uwsgi, there is no problem.

Because I actually installed python2.7.9 on the basis of python2.6.6, I just made a soft connection, and did not add the environment variables of python2.7.9 to the environment variables of the system, and the environment of my project, the first The three-party packages are installed under python2.7.9. When uwsgi is started, the location of the project is found according to the configuration information chdir and module of uwsgi, but when the code is loaded, a large number of import errors occur because the third-party library cannot be found. (If you scroll up the log, it is easy to ignore the error if it cannot be displayed on one screen.) Therefore, the uwsgi configuration file module has not been completed in this step, and the result is no python application found that it is not uncommon to report this error.

 

 

uwsgi:

http: 0.0.0.0:80

chdir: /project_name_path

module: project.wsgi

processes: 4

listen : 100

daemonize: /tmp/uwsgi.log

pidfile: /tmp/uwsgi.pid

master: true

isable-logging : true

stats: /tmp/uwsgi.socket

enable-threads: true

buffer-size: 32768

Another question: when I change http to socket in uwsgi's configuration file, the uwsgi service can be started, but the service is not provided, and the browser cannot access it.

 

 

uwsgi :

curl

http://blog.51cto.com/12482328/2087535?cid=702003

 

 

Reboot:

shutdown –h now



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325062819&siteId=291194637