App Engine ConfigFilter:加载服务失败
App Engine ConfigFilter: failed to load service
我正在尝试使用 Cloud Endpoints Framework 构建一个 GAE java8 应用程序。我关注了this guide。我在app.yaml
和appengine-web.xml
中设置了ENDPOINTS_SERVICE_NAME
和ENDPOINTS_SERVICE_VERSION
。我还授予了我的 App Engine 服务帐户编辑器和服务控制器角色。
以下是来自日志查看器的日志:
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.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)
我也尝试关注许多其他推荐 运行 gcloud auth application-default login
的帖子。它也没有解决问题。任何帮助将不胜感激!
我通过启用以下服务修复了它:
gcloud services enable servicemanagement.googleapis.com
gcloud services enable servicecontrol.googleapis.com
gcloud services enable endpoints.googleapis.com
我正在尝试使用 Cloud Endpoints Framework 构建一个 GAE java8 应用程序。我关注了this guide。我在app.yaml
和appengine-web.xml
中设置了ENDPOINTS_SERVICE_NAME
和ENDPOINTS_SERVICE_VERSION
。我还授予了我的 App Engine 服务帐户编辑器和服务控制器角色。
以下是来自日志查看器的日志:
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.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)
我也尝试关注许多其他推荐 运行 gcloud auth application-default login
的帖子。它也没有解决问题。任何帮助将不胜感激!
我通过启用以下服务修复了它:
gcloud services enable servicemanagement.googleapis.com
gcloud services enable servicecontrol.googleapis.com
gcloud services enable endpoints.googleapis.com