英文:
App Engine ConfigFilter: failed to load service
问题
我正试图使用Cloud Endpoints Framework构建一个带有Cloud Endpoints Framework的GAE Java 8应用程序。我遵循了这个指南。我在app.yaml
和appengine-web.xml
中设置了ENDPOINTS_SERVICE_NAME
和ENDPOINTS_SERVICE_VERSION
。我还为我的App Engine服务帐号分配了编辑者和服务控制器角色。
这是来自日志查看器的日志:
com.google.api.control.ConfigFilter init: 无法加载服务 (ConfigFilter.java:94)
endpoints.repackaged.com.google.api.config.ServiceConfigException: 无法获取服务配置(状态代码 403):
如果App Engine服务帐号已被删除或权限不正确,可能会发生这种情况。访问 https://console.cloud.google.com/iam-admin/iam/project 并验证App Engine默认服务帐号是否具有编辑者或服务控制器角色。
在endpoints.repackaged.com.google.api.config.ServiceConfigSupplier.fetch(ServiceConfigSupplier.java:167)中出现
在endpoints.repackaged.com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:131)中出现
在endpoints.repackaged.com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:50)中出现
在endpoints.repackaged.com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:241)中出现
在endpoints.repackaged.com.google.api.config.ServiceConfigFetcher.fetch(ServiceConfigFetcher.java:41)中出现
在com.google.api.control.ServiceManagementConfigFilter$1.load(ServiceManagementConfigFilter.java:33)中出现
在com.google.api.control.ConfigFilter.init(ConfigFilter.java:90)中出现
在org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)中出现
在org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:873)中出现
在org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)中出现
在org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)中出现
在com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.startWebapp(AppEngineWebAppContext.java:175)中出现
在org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)中出现
在org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)中出现
在org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)中出现
在org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)中出现
在com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doStart(AppEngineWebAppContext.java:120)中出现
在org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)中出现
在com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:240)中出现
在com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:178)中出现
在com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:120)中出现
在com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:757)中出现
在com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:720)中出现
在com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:690)中出现
在com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:882)中出现
在com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:270)中出现
在java.lang.Thread.run(Thread.java:748)中出现
我还尝试了许多其他帖子推荐运行gcloud auth application-default login
的方法。但这也没有解决问题。任何帮助将不胜感激!
英文:
I am trying to build a GAE java8 app with Cloud Endpoints Framework. I followed this guide. I have set ENDPOINTS_SERVICE_NAME
and ENDPOINTS_SERVICE_VERSION
in app.yaml
and appengine-web.xml
. I have also given my App Engine service account Editor AND Service Controller role.
Here are the logs from Logs Viewer:
com.google.api.control.ConfigFilter init: Failed to load service (ConfigFilter.java:94)
endpoints.repackaged.com.google.api.config.ServiceConfigException: Failed to fetch service config (status code 403):
This may occur if the App Engine service account has been deleted or does not have correct permissions. Visit https://console.cloud.google.com/iam-admin/iam/project and verify that the App Engine default service account has either the Editor or Service Controller role.
at endpoints.repackaged.com.google.api.config.ServiceConfigSupplier.fetch(ServiceConfigSupplier.java:167)
at endpoints.repackaged.com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:131)
at endpoints.repackaged.com.google.api.config.ServiceConfigSupplier.get(ServiceConfigSupplier.java:50)
at endpoints.repackaged.com.google.common.base.Suppliers$ExpiringMemoizingSupplier.get(Suppliers.java:241)
at endpoints.repackaged.com.google.api.config.ServiceConfigFetcher.fetch(ServiceConfigFetcher.java:41)
at com.google.api.control.ServiceManagementConfigFilter$1.load(ServiceManagementConfigFilter.java:33)
at com.google.api.control.ConfigFilter.init(ConfigFilter.java:90)
at org.eclipse.jetty.servlet.FilterHolder.initialize(FilterHolder.java:139)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:873)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:349)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1406)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.startWebapp(AppEngineWebAppContext.java:175)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1368)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:778)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:262)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:522)
at com.google.apphosting.runtime.jetty9.AppEngineWebAppContext.doStart(AppEngineWebAppContext.java:120)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.createHandler(AppVersionHandlerMap.java:240)
at com.google.apphosting.runtime.jetty9.AppVersionHandlerMap.getHandler(AppVersionHandlerMap.java:178)
at com.google.apphosting.runtime.jetty9.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:120)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchServletRequest(JavaRuntime.java:757)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.dispatchRequest(JavaRuntime.java:720)
at com.google.apphosting.runtime.JavaRuntime$RequestRunnable.run(JavaRuntime.java:690)
at com.google.apphosting.runtime.JavaRuntime$NullSandboxRequestRunnable.run(JavaRuntime.java:882)
at com.google.apphosting.runtime.ThreadGroupPool$PoolEntry.run(ThreadGroupPool.java:270)
at java.lang.Thread.run(Thread.java:748)
I have also tried following many other posts that recommended running gcloud auth application-default login
. It did not fix the issue as well. Any help will be appreciated!
答案1
得分: 0
我通过启用以下服务来修复了它:
gcloud服务启用servicemanagement.googleapis.com
gcloud服务启用servicecontrol.googleapis.com
gcloud服务启用endpoints.googleapis.com
英文:
I fixed it by enabling the following services:
gcloud services enable servicemanagement.googleapis.com
gcloud services enable servicecontrol.googleapis.com
gcloud services enable endpoints.googleapis.com
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论