Permission denied while using the Eventarc Service Agent. If you recently
started to use Eventarc, it may take a few minutes before all necessary
permissions are propagated to the Service Agent. Otherwise, verify that it has
Eventarc Service Agent role.
服务代理充当特定项目的给定 Google Cloud 服务的身份。如需了解详情,请参阅服务代理并查看 Eventarc 服务代理角色 (roles/eventarc.serviceAgent) 的权限。
验证服务代理是否具有 Eventarc Service Agent 角色。如果服务代理没有该角色,请授予角色。
如果您尝试使用跨项目服务账号,并且遇到 iam.serviceAccounts.getAccessToken 或 iam.serviceAccounts.actAs 的权限遭拒错误,或者收到类似于 ...cross-project service accounts are disabled 或 Failed to impersonate... 的错误消息,请确认权限已正确配置。如需了解详情,请参阅使用跨项目服务账号。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eThis page provides troubleshooting guidance for issues encountered when using Eventarc, including problems with providers, event delivery, triggers, and permissions.\u003c/p\u003e\n"],["\u003cp\u003eVerify that providers exist, that events are from supported regions, and that triggers are configured correctly by checking Cloud Audit Logs and Pub/Sub topic status.\u003c/p\u003e\n"],["\u003cp\u003eIf events are not received, ensure the Pub/Sub topic associated with the trigger exists and that the monitored service is writing logs, and recreate the trigger if the Pub/Sub topic is not found.\u003c/p\u003e\n"],["\u003cp\u003eAddress permission denied errors by confirming trigger permissions, checking the Eventarc Service Agent's role, and ensuring correct configuration for cross-project service accounts.\u003c/p\u003e\n"],["\u003cp\u003eTo prevent unexpected charges, review trigger filters that may lead to infinite trigger activations and set budgets and alerts in the Google Cloud billing console.\u003c/p\u003e\n"]]],[],null,["# Troubleshoot issues\n\n[Standard](/eventarc/standard/docs/overview)\n\nThis page shows you how to resolve issues that you might encounter when using\nEventarc.\n\nFor destination-specific issues that you might also encounter, refer to\ntroubleshooting for:\n\n- [Eventarc for Cloud Run](/eventarc/standard/docs/run/troubleshoot)\n- [Eventarc for GKE](/eventarc/standard/docs/gke/troubleshooting)\n- [Eventarc for Workflows](/eventarc/standard/docs/workflows/troubleshoot)\n\nEventarc provider\n-----------------\n\nThis section provides troubleshooting tips for issues at the source of events\n(the provider).\n\n### Provider doesn't exist\n\nCheck that [the provider exists](/eventarc/docs/list-providers) and that you\nhave [specified the trigger filters](/eventarc/standard/docs/event-providers-targets#triggers)\nappropriately.\n\n### Events are produced from the provider, but are not received at the target\n\nCheck that you are filtering for events from providers that are in a supported\nregion for the target destination. For more information, see\n[locations supported by Eventarc](/eventarc/docs/locations) and\n[Understand Eventarc locations](/eventarc/docs/understand-locations).\n\n### Trigger is not delivering events\n\n1. Verify that the provider is generating events. Check the\n [Cloud Audit Logs](/eventarc/docs/reference/audit-logs#viewing_logs)\n and make sure the monitored service is writing logs. If logs are recorded\n but events are not delivered, [contact support](/eventarc/docs/getting-support).\n\n2. Verify that a Pub/Sub topic with the same trigger name exists.\n\n 1. To list triggers in all locations, run:\n\n gcloud eventarc triggers list --location=-\n\n 2. To list Pub/Sub topics, run:\n\n gcloud pubsub topics list\n\n Verify that the Pub/Sub topic name includes the name of the\n created trigger. If the Pub/Sub topic is missing,\n [create a topic when you create the trigger](/eventarc/standard/docs/event-providers-targets#triggers).\n 3. To describe triggers and detect any issues with the condition of the\n trigger, run:\n\n gcloud eventarc triggers describe \u003cvar translate=\"no\"\u003eTRIGGER_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eTRIGGER_ID\u003c/var\u003e: the ID of the trigger or a fully qualified identifier.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location of the Eventarc trigger.\n 4. The previous command returns the condition of the trigger. If there is an\n issue with the Pub/Sub topic, one of the following conditions is\n returned:\n\n ```\n conditions:\n transport.pubsub.topic:\n code: NOT_FOUND\n message: Pub/Sub topic not found. Try recreating the trigger.\n ```\n\n or \n\n ```\n conditions:\n transport.pubsub.topic:\n code: UNKNOWN\n message: Pub/Sub topic status is unknown. Try requesting the trigger description again.\n ```\n\n If applicable, do the following:\n - If `Pub/Sub topic not found` is returned, recreate the\n trigger for a specific provider, event type, and destination\\](/eventarc/standard/docs/event-providers-targets#triggers)\n and then create the topic.\n\n - If `Pub/Sub topic status is unknown` is returned, run the\n command to describe the trigger again.\n\n - If the problem persists, [contact support](/eventarc/docs/getting-support).\n For more information, see [Manage triggers](/eventarc/docs/managing-triggers).\n\n3. Verify the health of the Pub/Sub topic:\n\n 1. Verify the Pub/Sub topic configuration. Go to the **Topics**\n page.\n\n\n [Go to Topics](https://console.cloud.google.com/cloudpubsub/topic/list)\n\n \u003cbr /\u003e\n\n 2. [Monitor](/pubsub/docs/monitoring#monitoring_forwarded_undeliverable_messages)\n if messages are published to the topic with the metric:\n `topic/send_message_operation_count`. If messages are not published to the\n topic, check [Cloud Audit Logs](/logging/docs/audit#viewing_audit_logs)\n and make sure the monitored service is emitting logs. If logs are recorded\n but events are not delivered, [contact support](/eventarc/docs/getting-support).\n\n 3. [Monitor](/pubsub/docs/monitoring#monitoring_push_subscriptions) if\n messages are pushed successfully with the metric:\n `subscription/push_request_count` by `response_code`. If push errors are\n reported, check the service logs. If the receiving endpoint returns a\n non-OK status code, it indicates that the Cloud Run code\n is not working as expected and you must\n [contact support](/eventarc/docs/getting-support).\n\nEventarc trigger\n----------------\n\nThis section provides troubleshooting tips for issues at the trigger.\n\n### Permission denied errors\n\n- If you encounter a `Failed to load service details: permission denied` error,\n confirm that the trigger permissions are configured correctly, and that the\n Pub/Sub service account is granted the\n `iam.serviceAccountTokenCreator` role. For more information, see\n [Access control](/eventarc/docs/access-control).\n\n- If you encounter the following error while trying to create a trigger, wait a\n few minutes ([up to seven](/iam/docs/access-change-propagation)), and then try\n creating the trigger again:\n\n Permission denied while using the Eventarc Service Agent. If you recently\n started to use Eventarc, it may take a few minutes before all necessary\n permissions are propagated to the Service Agent. Otherwise, verify that it has\n Eventarc Service Agent role.\n\n A service agent acts as the identity of a given Google Cloud service for a\n particular project. For more information, see\n [Service agents](/iam/docs/service-agents) and view the\n [permissions](/iam/docs/understanding-roles#eventarc.serviceAgent) for the\n Eventarc service agent role (`roles/eventarc.serviceAgent`).\n\n To verify that the Eventarc service agent exists in your\n Google Cloud project and has the necessary role, complete the following steps:\n 1. In the Google Cloud console, go to the **IAM** page.\n\n\n [Go to IAM](https://console.cloud.google.com/iam-admin/iam)\n\n \u003cbr /\u003e\n\n 2. On the **Permissions** tab, select the\n **Include Google-provided role grants** checkbox.\n\n 3. In the list of principals, locate the Eventarc\n service agent, which uses this format:\n\n `service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-eventarc.iam.gserviceaccount.com`\n 4. Verify that the service agent has the **Eventarc\n Service Agent** role. If the service agent does not have the role,\n [grant the role](/iam/docs/granting-changing-revoking-access).\n\n- If you are trying to use a cross-project service account and you encounter a\n permission denied error for `iam.serviceAccounts.getAccessToken` or\n `iam.serviceAccounts.actAs`, or if you receive an error message similar to\n `...cross-project service accounts are disabled` or `Failed to impersonate...`,\n confirm that permissions are configured correctly. For more information, see\n [Use a cross-project service account](/eventarc/docs/use-cross-project-service-account).\n\n### Pub/Sub topic not displaying CMEK key\n\n[Enabling an Eventarc channel with a customer-managed encryption key](/eventarc/docs/use-cmek)\n(CMEK) protects the Pub/Sub topic used as a transport layer by\nEventarc Standard. However, the CMEK key is not displayed through the\nGoogle Cloud console. You can verify that a CMEK key is enabled for the\nPub/Sub topic by using the Google Cloud CLI:\n\n1. Describe the Eventarc trigger:\n\n gcloud eventarc triggers describe \u003cvar translate=\"no\"\u003eTRIGGER_ID\u003c/var\u003e \\\n --location=\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eTRIGGER_ID\u003c/var\u003e: the ID of your Eventarc trigger\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the location of the trigger\n\n The Pub/Sub topic ID is returned. For example:\n `topic: projects/`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`/topics/`\u003cvar translate=\"no\"\u003eTOPIC_ID\u003c/var\u003e\n2. Describe the Pub/Sub topic:\n\n gcloud pubsub topics describe \u003cvar translate=\"no\"\u003eTOPIC_ID\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eTOPIC_ID\u003c/var\u003e with the Pub/Sub\n topic ID retrieved in the previous step.\n\n The CMEK key name is returned. For example: \n\n kmsKeyName: projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/locations/\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e/keyRings/\u003cvar translate=\"no\"\u003eRING_NAME\u003c/var\u003e/cryptoKeys/\u003cvar translate=\"no\"\u003eKEY_NAME\u003c/var\u003e/grants/\u003cvar translate=\"no\"\u003eGRANT_ID\u003c/var\u003e\n\n### Unexpected charges when using Eventarc\n\nWhen you create a trigger, check if the filters configured could lead to\ntriggers being set off indefinitely. To help avoid unexpected charges on your\nbill, set budgets and alerts using Google Cloud's billing console. For more\ninformation, see [Create a budget](/billing/docs/how-to/budgets#create-budget).\n\nRelated information\n-------------------\n\n- To learn more about Eventarc, see the [overview](/eventarc/standard/docs/overview).\n- For a tutorial on Eventarc troubleshooting, see [Debug a Cloud Run service using Eventarc](/eventarc/standard/docs/run/debugging-events-cloud-run).\n- For event publishing issues, see [Troubleshoot event publishing](/eventarc/standard/docs/third-parties/troubleshoot-providers).\n- To get additional help, see [Get support](/eventarc/docs/getting-support)."]]