Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google cloud platform 运行ESP本地开发_Google Cloud Platform_Google Cloud Endpoints - Fatal编程技术网

Google cloud platform 运行ESP本地开发

Google cloud platform 运行ESP本地开发,google-cloud-platform,google-cloud-endpoints,Google Cloud Platform,Google Cloud Endpoints,当我尝试运行本地ESP时,我会出现此错误 ERROR:Fetching service config failed(status code 403, reason Forbidden, url ***) 我有一个新创建的服务帐户此帐户与gcloud cli配合使用效果良好 系统:OSX Sierra和Docker for MAC 这是我用来启动容器的命令: docker run -d --name="esp" --net="host" -v ~/Downloads:/esp gcr.io/en

当我尝试运行本地ESP时,我会出现此错误

ERROR:Fetching service config failed(status code 403, reason Forbidden, url ***)
我有一个新创建的服务帐户此帐户与gcloud cli配合使用效果良好

系统:OSX Sierra和Docker for MAC

这是我用来启动容器的命令:

docker run -d --name="esp" --net="host" -v ~/Downloads:/esp gcr.io/endpoints-release/endpoints-runtime:1.0 -s 2017-02-07r5 -v echo.endpoints.****.cloud.goog -p 8082 -a localhost:9000  -k /esp/serviceaccount.json
更新:

我发现了我为服务名称设置的错误,即verision,以及为版本设置的错误,即servicename

现在我没有收到错误,但它不工作,这是来自容器的控制台输出。在我看来,这一切都很好,但它不起作用,我无法使用localhost:8082调用代理/***

INFO:Constructing an access token with scope https://www.googleapis.com/auth/service.management.readonly
INFO:Service account email: aplha-api@****.iam.gserviceaccount.com
INFO:Refreshing access_token
INFO:Fetching the service configuration from the service management service
nginx: [warn] Using trusted CA certificates file: /etc/nginx/trusted-ca-certificates.crt
这是正确使用的命令:

 docker run -d --name="esp-user-api" --net="host" -v ~/Downloads:/esp gcr.io/endpoints-release/endpoints-runtime:1.0 -s echo.endpoints.***.cloud.goog  -v 2017-02-07r5  -p 8082 -a localhost:9000 -k /esp/serviceaccount.json
阿隆,我想: (1) 您正在遵循此用户指南:

(2) 您确实有一个后端在localhost:9000上运行

您是否按照用户指南中的建议向localhost:8082/***发出了curl请求?curl命令是否被卡住或返回任何错误消息

如果您还没有运行本地后端,我建议您按照上面的用户指南运行本地后端。注意:本指南将指导您在端口8080运行它,因此您需要将docker运行命令从“-a localhost:9000”更改为“-a localhost:8080”

另外,请注意,本用户指南适用于linux环境。我们还没有在Mac环境中尝试这种设置。我们注意到一些用户通过额外的工作在Windows docker上实现了这一点,他将后端设置为“docker NIC的IP”。注意“-a”是“-backend”的缩写

请参见Aron,我假定: (1) 您正在遵循此用户指南:

(2) 您确实有一个后端在localhost:9000上运行

您是否按照用户指南中的建议向localhost:8082/***发出了curl请求?curl命令是否被卡住或返回任何错误消息

如果您还没有运行本地后端,我建议您按照上面的用户指南运行本地后端。注意:本指南将指导您在端口8080运行它,因此您需要将docker运行命令从“-a localhost:9000”更改为“-a localhost:8080”

另外,请注意,本用户指南适用于linux环境。我们还没有在Mac环境中尝试这种设置。我们注意到一些用户通过额外的工作在Windows docker上实现了这一点,他将后端设置为“docker NIC的IP”。注意“-a”是“-backend”的缩写