5

Today our development containers started throwing and error while running the App Engine (GAE) Standard local development environment from the Google Cloud SDK.

ERROR    2017-12-15 09:38:37,766 http_runtime.py:396] bad runtime process port ['']
Traceback (most recent call last):
  File "/opt/google-cloud-sdk/platform/google_appengine/_php_runtime.py", line 103, in <module>
    _run_file(__file__, globals())
  File "/opt/google-cloud-sdk/platform/google_appengine/_php_runtime.py", line 97, in _run_file
    execfile(_PATHS.script_file(script_name), globals_)
  File "/opt/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/php/runtime/runtime.py", line 39, in <module>
    from google.appengine.tools.devappserver2 import wsgi_server
  File "/opt/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 34, in <module>
    import ipaddr
ImportError: No module named ipaddr

It looks like it was caused by an upgrade to the latest SDK which happened automatically.

iamacarpet
  • 417
  • 5
  • 13

4 Answers4

7

Temporal solution for macOS, copy the ipaddr.py file to <google-cloud-sdk>/platform/google_appengine

AbeEstrada
  • 1,090
  • 1
  • 13
  • 15
  • 2
    Fixed it for me. Note that if you still use the old launcher this isn't in ~/google-cloud-sdk but in /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine – blackjack75 Jan 05 '18 at 01:47
3

On Ubuntu 14.04, which we are using to match the GAE PHP version of 5.5, the python module they are trying to use isn't installed by default.

We installed it with:

# apt install python-ipaddr

This looks to be because of a feature they have introduced to do with host checking, to prevent DNS rebinding attacks.

iamacarpet
  • 417
  • 5
  • 13
1

In Windows 10, I copied the file ipaddr.py from https://github.com/google/ipaddr-py into the Google\Cloud SDK\google-cloud-sdk\platform\bundledpython\Lib\ folder and it worked.

Not an experienced Python coder, so I'm not sure if it's the best place to put the missing ipaddr.py file, but it works.

  • For what it's worth, this didn't work under my Win 10. I had to install 'ipaddr.py' under the '\Python\Lib\' folder instead. – fwiw Jan 13 '18 at 23:05
0

This happened after GoogleAppEngine-1.9.65 upgrade in my Windows 7 and it seems C:\Program Files (x86)\Google\google_appengine\lib\ipaddr\ipaddr folder is missing ipaddr.py file.

I had to download ipaddr-2.2.0.tar.gz then unzip it and run following command to install it.

python setup.py install

Hope this helps.

Gayan Pathirage
  • 1,979
  • 1
  • 24
  • 21