How can I configure the Google App Engine SDK to run the local development server without requiring a network connection? I’ve tried removing ~/.appcfg_nag and setting --skip_sdk_update_check at runtime, but it still fails with the following error:
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
EDIT: Here’s the complete command and error output:
$ dev_appserver.py helloworld/
INFO 2012-02-20 20:00:19,712 py_zipimport.py:148] zipimporter('/Library/Python/2.6/site-packages/MySQL_python-1.2.3-py2.6-macosx-10.6-fat.egg', 'MySQLdb/')
WARNING 2012-02-20 20:00:19,784 rdbms_mysqldb.py:94] The rdbms API is not available because the MySQLdb library could not be loaded.
Warning: You are using a Python runtime (2.6) that is more recent than the production runtime environment (2.5). Your application may use features that are not available in the production environment and may not work correctly when deployed to production.
INFO 2012-02-20 20:00:19,859 appengine_rpc.py:159] Server: appengine.google.com
WARNING 2012-02-20 20:00:19,874 dev_appserver.py:3396] Could not initialize images API; you are likely missing the Python "PIL" module. ImportError: No module named _imaging
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 99, in <module>
run_file(__file__, globals())
File "/usr/local/bin/dev_appserver.py", line 95, in run_file
execfile(script_path, globals_)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 692, in <module>
sys.exit(main(sys.argv))
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver_main.py", line 656, in main
persist_logs=persist_logs)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3594, in CreateServer
server = HTTPServerWithScheduler((serve_address, port), handler_class)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/dev_appserver.py", line 3622, in __init__
request_handler_class)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 400, in __init__
self.server_bind()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/BaseHTTPServer.py", line 108, in server_bind
SocketServer.TCPServer.server_bind(self)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/SocketServer.py", line 411, in server_bind
self.socket.bind(self.server_address)
File "<string>", line 1, in bind
socket.gaierror: [Errno 8] nodename nor servname provided, or not known
The default behavior is to bind to 127.0.0.1, which is resolved to “localhost” by looking it up on /etc/hosts (or vice-versa). Try forcing it to bind to 127.0.0.1:8080 by starting it as “dev_appserver.py helloworld -a 127.0.0.1 -p 8080” or bind it to all local addresses with “dev_appserver.py helloworld -a 0.0.0.0 -p 8080” and see what happens.