-2

我想尝试“适用于 COVID-19 的 Verily Pathfinder 虚拟代理模板”(https://github.com/GoogleCloudPlatform/covid19-rapid-response-demo

我试过了,但遇到了一些困难。请问你能帮帮我吗?

我使用 Windows 10、适用于 Linux 的 Windows 子系统、Debian 10 和 [Google Cloud SDK 296.0.1、alpha 2020.06.10、app-engine-go app-engine-python 1.9.91、app-engine-python-extras 1.9.91 ,测试版 2020.06.10,bq 2.0.57,核心 2020.06.10,gsutil 4.51,kubectl 2020.06.10]

我遵循了 github 的 README。 https://github.com/GoogleCloudPlatform/covid19-rapid-response-demo


[要求]

一个 GCP 项目,在项目中设置了现有的 Dialogflow 代理,我们将其称为 PROJECTDIALOGFLOW 第二个 GCP 项目将使用 AppEngine 托管此应用程序,我们将其称为 PROJECTAPPENGINE 您必须以有权访问这两个项目的用户身份登录 gcloud . 安装 gcloud SDK 安装 node.js 安装 make

【开发要求】

运行 npm install -g @angular/cli

[设置]

在 /Makefile 中设置 PROJECTDIALOGFLOW 和 PROJECTAPPENGINE 在 /server/app.yaml 中设置 PROJECTDIALOGFLOW 运行 make init

[发展]

运行 export GOOGLE_APPLICATION_CREDENTIALS=[替换为此应用的路径]/creds/creds.json 运行 make dev


我通过了这些说明并且没有问题。但是,当我部署时,我收到一条错误消息。


[部署]

运行 make 部署


这就是我在终端中得到的。

kazu@DESKTOP-IBOI222:~/covid19-rapid-response-demo$ make deploy
gcloud config set project "covid19agent"
Updated property [core/project].
rm -rf server/dist
cd chat-interface && ng build --prod
Your global Angular CLI version (9.1.8) is greater than your local
version (9.0.7). The local Angular CLI version is used.

To disable this warning use "ng config -g cli.warnings.versionMismatch false".
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

chunk {2} polyfills-es2015.de6ca55401f7d78277d5.js (polyfills) 36.1 kB [initial] [rendered]
chunk {0} runtime-es2015.0811dcefd377500b5b1a.js (runtime) 1.45 kB [entry] [rendered]
chunk {0} runtime-es5.0811dcefd377500b5b1a.js (runtime) 1.45 kB [entry] [rendered]
chunk {3} polyfills-es5.82bdfba5af5aad3535ae.js (polyfills-es5) 129 kB [initial] [rendered]
chunk {1} main-es2015.37720bb28c36281f1d08.js (main) 705 kB [initial] [rendered]
chunk {1} main-es5.37720bb28c36281f1d08.js (main) 765 kB [initial] [rendered]
chunk {4} styles.904025a394295e3f0808.css (styles) 170 bytes [initial] [rendered]
Date: 2020-06-15T08:13:44.763Z - Hash: b7cc345f99b4ec3d4fbf - Time: 77431ms
cd server && gcloud app deploy -q
Services to deploy:

descriptor: [/home/kazu/covid19-rapid-response-demo/server/app.yaml]
source: [/home/kazu/covid19-rapid-response-demo/server]
target project: [covid19agent]
target service: [default]
target version: [20200615t171408]
target url: [https://covid19agent.uc.r.appspot.com]


Beginning deployment of service [default]...
Created .gcloudignore file. See `gcloud topic gcloudignore` for details.
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 36 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Cloud build 2d33eb05-376c-4fbb-a67b-470bbf635e22 status: FAILURE
Build error details: {"error":"errorType":"BuildError","canonicalCode":"INVALID_ARGUMENT","errorId":"E93BE526","errorMessage":
"2020/06/15 08:14:40 Building /tmp/staging/srv, with main package at ., saving to /tmp/staging/usr/local/bin/start\n2020/06/15
08:14:40 Running \u0026{/usr/local/go/bin/go [go build -o /tmp/staging/usr/local/bin/start .] [PATH=/go/bin:/usr/local/go/bin:/
builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ad4de922422c HOME=/builder/
home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tm
p/cache GOPATH=/go] /tmp/staging/srv \u003cnil\u003e \u003cnil\u003e \u003cnil\u003e [] \u003cnil\u003e \u003cnil\u003e \u003cn
il\u003e \u003cnil\u003e \u003cnil\u003e false [] [] [] [] \u003cnil\u003e \u003cnil\u003e}\n2020/06/15 08:16:01 Wrote build ou
tput to /builder/outputs/output\n2020/06/15 08:16:01 Failed to build app: [go build -o /tmp/staging/usr/local/bin/start .] with
env [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bi
n HOSTNAME=ad4de922422c HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/
GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache GOPATH=/go] failed: err=exit status 1, out=\"go: finding github.com/golang/protob
uf v1.4.0-rc.4\\ngo: finding google.golang.org/protobuf v1.20.1\\ngo: finding google.golang.org/genproto v0.0.0-20200324203455-
a04cca1dde73\\ngo: finding cloud.google.com/go v0.55.0\\ngo: finding google.golang.org/protobuf v1.20.1-0.20200309200217-e05f78
9c0967\\ngo: finding github.com/google/go-cmp v0.4.0\\ngo: finding golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543\\ngo
: finding google.golang.org/genproto v0.0.0-20200317114155-1f3552e48f24\\ngo: finding golang.org/x/lint v0.0.0-20200302205851-7
38671d3881b\\ngo: finding google.golang.org/grpc v1.28.0\\ngo: finding golang.org/x/net v0.0.0-20200301022130-244492dfa37a\\ngo
: finding golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d\\ngo: finding honnef.co/go/tools v0.0.1-2020.1.3\\ngo: finding gi
thub.com/googleapis/gax-go/v2 v2.0.5\\ngo: finding cloud.google.com/go/pubsub v1.2.0\\ngo: finding github.com/BurntSushi/toml v
0.3.1\\ngo: finding github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3\\ngo: finding google.golang.org/genproto v0.0.0-
20190819201941-24fa4b261c55\\ngo: finding google.golang.org/api v0.20.0\\ngo: finding cloud.google.com/go/storage v1.6.0\\ngo:
finding github.com/kisielk/gotool v1.0.0\\ngo: finding github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6\\n
go: finding github.com/golang/protobuf v1.3.3\\ngo: finding golang.org/x/tools v0.0.0-20200317043434-63da46f3035e\\ngo: finding
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e\\ngo: finding golang.org/x/net v0.0.0-20200222125558-5a598a2470a
0\\ngo: finding github.com/envoyproxy/protoc-gen-validate v0.1.0\\ngo: finding golang.org/x/tools v0.0.0-20200204074204-1cc6d1e
f6c74\\ngo: finding golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e\\ngo: finding golang.org/x/lint v0.0.0-20200130185559-
910be7a94367\\ngo: finding golang.org/x/net v0.0.0-20190311183353-d8887717615a\\ngo: finding golang.org/x/sys v0.0.0-2019120407
2324-ce4227a45e2e\\ngo: finding go.opencensus.io v0.22.3\\ngo: finding golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5\\ngo
: finding google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90\\ngo: finding github.com/golang/protobuf v1.4.0-rc.2\\n
go: finding github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1\\ngo: finding golang.org/x/mod v0.0.0-20190513183733-4bf6
d317e70e\\ngo: finding google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb\\ngo: finding golang.org/x/oauth2 v0.0.0-2
0180821212333-d2e6202438be\\ngo: finding cloud.google.com/go v0.52.0\\ngo: finding github.com/chzyer/logex v1.1.10\\ngo: findin
g golang.org/x/text v0.3.0\\ngo: finding github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc\\ngo: finding google.golang
.org/grpc v1.27.1\\ngo: finding golang.org/x/net v0.0
Full build logs: https://console.cloud.google.com/cloud-build/builds/2d33eb05-376c-4fbb-a67b-470bbf635e22?project=822303710513
make: *** [Makefile:20: deploy] Error 1

我访问了这个 URL(https://console.cloud.google.com/cloud-build/builds/2d33eb05-376c-4fbb-a67b-470bbf635e22?project=822303710513),这是完整的构建日志。


starting build "2d33eb05-376c-4fbb-a67b-470bbf635e22"

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.covid19agent.appspot.com/ae/64dc67bf-1611-4f7f-93cc-df096803bb14/manifest.json.
Step #0 - "fetcher": Processing 37 files.
Step #0 - "fetcher": ******************************************************
Step #0 - "fetcher": Status:                      SUCCESS
Step #0 - "fetcher": Started:                     2020-06-15T08:14:25Z
Step #0 - "fetcher": Completed:                   2020-06-15T08:14:26Z
Step #0 - "fetcher": Requested workers:    200
Step #0 - "fetcher": Actual workers:        37
Step #0 - "fetcher": Total files:           37
Step #0 - "fetcher": Total retries:          0
Step #0 - "fetcher": GCS timeouts:           0
Step #0 - "fetcher": MiB downloaded:         1.70 MiB
Step #0 - "fetcher": MiB/s throughput:       4.48 MiB/s
Step #0 - "fetcher": Time for manifest:    190.17 ms
Step #0 - "fetcher": Total time:             0.57 s
Step #0 - "fetcher": ******************************************************
Finished Step #0 - "fetcher"
Starting Step #1 - "builder"
Step #1 - "builder": Pulling image: gcr.io/gae-runtimes/go112_app_builder:go112_20200531_1_12_17_RC00
Step #1 - "builder": go112_20200531_1_12_17_RC00: Pulling from gae-runtimes/go112_app_builder
Step #1 - "builder": 4be3a941509a: Already exists
Step #1 - "builder": 6dce392178ba: Already exists
Step #1 - "builder": 3c2cba919283: Already exists
Step #1 - "builder": 962a3a0b7284: Already exists
Step #1 - "builder": 2e3a3f41e49d: Already exists
Step #1 - "builder": 83bf9167be41: Already exists
Step #1 - "builder": 5f28d4da3777: Already exists
Step #1 - "builder": 9d496b5b5fbd: Already exists
Step #1 - "builder": 3fc0f2817de9: Already exists
Step #1 - "builder": d0a1ad8b64b4: Already exists
Step #1 - "builder": 47b9ab73f5d7: Already exists
Step #1 - "builder": 8e7e87b95ad4: Pulling fs layer
Step #1 - "builder": fe6f1b585637: Pulling fs layer
Step #1 - "builder": c1da672172b9: Pulling fs layer
Step #1 - "builder": b25fc0831477: Pulling fs layer
Step #1 - "builder": 3147dd420f16: Pulling fs layer
Step #1 - "builder": b25fc0831477: Waiting
Step #1 - "builder": 3147dd420f16: Waiting
Step #1 - "builder": 8e7e87b95ad4: Verifying Checksum
Step #1 - "builder": 8e7e87b95ad4: Download complete
Step #1 - "builder": fe6f1b585637: Verifying Checksum
Step #1 - "builder": fe6f1b585637: Download complete
Step #1 - "builder": b25fc0831477: Verifying Checksum
Step #1 - "builder": b25fc0831477: Download complete
Step #1 - "builder": 3147dd420f16: Verifying Checksum
Step #1 - "builder": 3147dd420f16: Download complete
Step #1 - "builder": 8e7e87b95ad4: Pull complete
Step #1 - "builder": fe6f1b585637: Pull complete
Step #1 - "builder": c1da672172b9: Verifying Checksum
Step #1 - "builder": c1da672172b9: Download complete
Step #1 - "builder": c1da672172b9: Pull complete
Step #1 - "builder": b25fc0831477: Pull complete
Step #1 - "builder": 3147dd420f16: Pull complete
Step #1 - "builder": Digest: sha256:6dd36941797322f65fdbf4444ce9a7db31d5d64fb499a930ab645de28dcfe781
Step #1 - "builder": Status: Downloaded newer image for gcr.io/gae-runtimes/go112_app_builder:go112_20200531_1_12_17_RC00
Step #1 - "builder": gcr.io/gae-runtimes/go112_app_builder:go112_20200531_1_12_17_RC00
Step #1 - "builder": 2020/06/15 08:14:39 Starting commonbuild with args [commonbuild --runtime=go112 --entrypoint= --src=/workspace --config-file=/.googleconfig/app_start.json --main= -- build --name=us.gcr.io/covid19agent/app-engine-tmp/app/ttl-2h:64dc67bf-1611-4f7f-93cc-df096803bb14 --directory=/workspace --destination=/srv --additional-directory=/.googleconfig --base=us.gcr.io/gae-runtimes/go112:go112_20200531_1_12_17_RC00 --main=].
Step #1 - "builder": 2020/06/15 08:14:40 No start command generator found for go112, using default app start command "serve".
Step #1 - "builder": 2020/06/15 08:14:40 Writing configuration file "/.googleconfig/app_start.json".
Step #1 - "builder": 2020/06/15 08:14:40 Invoking build command "build --name=us.gcr.io/covid19agent/app-engine-tmp/app/ttl-2h:64dc67bf-1611-4f7f-93cc-df096803bb14 --directory=/workspace --destination=/srv --additional-directory=/.googleconfig --base=us.gcr.io/gae-runtimes/go112:go112_20200531_1_12_17_RC00 --main=".
Step #1 - "builder": 2020/06/15 08:14:40 Building /tmp/staging/srv, with main package at ., saving to /tmp/staging/usr/local/bin/start
Step #1 - "builder": 2020/06/15 08:14:40 Running &{/usr/local/go/bin/go [go build -o /tmp/staging/usr/local/bin/start .] [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ad4de922422c HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache GOPATH=/go] /tmp/staging/srv <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> <nil> false [] [] [] [] <nil> <nil>}
Step #1 - "builder": 2020/06/15 08:16:01 Wrote build output to /builder/outputs/output
Step #1 - "builder": 2020/06/15 08:16:01 Failed to build app: [go build -o /tmp/staging/usr/local/bin/start .] with env [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ad4de922422c HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache GOPATH=/go] failed: err=exit status 1, out="go: finding github.com/

I omitted here.

finding github.com/stretchr/objx v0.1.0\ngo: finding golang.org/x/tools v0.0.0-20190816200558-6889da9d5479\ngo: finding github.com/davecgh/go-spew v1.1.0\ngo: finding golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5\ngo: finding github.com/kr/text v0.1.0\ngo: finding github.com/envoyproxy/go-control-plane v0.9.0\ngo: finding github.com/kr/pty v1.1.1\ngo: finding gopkg.in/yaml.v2 v2.2.2\ngo: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127\ngo: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405\ngo: dmitri.shuralyov.com/gpu/mtl@v0.0.0-20190408044501-666a987793e9: unrecognized import path \"dmitri.shuralyov.com/gpu/mtl\" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: dial tcp 172.93.50.41:443: i/o timeout)\ngo: error loading module requirements\n"
Step #1 - "builder": 2020/06/15 08:16:01 2020/06/15 08:14:40 Building /tmp/staging/srv, with main package at ., saving to /tmp/staging/usr/local/bin/start
Step #1 - "builder": 2020/06/15 08:14:40 Running &{/usr/local/go/bin/go [go build -o /tmp/staging/usr/local/bin/start .] [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ad4de922422c HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache GOPATH=/go] /tmp/staging/srv <nil> <nil> <nil> [] <nil> <nil> <nil> <nil> <nil> false [] [] [] [] <nil> <nil>}
Step #1 - "builder": 2020/06/15 08:16:01 Wrote build output to /builder/outputs/output
Step #1 - "builder": 2020/06/15 08:16:01 Failed to build app: [go build -o /tmp/staging/usr/local/bin/start .] with env [PATH=/go/bin:/usr/local/go/bin:/builder/google-cloud-sdk/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin HOSTNAME=ad4de922422c HOME=/builder/home BUILDER_OUTPUT=/builder/outputs DEBIAN_FRONTEND=noninteractive GOROOT=/usr/local/go/ GOPATH=/go GO111MODULE=on GOCACHE=/tmp/cache GOPATH=/go] failed: err=exit status 1, out="go: finding github.com/golang/protobuf v1.4.0-rc.4\ngo: finding google.golang.org/protobuf v1.20.1\ngo: finding google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73\ngo: finding cloud.google.com/go v0.55.0\ngo: finding google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967\ngo: finding github.com/google/go-cmp v0.4.0\ngo: finding golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543\ngo: finding google.golang.org/genproto v0.0.0-20200317114155-1f3552e48f24\ngo: finding golang.org/x/lint v0.0.0-20200302205851-738671d3881b\ngo: finding google.golang.org/grpc v1.28.0\ngo: finding golang.org/x/net v0.0.0-20200301022130-244492dfa37a\ngo: finding golang.org/x/sys v0.0.0-20200317113312-5766fd39f98d\ngo: finding honnef.co/go/tools v0.0.1-2020.1.3\ngo: finding github.com/googleapis/gax-go/v2 v2.0.5\ngo: finding cloud.google.com/go/

I omitted here.

finding golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6\ngo: finding golang.org/x/exp v0.0.0-20190829153037-c13cbed26979\ngo: finding google.golang.org/grpc v1.25.1\ngo: finding github.com/kr/pretty v0.1.0\ngo: finding github.com/pmezard/go-difflib v1.0.0\ngo: finding golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e\ngo: finding github.com/stretchr/objx v0.1.0\ngo: finding golang.org/x/tools v0.0.0-20190816200558-6889da9d5479\ngo: finding github.com/davecgh/go-spew v1.1.0\ngo: finding golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5\ngo: finding github.com/kr/text v0.1.0\ngo: finding github.com/envoyproxy/go-control-plane v0.9.0\ngo: finding github.com/kr/pty v1.1.1\ngo: finding gopkg.in/yaml.v2 v2.2.2\ngo: finding gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127\ngo: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405\ngo: dmitri.shuralyov.com/gpu/mtl@v0.0.0-20190408044501-666a987793e9: unrecognized import path \"dmitri.shuralyov.com/gpu/mtl\" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: dial tcp 172.93.50.41:443: i/o timeout)\ngo: error loading module requirements\n"
Finished Step #1 - "builder"
ERROR
ERROR: build step 1 "gcr.io/gae-runtimes/go112_app_builder:go112_20200531_1_12_17_RC00" failed: step exited with non-zero status: 1
4

1 回答 1

1

您共享的日志上的错误消息非常清楚:

unrecognized import path \"dmitri.shuralyov.com/gpu/mtl\" (https fetch: Get https://dmitri.shuralyov.com/gpu/mtl?go-get=1: dial tcp 172.93.50.41:443: i/o timeout)\ngo: error loading module requirements\n"

所以,有些东西阻止了该库的导入并使其超时,最可能的原因是它们是某种防火墙阻止它,特别是因为所有 google、github 和 go 相关库似乎都已在日志中找到你分享了,你可以在这个文档中查看更多细节,所以我建议你检查你的应用引擎设置的防火墙规则,并仔细检查是否没有规则可以阻止它。

您可以尝试做的另一件事是通过下载 lib 并将其放置在本地存储库中并从那里导入来在本地导入此包。

除此之外,您可以联系模板的创建者,以检查他是否在他的 github repo 上没有针对该问题的更详细的解决方案。

希望这可以帮助。

于 2020-07-09T13:17:58.803 回答