简体   繁体   English

部署 Google App Engine 后返回 HTTP 响应代码 403

[英]After deploy Google App Engine returns HTTP response code 403

I've done another deploys and all was fine, but after finishing the app, I'm getting this error.我已经进行了另一次部署,一切都很好,但是在完成应用程序后,我收到了这个错误。 And the page request keeps loading.页面请求不断加载。
Do I need to configure something in "IAM"?我需要在“IAM”中配置一些东西吗?

Java 11 Java 11
Standard Environment标准环境
h2 DB h2数据库
Spring boot Spring开机

The stack trace from Google Cloud:来自 Google Cloud 的堆栈跟踪:

java.io.IOException: Server returned HTTP response code: 403 for URL: https://clouddebugger.googleapis.com/v2/controller/debuggees/register at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1919) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250) at com.google.devtools.cdbg.debuglets.java.GcpHubClient.register java.io.IOException: Server returned HTTP response code: 403 for URL: https://clouddebugger.googleapis.com/v2/controller/debuggees/register at java.base/sun.net.www.protocol.http.HttpURLConnection. getInputStream0(HttpURLConnection.java:1919) at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515) at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.在 com.google.devtools.cdbg.debuglets.Z93F725A07423FE1C889F448B33D21FpH6 Debuggee (Unknown Source)调试对象(未知来源)

I've got new data using Stackdriver debug.我使用 Stackdriver 调试获得了新数据。

"message": "Stackdriver Debugger API has not been used in project 929024293238 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/clouddebugger.googleapis.com/overview?project=929024293238 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.", "message": "Stackdriver Debugger API 之前未在项目 929024293238 中使用或已禁用。通过访问https://console.developers.google.com/apis/api/clouddebugger.googleapi/overview启用它=929024293238然后重试。如果您最近启用了此 API,请等待几分钟让该操作传播到我们的系统并重试。",

The log wasn't very informative.日志信息量不大。 I change the application port from 8000 to 8080.我将应用程序端口从 8000 更改为 8080。

application.properties: server.port=${PORT:8080} application.properties: server.port=${PORT:8080}

Now the app is running fine.现在该应用程序运行良好。

Just a note if somebody else stumbles across this error: I had the same message in Google's App Engine dashboard popping up up to 60 times in a couple of minutes.如果其他人偶然发现此错误,请注意:我在 Google 的 App Engine 仪表板中看到相同的消息在几分钟内弹出多达 60 次。

Enabling the Stackdriver Debugging API, as linked above, solved it.启用 Stackdriver Debugging API,如上链接,解决了它。 No more error logs (of that kind) were being produced.不再生成(那种)错误日志。 The weired thing is that the Stackdriver Debugging API should have been turned on by default for my standard environment.奇怪的是,对于我的标准环境,Stackdriver Debugging API 应该已默认打开。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM