[英]No terminal output for google app engine for local dev server?
I've been using the google app engine for web app development using the python 2.7, ubuntu 12.04, and webapp2 framework. 我一直在使用python 2.7,ubuntu 12.04和webapp2框架将Google App引擎用于Web应用程序开发。
For some strange reason when I run an app on the local dev server I can no longer view my http responses or view errors on the terminal as used to before. 由于某些奇怪的原因,当我在本地开发服务器上运行应用程序时,我无法再像以前一样查看我的http响应或查看终端上的错误。 I don't know how it came to be this way.
我不知道怎么会这样。
Also when use my terminal to run a new using the dev_server.py command like follows, 同样,当使用我的终端使用dev_server.py命令运行新代码时,如下所示,
ahmad@ubuntu:~/GAE$ python google_appengine/dev_appserver.py wiki
i get an error that the socket is being used. 我收到正在使用套接字的错误。 I remember when I ran an app I had to click ctrl+c to kill it and rerun another one.. now it seems to run in the back ground and if i try to run a different app i get a statement that the socket is being used...
我记得当我运行一个应用程序时,我必须单击ctrl + c将其杀死并重新运行另一个..现在它似乎在后台运行,如果我尝试运行其他应用程序,则会收到一条声明,指出正在套接字用过的...
here's the exact error for tyring to run a diff app on the local dev server, 这是尝试在本地开发服务器上运行差异应用程序的确切错误,
ahmad@ubuntu:~/GAE$ python google_appengine/dev_appserver.py wiki
WARNING 2012-06-09 17:04:25,981 rdbms_mysqldb.py:74] The rdbms API is not available because the MySQLdb library could not be loaded.
INFO 2012-06-09 17:04:26,022 appengine_rpc.py:160] Server: appengine.google.com
INFO 2012-06-09 17:04:26,024 appcfg.py:582] Checking for updates to the SDK.
INFO 2012-06-09 17:04:26,221 appcfg.py:600] The SDK is up to date.
WARNING 2012-06-09 17:04:26,221 datastore_file_stub.py:518] Could not read datastore data from /tmp/dev_appserver.datastore
Traceback (most recent call last):
File "google_appengine/dev_appserver.py", line 125, in <module>
run_file(__file__, globals())
File "google_appengine/dev_appserver.py", line 121, in run_file
execfile(script_path, globals_)
File "/home/ahmad/GAE/google_appengine/google/appengine/tools/dev_appserver_main.py", line 690, in <module>
sys.exit(main(sys.argv))
File "/home/ahmad/GAE/google_appengine/google/appengine/tools/dev_appserver_main.py", line 653, in main
persist_logs=persist_logs)
File "/home/ahmad/GAE/google_appengine/google/appengine/tools/dev_appserver.py", line 3595, in CreateServer
server = HTTPServerWithScheduler((serve_address, port), handler_class)
File "/home/ahmad/GAE/google_appengine/google/appengine/tools/dev_appserver.py", line 3623, in __init__
request_handler_class)
File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
self.server_bind()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
self.socket.bind(self.server_address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use
INFO 2012-06-09 17:04:26,322 datastore_stub_util.py:2410] Applying all pending transactions and saving the datastore
Thanks for any help in advance 感谢您的任何帮助
“地址已在使用中”看起来端口已被其他进程使用。
Try to find the process hanging on to your port. 尝试找到挂在端口上的进程。 If you use something like
ps aux
you might recognize a zombie appserver instance immediately. 如果使用
ps aux
类的东西,您可能会立即识别出僵尸应用服务器实例。 If not, there are examples available to figure out which process is using a port. 如果没有,可以使用示例来确定哪个进程正在使用端口。 You might have to
kill -9
it. 您可能必须
kill -9
。
If it's supposed to be in use, start dev_appserver on a different port using the -p PORT
argument. 如果应该使用它,请使用
-p PORT
参数在其他端口上启动dev_appserver。
If you're trying to run two apps simultaneously (by using two instances of dev_appserver), you're going to need to tell one of those to use a different port. 如果您试图同时运行两个应用程序(通过使用dev_appserver的两个实例),则需要告诉其中一个使用其他端口。 It's described, with an example, in Running the Development Web Server .
在运行Development Web Server中有一个示例进行了描述。
Ctrl-C'ing a dev_appserver on Ubuntu shouldn't cause it to wander off to run in the background. 在Ubuntu上Ctrl-C'ing dev_appserver不应使它在后台运行。 (Ctrl-Z'ing it might).
(可能会按Ctrl-Z键)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.