duanfuxing2212 2015-01-10 23:00
浏览 43

托管VM模块--enable-mvm-logs导致崩溃

I would like to view logs for one of my Managed VM Modules in the Google Cloud Platform during development (before deploying), and I noticed this command should allow it:

gcloud preview app run --enable-mvm-logs <module name>

However, adding that switch to the usual run command causes the module to crash during load:

INFO: Go VM Deployment process failed: [Errno 104] Connection reset by peer
ERROR: Internal error while starting instance.
Traceback (most recent call last):
  File "/home/bakeonandham/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/module.py", line 1823, in _start_instance
    if not inst.start():
  File "/home/bakeonandham/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/instance.py", line 274, in start
    self._runtime_proxy.start()
  File "/home/bakeonandham/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_proxy_go.py", line 130, in start
    self._vm_runtime_proxy.start(dockerfile_dir=dst_deployment_dir)
  File "/home/bakeonandham/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/vm_runtime_proxy.py", line 196, in start
    self._module_configuration.major_version, runtime_config.instance_id)
  File "/home/bakeonandham/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/log_manager.py", line 172, in add
    _create_table(l)
  File "/home/bakeonandham/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/log_manager.py", line 138, in _create_table
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1073, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 415, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer

Without the switch, my app runs and deploys fine, and once deployed, the data i'm logging is available in the Dev console.

I did find a way to view logs during development in the terminal where I launched the dev server from, though it's not ideal:

If I use the --verbosity debug flag my output shows up, but only with loglevel debug even though my logged stuff are being logged as Errors. Any other verbosity level doesn't show the output at all.

I am using the Go runtime by the way.

So to summarize, the only way I can seem to view logs using the local dev server environment for Managed VM, is to launch using this command:

gcloud --verbosity debug preview app run <module name>

Even though I log with loglevel Error, if I set --verbosity error, the output never shows in the terminal or anywhere else.

Has anyone been able to get the --enable-mvm-logs switch to work, or is it broken? Any ideas on a better way to view Managed VM log output?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 2020长安杯与连接网探
    • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
    • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
    • ¥16 mybatis的代理对象无法通过@Autowired装填
    • ¥15 可见光定位matlab仿真
    • ¥15 arduino 四自由度机械臂
    • ¥15 wordpress 产品图片 GIF 没法显示
    • ¥15 求三国群英传pl国战时间的修改方法
    • ¥15 matlab代码代写,需写出详细代码,代价私
    • ¥15 ROS系统搭建请教(跨境电商用途)