繁体   English   中英

Google App Engine Java 11 - com.google.apphosting.api.ApiProxy$CallNotFoundException 不明错误

[英]Google App Engine Java 11 - unclear errors com.google.apphosting.api.ApiProxy$CallNotFoundException

我们目前正在使用捆绑服务( https://cloud.google.com/blog/products/serverless/support-for-app-engine-services-in-second-generation-)将我们的 App Engine 从 Java 8 迁移到 Java 11 运行时)。

我们做到了该应用程序似乎按预期运行 - BE、FE 和 Datastore 似乎都在我们的暂存 GCP 项目中工作。

但是,以下错误每 10 秒就会出现在我们的日志中:

Failed to query GCE metadata service

进而

java.io.IOException: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:70)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:609)
at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:488)
at com.google.devtools.cdbg.debuglets.java.GceMetadataQuery.readResponse(Unknown Source)
at com.google.devtools.cdbg.debuglets.java.GceMetadataQuery.queryMetadataAttribute(Unknown Source)
at com.google.devtools.cdbg.debuglets.java.GceMetadataQuery.getProjectId(Unknown Source)
at com.google.devtools.cdbg.debuglets.java.GcpHubClient.registerDebuggee(Unknown Source)
Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
at com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:844)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:117)
at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:54)
... 6 more

编辑:云调试器说“调试器找不到应用程序的调试目标”。 不过,这些版本仍然依赖 Java 8 工作,那么迁移正确设置调试器缺少什么额外步骤? 由于我们使用的是 App Engine 标准环境,因此应默认启用 ( https://cloud.google.com/debugger/docs/setup/java#gae-standard )。

编辑 2:看起来这可能是 Google Cloud Debugger 错误: https : //github.com/GoogleCloudPlatform/cloud-debug-java/issues/18

根据有关发出 HTTP 请求App Engine 文档,如果您使用 URL Fetch,它将导致对云客户端库(包括 Google Cloud Debugger Client for Java)的请求失败。

由于我们正在使用捆绑服务,我们仍在使用appengine-web.xml文件。

我们在那里有以下行:

<url-stream-handler>urlfetch</url-stream-handler>

删除该行为我们解决了问题。

暂无
暂无

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

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