简体   繁体   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

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

We made it as far as that the application seems to be running as expected - BE, FE and Datastore all seem to work in our staging GCP project.我们做到了该应用程序似乎按预期运行 - BE、FE 和 Datastore 似乎都在我们的暂存 GCP 项目中工作。

The following errors are showing up in our logs every 10 seconds, however:但是,以下错误每 10 秒就会出现在我们的日志中:

Failed to query GCE metadata service

and then进而

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

Edit: The Cloud Debugger says "The debugger could not find a debug target for the application".编辑:云调试器说“调试器找不到应用程序的调试目标”。 The versions still relying on Java 8 work though, so what extra step is missing for the migration to set up the debugger correctly?不过,这些版本仍然依赖 Java 8 工作,那么迁移正确设置调试器缺少什么额外步骤? As we're using the App Engine standard environment, that should be enabled by default ( https://cloud.google.com/debugger/docs/setup/java#gae-standard ).由于我们使用的是 App Engine 标准环境,因此应默认启用 ( https://cloud.google.com/debugger/docs/setup/java#gae-standard )。

Edit 2: Looks like this could be a Google Cloud Debugger bug: https://github.com/GoogleCloudPlatform/cloud-debug-java/issues/18编辑 2:看起来这可能是 Google Cloud Debugger 错误: https : //github.com/GoogleCloudPlatform/cloud-debug-java/issues/18

As per the App Engine documentation regarding issuing HTTP requests , if you use URL Fetch, it will cause requests to cloud client libraries (and that includes the Google Cloud Debugger Client for Java) to fail.根据有关发出 HTTP 请求App Engine 文档,如果您使用 URL Fetch,它将导致对云客户端库(包括 Google Cloud Debugger Client for Java)的请求失败。

As wer are using the bundled services, we are still using an appengine-web.xml file.由于我们正在使用捆绑服务,我们仍在使用appengine-web.xml文件。

We had the following line in there:我们在那里有以下行:

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

Removing that line fixed the issue for us.删除该行为我们解决了问题。

暂无
暂无

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

相关问题 com.google.apphosting.api.ApiProxy $ CallNotFoundException:未找到API包“ memcache”或调用“ Get()” - com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'memcache' or call 'Get()' was not found 线程“ main” com.google.apphosting.api.ApiProxy $ CallNotFoundException中的异常:未找到API包“ mail”或调用“ Send()” - Exception in thread “main” com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'mail' or call 'Send()' was not found com.google.apphosting.api.ApiProxy $ CancelledException:该API调用urlfetch.Fetch()已明确取消。 代码503 App Engine后端错误 - com.google.apphosting.api.ApiProxy$CancelledException: The API call urlfetch.Fetch() was explicitly cancelled. Code 503 App Engine Backend Error 使用SendGrid API服务时出现异常(com.google.apphosting.api.ApiProxy $ FeatureNotEnabledException) - Getting exception while using SendGrid API Service (com.google.apphosting.api.ApiProxy$FeatureNotEnabledException) Google App Engine Java API - Google App Engine Java API Google App Engine Java 11 无法实例化 com.google.cloud.logging.LoggingHandler - Google App Engine Java 11 Unable to instantiate the com.google.cloud.logging.LoggingHandler com.google.apphosting.runtime.security.shared.stub.java.nio.file.Files - com.google.apphosting.runtime.security.shared.stub.java.nio.file.Files java.lang.ClassNotFoundException:com.google.apphosting.utils.remoteapi.RemoteApiServlet - java.lang.ClassNotFoundException: com.google.apphosting.utils.remoteapi.RemoteApiServlet Java中的Google App Engine API中的错误204 - error 204 in a Google App Engine API in java 将Dropbox Java API与Google App Engine一起使用 - Using dropbox Java API with Google App Engine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM