1

我正在编写cherrypy应用程序,它在带有apache和mod_wsgi的localhost上运行良好,但它没有在dotcloud上运行它给我错误502应用程序没有响应

我的 approot 中有 wsgi.py,其中包含

application = cherrypy.Application(Root(), script_name=None, config=None)

不幸的是,这里的日志没有错误

==> /var/log/supervisor/supervisord.log <==
2012-10-19 06:54:53,689 CRIT Set uid to user 1000
2012-10-19 06:54:53,689 WARN Included extra file "/etc/supervisor/conf.d/uwsgi.conf" during parsing
2012-10-19 06:54:53,850 INFO RPC interface 'supervisor' initialized
2012-10-19 06:54:53,850 WARN cElementTree not installed, using slower XML parser for XML-RPC
2012-10-19 06:54:53,850 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2012-10-19 06:54:53,855 INFO daemonizing the supervisord process
2012-10-19 06:54:53,861 INFO supervisord started with pid 145
2012-10-19 06:54:54,867 INFO spawned: 'uwsgi' with pid 150
2012-10-19 06:54:56,057 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

==> /var/log/supervisor/uwsgi.log <==
Fri Oct 19 06:54:55 2012 - your server socket listen backlog is limited to 100 connections
Fri Oct 19 06:54:55 2012 - *** Operational MODE: preforking ***
Fri Oct 19 06:54:55 2012 - added /home/dotcloud/current/ to pythonpath.
Fri Oct 19 06:54:55 2012 - *** no app loaded. going in full dynamic mode ***
Fri Oct 19 06:54:55 2012 - *** uWSGI is running in multiple interpreter mode ***
Fri Oct 19 06:54:55 2012 - spawned uWSGI master process (pid: 161)
Fri Oct 19 06:54:55 2012 - spawned uWSGI worker 1 (pid: 168, cores: 1)
Fri Oct 19 06:54:55 2012 - spawned uWSGI worker 2 (pid: 169, cores: 1)
Fri Oct 19 06:54:55 2012 - spawned uWSGI worker 3 (pid: 170, cores: 1)
Fri Oct 19 06:54:55 2012 - spawned uWSGI worker 4 (pid: 171, cores: 1)

==> /var/log/nginx/access.log <==

==> /var/log/nginx/error.log <==

==> /var/log/nginx/salesinfo-default-www-0.access.log <==
** (-) - - [19/Oct/2012:06:54:53 +0000] "-" 400 0 "-" "-"

==> /var/log/nginx/salesinfo-default-www-0.error.log <==

==> /var/log/supervisor/uwsgi.log <==
Fri Oct 19 06:55:42 2012 - WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x68ae00 pid: 170 (default app)

==> /var/log/nginx/salesinfo-default-www-0.access.log <==
*** (::ffff:****) - - [19/Oct/2012:06:56:11 +0000] "GET / HTTP/1.1" 499 0 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0"

我唯一注意到的是“没有加载应用程序。进入完全动态模式”但这对我来说没有意义也许你可以帮忙

谢谢

import sys, os, platform 
import atexit
import cherrypy
import cherrys
from controllers import Root

cherrypy.config.update({'environment': 'embedded',
                            'tools.sessions.on': True,
                            'tools.sessions.storage_type': "file",
                            'tools.sessions.storage_path': "./sessions"
                            })

application = cherrypy.Application(Root(), script_name=None, config=None)

还有 requirements.txt 看起来像

CherryPy==3.2.2
cherrys
jinja2
4

0 回答 0