Golang:管理VM应用程序的预览返回错误

前端之家收集整理的这篇文章主要介绍了Golang:管理VM应用程序的预览返回错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我试图使用gcloud preview app run命令预览Go Docker(App Engine ManagedVM)应用程序.

但我不断得到这个错误

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]

我已经确认docker是启动并运行使用boot2docker状态返回运行这是工作之前,但机器重新启动后,似乎没有任何工作.有任何想法吗?

主要问题是:
File "/Users/jwesonga/google-cloud-sdk/platform/google_appengine
       /lib/requests/requests/adapters.py",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]

当您有代理时通常是这种情况,并在pip issue 1805中进行了讨论

它应该在pip1.6中固定,但是为了防止这种情况,您可以尝试使用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.

猜你在找的Go相关文章