gcloud应用程序在新python控制盘发布后部署超时

2024-06-11 07:19:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试部署我的flask应用程序,10分钟后它一直超时

我认为这与上周发布的新python wheel版本有关,因为查看构建日志,它说:

starting build "de61ff4e-c716-405a-8082-6c7848dbda61"

FETCHSOURCE
BUILD
Starting Step #0 - "fetcher"
Step #0 - "fetcher": Already have image (with digest): gcr.io/cloud-builders/gcs-fetcher
Step #0 - "fetcher": Fetching manifest gs://staging.****.appspot.com/ae/49b5cdc8-8797-480f-a192-4b39b9243186/manifest.json.
Step #0 - "fetcher": Processing 78 files.
Step #0 - "fetcher": ******************************************************
Step #0 - "fetcher": Status:                      SUCCESS
Step #0 - "fetcher": Started:                     2020-08-22T19:14:59Z
Step #0 - "fetcher": Completed:                   2020-08-22T19:15:00Z
Step #0 - "fetcher": Requested workers:    200
Step #0 - "fetcher": Actual workers:        78
Step #0 - "fetcher": Total files:           78
Step #0 - "fetcher": Total retries:          0
Step #0 - "fetcher": GCS timeouts:           0
Step #0 - "fetcher": MiB downloaded:         5.83 MiB
Step #0 - "fetcher": MiB/s throughput:      18.39 MiB/s
Step #0 - "fetcher": Time for manifest:    241.57 ms
Step #0 - "fetcher": Total time:             0.56 s
Step #0 - "fetcher": ******************************************************
Finished Step #0 - "fetcher"
Starting Step #1 - "builder"
Step #1 - "builder": Pulling image: gcr.io/gae-runtimes/python37_app_builder:python37_20200708_3_7_7_RC00
Step #1 - "builder": python37_20200708_3_7_7_RC00: Pulling from gae-runtimes/python37_app_builder
Step #1 - "builder": 5e0f2488a094: Already exists
Step #1 - "builder": 07013743b8c6: Already exists
Step #1 - "builder": 3c2cba919283: Already exists
Step #1 - "builder": 3d34396a5442: Already exists
Step #1 - "builder": 541e48a6a2b5: Already exists
Step #1 - "builder": 34f928489dc6: Already exists
Step #1 - "builder": 64208d02cb2c: Already exists
Step #1 - "builder": 1b7c7906717c: Already exists
Step #1 - "builder": 610bcfea19fe: Already exists
Step #1 - "builder": fbad6c6a4dc9: Already exists
Step #1 - "builder": 9c961dbc83b2: Already exists
Step #1 - "builder": f9b980338cb7: Pulling fs layer
Step #1 - "builder": 32f4c72949a9: Pulling fs layer
Step #1 - "builder": 1e4f6884b155: Pulling fs layer
Step #1 - "builder": 1dc93c875a92: Pulling fs layer
Step #1 - "builder": d264d50f9104: Pulling fs layer
Step #1 - "builder": 08424b66c21d: Pulling fs layer
Step #1 - "builder": 323c379c56ef: Pulling fs layer
Step #1 - "builder": 2595c4c95d5a: Pulling fs layer
Step #1 - "builder": 3a50796ccf5f: Pulling fs layer
Step #1 - "builder": 8bdf0d14cff4: Pulling fs layer
Step #1 - "builder": 98c251a31e35: Pulling fs layer
Step #1 - "builder": 1dc93c875a92: Waiting
Step #1 - "builder": d264d50f9104: Waiting
Step #1 - "builder": 08424b66c21d: Waiting
Step #1 - "builder": 323c379c56ef: Waiting
Step #1 - "builder": 2595c4c95d5a: Waiting
Step #1 - "builder": 3a50796ccf5f: Waiting
Step #1 - "builder": 8bdf0d14cff4: Waiting
Step #1 - "builder": 98c251a31e35: Waiting
Step #1 - "builder": f9b980338cb7: Verifying Checksum
Step #1 - "builder": f9b980338cb7: Download complete
Step #1 - "builder": 32f4c72949a9: Verifying Checksum
Step #1 - "builder": 32f4c72949a9: Download complete
Step #1 - "builder": d264d50f9104: Verifying Checksum
Step #1 - "builder": d264d50f9104: Download complete
Step #1 - "builder": f9b980338cb7: Pull complete
Step #1 - "builder": 32f4c72949a9: Pull complete
Step #1 - "builder": 1e4f6884b155: Verifying Checksum
Step #1 - "builder": 1e4f6884b155: Download complete
Step #1 - "builder": 1dc93c875a92: Verifying Checksum
Step #1 - "builder": 1dc93c875a92: Download complete
Step #1 - "builder": 323c379c56ef: Verifying Checksum
Step #1 - "builder": 323c379c56ef: Download complete
Step #1 - "builder": 08424b66c21d: Verifying Checksum
Step #1 - "builder": 08424b66c21d: Download complete
Step #1 - "builder": 8bdf0d14cff4: Verifying Checksum
Step #1 - "builder": 8bdf0d14cff4: Download complete
Step #1 - "builder": 2595c4c95d5a: Verifying Checksum
Step #1 - "builder": 2595c4c95d5a: Download complete
Step #1 - "builder": 3a50796ccf5f: Verifying Checksum
Step #1 - "builder": 3a50796ccf5f: Download complete
Step #1 - "builder": 98c251a31e35: Verifying Checksum
Step #1 - "builder": 98c251a31e35: Download complete
Step #1 - "builder": 1e4f6884b155: Pull complete
Step #1 - "builder": 1dc93c875a92: Pull complete
Step #1 - "builder": d264d50f9104: Pull complete
Step #1 - "builder": 08424b66c21d: Pull complete
Step #1 - "builder": 323c379c56ef: Pull complete
Step #1 - "builder": 2595c4c95d5a: Pull complete
Step #1 - "builder": 3a50796ccf5f: Pull complete
Step #1 - "builder": 8bdf0d14cff4: Pull complete
Step #1 - "builder": 98c251a31e35: Pull complete
Step #1 - "builder": Digest: sha256:fae954d6160931d7a433cd4c8228429d18b0431900e259b9f9288580d2a910a5
Step #1 - "builder": Status: Downloaded newer image for gcr.io/gae-runtimes/python37_app_builder:python37_20200708_3_7_7_RC00
Step #1 - "builder": gcr.io/gae-runtimes/python37_app_builder:python37_20200708_3_7_7_RC00
Step #1 - "builder": 2020/08/22 19:15:09 Starting commonbuild with args [commonbuild --runtime=python37 --entrypoint=gunicorn -b :$PORT app:app --src=/workspace --config-file=/.googleconfig/app_start.json -- python3 /parse_workspace/build.py --parser_script=/usr/local/bin/ftl.par --src= --entrypoint=gunicorn -b :$PORT app:app --name=us.gcr.io/****/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186 --directory=/workspace --destination=/srv --cache-repository=us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d --cache --builder-output-path="" --additional-directory=/.googleconfig --python-cmd=/opt/python3.7/bin/python3.7 --pip-cmd=/env/bin/python3.7 -m pip --venv-cmd=/opt/python3.7/bin/python3.7 -m venv /env -v=DEBUG --base=us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00].
Step #1 - "builder": 2020/08/22 19:15:09 Writing configuration file "/.googleconfig/app_start.json".
Step #1 - "builder": 2020/08/22 19:15:09 Invoking build command "python3 /parse_workspace/build.py --parser_script=/usr/local/bin/ftl.par --src= --entrypoint=gunicorn -b :$PORT app:app --name=us.gcr.io/****/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186 --directory=/workspace --destination=/srv --cache-repository=us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d --cache --builder-output-path=\"\" --additional-directory=/.googleconfig --python-cmd=/opt/python3.7/bin/python3.7 --pip-cmd=/env/bin/python3.7 -m pip --venv-cmd=/opt/python3.7/bin/python3.7 -m venv /env -v=DEBUG --base=us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00".
Step #1 - "builder": 22 Aug 2020 19:15:09 INFO     Arguments: ['--parser_script=/usr/local/bin/ftl.par', '--src=', '--entrypoint=gunicorn -b :$PORT app:app', '--name=us.gcr.io/****/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186', '--directory=/workspace', '--destination=/srv', '--cache-repository=us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d', '--cache', '--builder-output-path=""', '--additional-directory=/.googleconfig', '--python-cmd=/opt/python3.7/bin/python3.7', '--pip-cmd=/env/bin/python3.7 -m pip', '--venv-cmd=/opt/python3.7/bin/python3.7 -m venv /env', '-v=DEBUG', '--base=us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00']
Step #1 - "builder": 22 Aug 2020 19:15:09 INFO     Unparsed arguments: ['--name=us.gcr.io/****/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186', '--directory=/workspace', '--destination=/srv', '--cache-repository=us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d', '--cache', '--builder-output-path=""', '--additional-directory=/.googleconfig', '--python-cmd=/opt/python3.7/bin/python3.7', '--pip-cmd=/env/bin/python3.7 -m pip', '--venv-cmd=/opt/python3.7/bin/python3.7 -m venv /env', '-v=DEBUG', '--base=us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00']
Step #1 - "builder": 22 Aug 2020 19:15:09 INFO     Executing ['/usr/local/bin/ftl.par', '--name=us.gcr.io/****/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186', '--directory=/workspace', '--destination=/srv', '--cache-repository=us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d', '--cache', '--builder-output-path=""', '--additional-directory=/.googleconfig', '--python-cmd=/opt/python3.7/bin/python3.7', '--pip-cmd=/env/bin/python3.7 -m pip', '--venv-cmd=/opt/python3.7/bin/python3.7 -m venv /env', '-v=DEBUG', '--base=us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00']
Step #1 - "builder": INFO     FTL version python-v0.17.0
Step #1 - "builder": INFO     Beginning FTL build for python
Step #1 - "builder": INFO     FTL arg passed: virtualenv_dir /env
Step #1 - "builder": INFO     FTL arg passed: ttl 168
Step #1 - "builder": INFO     FTL arg passed: python_cmd /opt/python3.7/bin/python3.7
Step #1 - "builder": INFO     FTL arg passed: cache True
Step #1 - "builder": INFO     FTL arg passed: virtualenv_cmd virtualenv
Step #1 - "builder": INFO     FTL arg passed: entrypoint None
Step #1 - "builder": INFO     FTL arg passed: exposed_ports None
Step #1 - "builder": INFO     FTL arg passed: pip_cmd /env/bin/python3.7 -m pip
Step #1 - "builder": INFO     FTL arg passed: tar_base_image_path None
Step #1 - "builder": INFO     FTL arg passed: export_cache_stats False
Step #1 - "builder": INFO     FTL arg passed: builder_output_path ""
Step #1 - "builder": INFO     FTL arg passed: destination_path /srv
Step #1 - "builder": INFO     FTL arg passed: sh_c_prefix False
Step #1 - "builder": INFO     FTL arg passed: base us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00
Step #1 - "builder": INFO     FTL arg passed: cache_key_version v0.17.0
Step #1 - "builder": INFO     FTL arg passed: cache_salt 
Step #1 - "builder": INFO     FTL arg passed: cache_repository us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d
Step #1 - "builder": INFO     FTL arg passed: venv_cmd /opt/python3.7/bin/python3.7 -m venv /env
Step #1 - "builder": INFO     FTL arg passed: name us.gcr.io/****/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186
Step #1 - "builder": INFO     FTL arg passed: global_cache False
Step #1 - "builder": INFO     FTL arg passed: upload True
Step #1 - "builder": INFO     FTL arg passed: fail_on_error True
Step #1 - "builder": INFO     FTL arg passed: output_path None
Step #1 - "builder": INFO     FTL arg passed: directory /workspace
Step #1 - "builder": INFO     FTL arg passed: additional_directory /.googleconfig
Step #1 - "builder": INFO     FTL arg passed: verbosity DEBUG
Step #1 - "builder": INFO     starting: full build
Step #1 - "builder": INFO     starting: builder initialization
Step #1 - "builder": INFO     Loading Docker credentials for repository 'us.gcr.io/gae-runtimes/python37:python37_20200708_3_7_7_RC00'
Step #1 - "builder": INFO     Loading Docker credentials for repository 'us.gcr.io/***/app-engine-tmp/app/ttl-2h:49b5cdc8-8797-480f-a192-4b39b9243186'
Step #1 - "builder": INFO     builder initialization took 0 seconds
Step #1 - "builder": INFO     starting: build process for FTL image
Step #1 - "builder": INFO     starting: checking_cached_interpreter_layer
Step #1 - "builder": INFO     starting: check python version
Step #1 - "builder": INFO     `python version` full cmd:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO     `python version` stderr:
Step #1 - "builder": 
Step #1 - "builder": INFO     check python version took 0 seconds
Step #1 - "builder": DEBUG    Checking cache for cache_key 508bda97efee1bbdd24161a912e8d8258fcf9722d506593f12b3189daed6dc6f
Step #1 - "builder": INFO     Found cached base image: us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d/python-cache:508bda97efee1bbdd24161a912e8d8258fcf9722d506593f12b3189daed6dc6f.
Step #1 - "builder": INFO     {"architecture": "amd64", "author": "Bazel", "config": {}, "created": "2020-08-22T19:00:00Z", "env": "/env", "history": [{"author": "Bazel", "created": "1970-01-01T00:00:00Z", "created_by": "bazel build ..."}], "os": "linux", "rootfs": {"diff_ids": ["sha256:d9156d9598de4edb3d24af0e1b87e0469e7436828f396bd330e360e865318469"]}}
Step #1 - "builder": INFO     Found dependency layer for 508bda97efee1bbdd24161a912e8d8258fcf9722d506593f12b3189daed6dc6f in local cache
Step #1 - "builder": INFO     Found cached dependency layer for 508bda97efee1bbdd24161a912e8d8258fcf9722d506593f12b3189daed6dc6f
Step #1 - "builder": INFO     {"architecture": "amd64", "author": "Bazel", "config": {}, "created": "2020-08-22T19:00:00Z", "env": "/env", "history": [{"author": "Bazel", "created": "1970-01-01T00:00:00Z", "created_by": "bazel build ..."}], "os": "linux", "rootfs": {"diff_ids": ["sha256:d9156d9598de4edb3d24af0e1b87e0469e7436828f396bd330e360e865318469"]}}
Step #1 - "builder": INFO     starting: check python version
Step #1 - "builder": INFO     `python version` full cmd:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO     `python version` stderr:
Step #1 - "builder": 
Step #1 - "builder": INFO     check python version took 0 seconds
Step #1 - "builder": INFO     [CACHE][HIT] v0.17.0:PYTHON (interpreter)->508bda97efee1bbdd24161a912e8d8258fcf9722d506593f12b3189daed6dc6f
Step #1 - "builder": INFO     checking_cached_interpreter_layer took 0 seconds
Step #1 - "builder": INFO     starting: checking_cached_requirements.txt_layer
Step #1 - "builder": INFO     descriptor_contents:
Step #1 - "builder": setuptools==49.6.0
Step #1 - "builder": eventbrite==3.3.5
Step #1 - "builder": flask==1.1.2
Step #1 - "builder": flask_cors==3.0.8
Step #1 - "builder": pymysql==0.9.3
Step #1 - "builder": requests==2.23.0
Step #1 - "builder": stravalib==0.10.2
Step #1 - "builder": google-cloud-storage==1.28.1
Step #1 - "builder": opencv-python
Step #1 - "builder": numpy==1.19.1
Step #1 - "builder": 
Step #1 - "builder": gunicorn==20.0.4
Step #1 - "builder": 
Step #1 - "builder": INFO     new_descriptor_contents: 
Step #1 - "builder": setuptools==49.6.0
Step #1 - "builder": eventbrite==3.3.5
Step #1 - "builder": flask==1.1.2
Step #1 - "builder": flask_cors==3.0.8
Step #1 - "builder": pymysql==0.9.3
Step #1 - "builder": requests==2.23.0
Step #1 - "builder": stravalib==0.10.2
Step #1 - "builder": google-cloud-storage==1.28.1
Step #1 - "builder": opencv-python
Step #1 - "builder": numpy==1.19.1
Step #1 - "builder": 
Step #1 - "builder": gunicorn==20.0.4
Step #1 - "builder": 
Step #1 - "builder": INFO     starting: check python version
Step #1 - "builder": INFO     `python version` full cmd:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO     `python version` stderr:
Step #1 - "builder": 
Step #1 - "builder": INFO     check python version took 0 seconds
Step #1 - "builder": DEBUG    Checking cache for cache_key 9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f
Step #1 - "builder": INFO     No cached base image found for entry: us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d/python-cache:9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f.
Step #1 - "builder": INFO     Cache miss on local cache for us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d/python-cache:9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f
Step #1 - "builder": INFO     No cached dependency layer for 9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f
Step #1 - "builder": INFO     descriptor_contents:
Step #1 - "builder": setuptools==49.6.0
Step #1 - "builder": eventbrite==3.3.5
Step #1 - "builder": flask==1.1.2
Step #1 - "builder": flask_cors==3.0.8
Step #1 - "builder": pymysql==0.9.3
Step #1 - "builder": requests==2.23.0
Step #1 - "builder": stravalib==0.10.2
Step #1 - "builder": google-cloud-storage==1.28.1
Step #1 - "builder": opencv-python
Step #1 - "builder": numpy==1.19.1
Step #1 - "builder": 
Step #1 - "builder": gunicorn==20.0.4
Step #1 - "builder": 
Step #1 - "builder": INFO     new_descriptor_contents: 
Step #1 - "builder": setuptools==49.6.0
Step #1 - "builder": eventbrite==3.3.5
Step #1 - "builder": flask==1.1.2
Step #1 - "builder": flask_cors==3.0.8
Step #1 - "builder": pymysql==0.9.3
Step #1 - "builder": requests==2.23.0
Step #1 - "builder": stravalib==0.10.2
Step #1 - "builder": google-cloud-storage==1.28.1
Step #1 - "builder": opencv-python
Step #1 - "builder": numpy==1.19.1
Step #1 - "builder": 
Step #1 - "builder": gunicorn==20.0.4
Step #1 - "builder": 
Step #1 - "builder": INFO     starting: check python version
Step #1 - "builder": INFO     `python version` full cmd:
Step #1 - "builder": /opt/python3.7/bin/python3.7 --version
Step #1 - "builder": INFO     `python version` stderr:
Step #1 - "builder": 
Step #1 - "builder": INFO     check python version took 0 seconds
Step #1 - "builder": INFO     [CACHE][MISS] v0.17.0:PYTHON (requirements)->9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f
Step #1 - "builder": INFO     checking_cached_requirements.txt_layer took 0 seconds
Step #1 - "builder": INFO     starting: create_venv
Step #1 - "builder": INFO     create_venv /opt/python3.7/bin/python3.7 -m venv /env
Step #1 - "builder": INFO     `create_venv` stdout:
Step #1 - "builder": 
Step #1 - "builder": INFO     create_venv took 2 seconds
Step #1 - "builder": INFO     descriptor_contents:
Step #1 - "builder": setuptools==49.6.0
Step #1 - "builder": eventbrite==3.3.5
Step #1 - "builder": flask==1.1.2
Step #1 - "builder": flask_cors==3.0.8
Step #1 - "builder": pymysql==0.9.3
Step #1 - "builder": requests==2.23.0
Step #1 - "builder": stravalib==0.10.2
Step #1 - "builder": google-cloud-storage==1.28.1
Step #1 - "builder": opencv-python
Step #1 - "builder": numpy==1.19.1
Step #1 - "builder": 
Step #1 - "builder": gunicorn==20.0.4
Step #1 - "builder": 
Step #1 - "builder": INFO     new_descriptor_contents: 
Step #1 - "builder": setuptools==49.6.0
Step #1 - "builder": eventbrite==3.3.5
Step #1 - "builder": flask==1.1.2
Step #1 - "builder": flask_cors==3.0.8
Step #1 - "builder": pymysql==0.9.3
Step #1 - "builder": requests==2.23.0
Step #1 - "builder": stravalib==0.10.2
Step #1 - "builder": google-cloud-storage==1.28.1
Step #1 - "builder": opencv-python
Step #1 - "builder": numpy==1.19.1
Step #1 - "builder": 
Step #1 - "builder": gunicorn==20.0.4
Step #1 - "builder": 
Step #1 - "builder": INFO     starting: pip_install_wheel
Step #1 - "builder": INFO     pip_install_wheel pip install wheel
Step #1 - "builder": INFO     `pip_install_wheel` stdout:
Step #1 - "builder": Collecting wheel
Step #1 - "builder":   Downloading https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
Step #1 - "builder": Installing collected packages: wheel
Step #1 - "builder": Successfully installed wheel-0.35.1
Step #1 - "builder": 
Step #1 - "builder": INFO     `pip_install_wheel` had stderr output:
Step #1 - "builder": WARNING: You are using pip version 19.2.3, however version 20.2.2 is available.
Step #1 - "builder": You should consider upgrading via the 'pip install --upgrade pip' command.
Step #1 - "builder": 
Step #1 - "builder": INFO     pip_install_wheel took 0 seconds
Step #1 - "builder": INFO     starting: pip_download_wheels
Step #1 - "builder": INFO     pip_download_wheels /env/bin/python3.7 -m pip wheel -w /tmp/tmpOAyfFd/wheel -r requirements.txt --disable-pip-version-check
TIMEOUT
ERROR: context deadline exceeded

当运行gcloud app deploy --verbosity=debug时,我得到以下信息:

DEBUG: Operation [apps/***/operations/49b5cdc8-8797-480f-a192-4b39b9243186] not complete. Waiting to retry.
Updating service [default]...⠛DEBUG: Operation [apps/***/operations/49b5cdc8-8797-480f-a192-4b39b9243186] not complete. Waiting to retry
...(repeats 'Updating service line for 10 minutes) ...
Updating service [default]...⠏DEBUG: Operation [apps/***/operations/49b5cdc8-8797-480f-a192-4b39b9243186] complete. Result: {
    "done": true,
    "error": {
        "code": 4,
        "message": "Cloud build did not succeed within 10m.\nBuild error details: Build error details not available.\nFull build logs: https://console.cloud.google.com/cloud-build/builds/de61ff4e-c716-405a-8082-6c7848dbda61?project=XXXX"
    },
    "metadata": {
        "@type": "type.googleapis.com/google.appengine.v1.OperationMetadataV1",
        "endTime": "2020-08-22T19:24:59.819Z",
        "insertTime": "2020-08-22T19:14:55.638Z",
        "method": "google.appengine.v1.Versions.CreateVersion",
        "target": "apps/XXXX/services/default/versions/20200822t121451",
        "user": "XXXX"
    },
    "name": "apps/XXXX/operations/49b5cdc8-8797-480f-a192-4b39b9243186"
}
Updating service [default]...failed.
DEBUG: (gcloud.app.deploy) Error Response: [4] Cloud build did not succeed within 10m.
Build error details: Build error details not available.
Full build logs: https://console.cloud.google.com/cloud-build/builds/de61ff4e-c716-405a-8082-6c7848dbda61?project=XXXX
Traceback (most recent call last):
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/calliope/cli.py", line 983, in Execute
    resources = calliope_command.Run(cli=self, args=args)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/calliope/backend.py", line 808, in Run
    resources = command_instance.Run(args)
  File "/Users/apprentice/google-cloud-sdk/lib/surface/app/deploy.py", line 121, in Run
    default_strategy=flex_image_build_option_default))
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 651, in RunDeploy
    ignore_file=args.ignore_file)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/command_lib/app/deploy_util.py", line 437, in Deploy
    extra_config_settings)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/appengine_api_client.py", line 208, in DeployService
    poller=done_poller)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 314, in WaitForOperation
    sleep_ms=retry_interval)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 264, in WaitFor
    sleep_ms, _StatusUpdate)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 326, in PollUntilDone
    sleep_ms=sleep_ms)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/core/util/retry.py", line 229, in RetryOnResult
    if not should_retry(result, state):
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/api_lib/util/waiter.py", line 320, in _IsNotDone
    return not poller.IsDone(operation)
  File "/Users/apprentice/google-cloud-sdk/lib/googlecloudsdk/api_lib/app/operations_util.py", line 183, in IsDone
    encoding.MessageToPyValue(operation.error)))
googlecloudsdk.api_lib.app.operations_util.OperationError: Error Response: [4] Cloud build did not succeed within 10m.
Build error details: Build error details not available.

与成功运行不同之处在于

Step #1 - "builder": DEBUG    Checking cache for cache_key 9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f
Step #1 - "builder": INFO     No cached base image found for entry: us.gcr.io/****/app-engine-tmp/build-cache/ttl-7d/python-cache:9395822284b48942a40b14bdb26b7602d369b318ad7ed11a62d30db4a18e2c7f.

我尝试从我的机器上手动删除完整的python缓存,将gcloud app deploy的运行时间设置为10分钟以上(根据他们的支持fourm,这显然不是google正在积极进行的工作),当然还尝试了几次

还尝试将cache_键作为标记添加到现有python缓存中。这不起作用

requirements.txt:

eventbrite==3.3.5
flask==1.1.2
flask_cors==3.0.8
pymysql==0.9.3
requests==2.23.0
stravalib==0.10.2
google-cloud-storage==1.28.1
opencv-python==4.4.0.42
numpy==1.19.1

gunicorn==20.0.4

(我只是在所有东西都坏了之后才把它们钉住,我使用了我的pip列表中的版本)

app.yaml:

runtime: python37

entrypoint: gunicorn -b :$PORT app:app
default_expiration: 0m

# [START handlers]
handlers:
  - url: /.*
    script: auto
  - url: /.*
    static_dir: build
    http_headers:
      Cache-Control: 'no-cache'

env_variables:
  ...

更新: 这个问题似乎与opencv python有关。删除依赖项允许应用程序部署,但我正在使用依赖项。8月16日发布了opencv python。我正在反复浏览最近发布的版本,看看它是否有效


Tags: pipiobuildinfoappcachebinversion
2条回答

这可以通过将opencv-python的版本固定到2020年4月发布的4.2.0.34来解决

您是否尝试过设置此选项:

gcloud config set app/cloud_build_timeout 1200s

我遇到了一个类似的问题,提高了gcloud配置值,为我解决了这个问题

我不确定你说这话的意思是不是这样:

I tried ... setting the run time of gcloud app deploy to greater than 10 minutes (that apparently isn't something that google is actively working on according to their support fourm), and of course trying several serveral times.

相关问题 更多 >