Google Managed VM error - custom entry point

人盡茶涼 提交于 2019-12-24 15:23:53

问题


I'm running a custom managed VM with PHP, HHVM, nginx, Centos.

I'm having issues running it locally and keep getting the

ValueError: The --custom_entrypoint flag must be set for custom runtimes

issue. This happens if I use 'dev_appserver.py app.yaml' or 'gcloud preview app run app.yaml' gcloud -v produces the following:

$: gcloud -v

Google Cloud SDK 0.9.82

I have also tried fixing the SDK version as per: Running node.js on google cloud, but error running with docker

This results in:

Please check if the environment variables DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. If you are using boot2docker, you can set them up by executing the commands that are shown by: boot2docker shellinit

I'm not using boot2docker and Docker is running with 'docker -d -H tcp://localhost:2376' and

Docker Info:

$ docker info

Containers: 3

Images: 137

Storage Driver: aufs

Root Dir: /var/lib/docker/aufs

Backing Filesystem: extfs

Dirs: 143

Execution Driver: native-0.2

Kernel Version: 3.19.0-31-generic

Operating System: Ubuntu 15.04

CPUs: 4

Total Memory: 11.43 GiB

Enviroment Variables:

$ echo $DOCKER_HOST && echo $DOCKER_CERT_PATH && $DOCKER_TLS_VERIFY

tcp://localhost:2376

/home/mgane/ca

1

Or How to fix "`The --custom_entrypoint flag must be set for custom runtimes`"?

This results in the same issues. Commenting out lines in the python scripts just creates more mess and even more errors.

What am I supposed to actually specify as the custom endpoint when running nginx / hhvm? The image works fine when running with docker. The docs write as follows for custom entrypoint:

--custom-entrypoint CUSTOM_ENTRYPOINT

Specify an entrypoint for custom runtime modules. This is required when such modules are present. Include "{port}" in the string (without quotes) to pass the port number in as an argument. For instance: --custom_entrypoint="gunicorn -b localhost:{port} mymodule:application"

I've tried something like

$ gcloud preview app run app.yaml --custom-entrypoint="php -v"

which then runs the image, but all I get is 503 errors.

Does anyone know what the entrypoint command for a custom nginx one should be? Google has a hello-world docker here: https://github.com/GoogleCloudPlatform/appengine-nginx-hello

Thanks!


回答1:


This issue appears to have gone away now. Partly due to a misconfiguration by me on my app.yaml still being too close to what I had for PHP AppEngine

The Google cloud SDK is currently version 0.9.84

My app.yaml now looks as follows:

runtime: custom
vm: true
api_version: 1
threadsafe: yes

manual_scaling:
  instances: 1

vm_settings:
  machine_type: f1-micro

vm_health_check:
  enable_health_check: false

handlers:
- url: .*
  script: nothing.php

It should be noted that 'nothing.php' does not exist. I can test local deployments by simply running the docker image locally. They deploy to Google Cloud pretty well now thanks to the updates over the past few weeks.

The last line in my Dockerfile is to run supervisor in the foreground:

# Executing supervisordnow
CMD ["supervisord", "-n"]

Hope this helps someone else!



来源:https://stackoverflow.com/questions/33255674/google-managed-vm-error-custom-entry-point

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!