Golang: Preview of managed VM app returns error

I’m trying to preview a Go docker (App Engine ManagedVM) app using the gcloud preview app run command.

But I keep getting this error:

  • Can't launch openresty docker
  • Override FROM image's ENV in Dockerfile
  • Searching for the most optimal solution with Django, Docker, virtualenv and Heroku deployment
  • How to access mysql outside my kubernetes cluster?
  • docker-compose yml running a script after up
  • docker not working after update
  • Traceback (most recent call last):
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 83, in <module>
        _run_file(__file__, globals())
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/dev_appserver.py", line 79, in _run_file
        execfile(_PATHS.script_file(script_name), globals_)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 985, in <module>
        main()
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 978, in main
        dev_server.start(options)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/devappserver2.py", line 774, in start
        self._dispatcher.start(options.api_host, apis.port, request_data)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 182, in start
        _module, port = self._create_module(module_configuration, port)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/dispatcher.py", line 262, in _create_module
        threadsafe_override=threadsafe_override)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1463, in __init__
        super(ManualScalingModule, self).__init__(**kwargs)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 514, in __init__
        self._module_configuration)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 237, in _create_instance_factory
        module_configuration=module_configuration)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_factory.py", line 78, in __init__
        timeout=self.DOCKER_D_REQUEST_TIMEOUT_SECS)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py", line 740, in NewDockerClient
        client.ping()
      File "/Users/jwesonga/google-cloud-sdk/./lib/docker/docker/client.py", line 711, in ping
        return self._result(self._get(self._url('/_ping')))
      File "/Users/jwesonga/google-cloud-sdk/./lib/docker/docker/client.py", line 76, in _get
        return self.get(url, **self._set_request_timeout(kwargs))
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/sessions.py", line 468, in get
        return self.request('GET', url, **kwargs)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/sessions.py", line 456, in request
        resp = self.send(prep, **send_kwargs)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/sessions.py", line 559, in send
        r = adapter.send(request, **kwargs)
      File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine/lib/requests/requests/adapters.py", line 384, in send
        raise Timeout(e, request=request)
    requests.exceptions.Timeout: (<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10631c7d0>, 'Connection to 192.168.59.104 timed out. (connect timeout=60)')
    ERROR: (gcloud.preview.app.run) DevAppSever failed with error code [1]
    

    I’ve confirmed that docker is up and running using boot2docker status which returns running This was working before but after a machine reboot, nothing seems to work. Any ideas?

  • Docker command to remove all the containers and their images except the ones with a particular label
  • Docker: does using FROM execute the entire base image?
  • Docker log in command does not work
  • Docker exec. Container is not running. Dockerize rails
  • How to enable AUFS on Debian?
  • unable to pass -t -i options to docker on ubuntu …am i missing something?
  • 2 Solutions collect form web for “Golang: Preview of managed VM app returns error”

    The main issue is:

    File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine
           /lib/requests/requests/adapters.py", line 384, in send
        raise Timeout(e, request=request)
    requests.exceptions.Timeout:   
    (<requests.packages.urllib3.connection.VerifiedHTTPSConnection object 
    at 0x10631c7d0>, 'Connection to 192.168.59.104 timed out. 
    (connect timeout=60)')
    ERROR: (gcloud.preview.app.run) DevAppSever failed with error code [1]
    

    Which is often the case when you have a proxy, and is discussed in pip issue 1805

    It is supposed to be fixed in pip1.6, but just in case, you can try the workaround of alexandrem

    /opt/venvs/ironic/lib/python2.6/site-packages/pip/_vendor/requests
    /adapters.patch.py /opt/venvs/ironic/lib/python2.6/site-packages
    /pip/_vendor/requests/adapters.py
    209c209
    if True or not proxy in self.proxy_manager:
       ^^^^
    

    basically I just add a True to the condition on line 209 of the adapter.py to always create a ProxyManager instance, thus skipping the pool manager logic.

    The gcloud command enable the ah_host process and also created the docker image of your app and passes it to the Docker daemon, in your case it seems that your docker daemon is not responding to the request. So to make sure,perform “sudo docker -d” to check if the Docker daemon is running on your machine or not.
    Also check that, the path of the certificate you set correctly and value of the TLS_VERIFY is TRUE.

    Go through the documentation [1] for the installation of Docker on MacOS

    [1] https://docs.docker.com/installation/mac/

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.