我正在尝试在 Heroku 上部署 Tornado。我可以使用这种方法运行一个简单的“hello world”应用程序:http: //kzk9.net/deploying-tornado-on-heroku-mac-os-x
但是在尝试 Tornado 演示应用程序“chatdemo”时,服务器崩溃并显示以下日志:
11:22:45 web.1 | 2012-11-12 11:22:45 [18442] [ERROR] Exception in worker process:
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | 2012-11-12 11:22:45 [18442] [INFO] Worker exiting (pid: 18442)
11:22:45 web.1 | 2012-11-12 11:22:45 [18443] [ERROR] Exception in worker process:
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | 2012-11-12 11:22:45 [18443] [INFO] Worker exiting (pid: 18443)
11:22:45 web.1 | 2012-11-12 11:22:45 [18444] [ERROR] Exception in worker process:
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | 2012-11-12 11:22:45 [18444] [INFO] Worker exiting (pid: 18444)
11:22:45 web.1 | 2012-11-12 11:22:45 [18445] [ERROR] Exception in worker process:
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 461, in spawn_worker
11:22:45 web.1 | worker.init_process()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/workers/base.py", line 101, in init_process
11:22:45 web.1 | self.wsgi = self.app.wsgi()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 101, in wsgi
11:22:45 web.1 | self.callable = self.load()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 24, in load
11:22:45 web.1 | return util.import_app(self.app_uri)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/util.py", line 292, in import_app
11:22:45 web.1 | app = eval(obj, mod.__dict__)
11:22:45 web.1 | File "<string>", line 1, in <module>
11:22:45 web.1 | NameError: name 'application' is not defined
11:22:45 web.1 | 2012-11-12 11:22:45 [18445] [INFO] Worker exiting (pid: 18445)
11:22:45 web.1 | Traceback (most recent call last):
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/bin/gunicorn", line 8, in <module>
11:22:45 web.1 | load_entry_point('gunicorn==0.15.0', 'console_scripts', 'gunicorn')()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 32, in run
11:22:45 web.1 | WSGIApplication("%prog [OPTIONS] APP_MODULE").run()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/app/base.py", line 124, in run
11:22:45 web.1 | Arbiter(self).run()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 185, in run
11:22:45 web.1 | self.halt(reason=inst.reason, exit_status=inst.exit_status)
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 280, in halt
11:22:45 web.1 | self.stop()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 328, in stop
11:22:45 web.1 | self.reap_workers()
11:22:45 web.1 | File "/Users/princekumar/Downloads/tornado-2.4/demos/ChatOnHeroku/lib/python2.7/site-packages/gunicorn/arbiter.py", line 421, in reap_workers
11:22:45 web.1 | raise HaltServer(reason, self.WORKER_BOOT_ERROR)
11:22:45 web.1 | gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>
11:22:45 web.1 | exited with code 1
11:22:45 system | sending SIGTERM to all processes
SIGTERM received
有人知道怎么了吗?