Skip to content

Instantly share code, notes, and snippets.

@zfwf
Last active January 5, 2017 10:02
Show Gist options
  • Save zfwf/5f204a22741bcacfce9fbf0abbe57fd8 to your computer and use it in GitHub Desktop.
Save zfwf/5f204a22741bcacfce9fbf0abbe57fd8 to your computer and use it in GitHub Desktop.

Issue

Encountered an error when running dev_appserver.py .: File "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 336, in start raise BindError('Unable to find a consistent port for %s' % host) google.appengine.tools.devappserver2.wsgi_server.BindError: Unable to find a consistent port for localhost Exception in thread Thread-1 (most likely raised during interpreter shutdown):

Solution (sort of...)

Attempted following steps:

  1. python -m SimpleHTTPServer server starts on port 8000, works fine
  2. dig localhost shows an A record for localhost.
  3. ping localhost. seems to work respond from 127.0.0.1
  4. Tried ping localhost now also works

Then dev_appserver.py . starts to work magically again. It seems step 2 have "activated" something and now GAE runs on my machine fine. This article describes a fix but I'm unable to apply on macos sierra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment