Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Push-Abonnenten sind eine Art von Pub/Sub-Abonnenten, bei denen Nachrichten von Pub/Sub an einen vom Nutzer angegebenen HTTPS-Endpunkt gesendet werden. Der Nutzer bestätigt eine gepushte Nachricht, indem er eine HTTP 200-Antwort auf die Anfrage des Push-Servers zurückgibt. In diesem Dokument finden Sie einige allgemeine Tipps zur Fehlerbehebung bei Pub/Sub-Push-Abos. Weitere Informationen zu Push-Abos finden Sie im Leitfaden für Push-Abo.
Wenn der Endpunkt einen Fehlerantwortcode zurückgibt, wird die Nachrichtenübermittlung als fehlgeschlagen betrachtet und später noch einmal versucht. Das kann dazu führen, dass der Endpunkt doppelte Nachrichten empfängt.
Es gibt mehrere Messwerte, mit denen Sie Push-Abos beobachten können. Der Messwert subscription/push_request_count in den Cloud-Messwerten kategorisiert Antworten vom Push-Endpunkt nach response_code und response_class. Die Antworten sind nützlich, um potenzielle Endpunktfehler zu identifizieren. Wenn für diesen Messwert Daten mit einer anderen response_class als ack vorliegen, gibt der Push-Endpunkt Fehler an Pub/Sub zurück. Zu den häufigsten Fehlern gehören:
Eine deadline_exceeded-Antwortklasse gibt an, dass der Push-Endpunkt nicht innerhalb der erforderlichen Frist für die Bestätigung (Ack) geantwortet hat. Mit dem Messwert subscription/push_request_latencies lässt sich die Push-Bestätigungslatenz erfassen.
Eine invalid-Antwortklasse gibt an, dass der Endpunkt eine Antwort zurückgegeben hat, die Pub/Sub nicht verstehen oder richtig verarbeiten konnte.
Eine remote_server_4xx-Antwortklasse weist in der Regel auf Authentifizierungs- oder Berechtigungsprobleme hin. Dies sind HTTP-Antwortcodes, die vom Endpunkt zurückgegeben werden. Sehen Sie sich daher die Szenarien an, unter denen dieser Antwortcode zurückgegeben wird. Wenn die Authentifizierung aktiviert ist, prüfen Sie, ob Ihr Konto die richtige Berechtigung für den Endpunkt hat. Weitere Informationen zur Authentifizierung bei Push-Abos
Eine remote_server_5xx-Antwortklasse weist auf ein serverseitiges Problem auf Endpunktseite hin. Die Anfrage kann vom Endpunkt nicht verarbeitet werden. Das kann an einer laufenden Wartung oder einem Ausfall liegen. Prüfen Sie den Status des Servers, auf dem der Endpunkt gehostet wird.
Eine unreachable-Antwortklasse gibt an, dass der Endpunktserver überhaupt nicht erreicht werden kann. Prüfen Sie die Endpunkt-URL auf Tippfehler.
Weitere Informationen zu den häufigsten Fehlercodes der Pub/Sub API
Einschränkungen für Push-Abos in einem VPC-SC-Perimeter
Wenn in einem Projekt der Schutz durch VPC Service Controls (VPC-SC) aktiviert ist, gibt es Einschränkungen beim Erstellen von Push-Abos. Vorhandene Push-Abos funktionieren weiterhin, aber wenn Sie ein neues Push-Abo erstellen, wird der Fehler Request is prohibited by organization's policy angezeigt. Neue Push-Abos können nur erstellt werden, wenn der Push-Endpunkt ein Cloud Run-Dienst mit der Standard-run.app-URL ist. Weitere Informationen und Einschränkungen finden Sie in der Pub/Sub-Dokumentation und in der VPC-SC-Dokumentation.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[],[],null,["# Troubleshooting a push subscription\n\nPush subscribers are a type of Pub/Sub subscriber where messages are sent from Pub/Sub to a user-specified HTTPS endpoint. The user acknowledges a pushed message by returning an HTTP 200 response to the push server's request. This document provides some common troubleshooting tips for Pub/Sub push subscriptions. Read more about push subscriptions in the [Push subscriber guide](/pubsub/docs/push).\n\nTo effectively monitor your Pub/Sub subscription, it is recommended to first look at the [delivery latency health score](/pubsub/docs/monitoring#delivery_latency_health) ([`subscription/delivery_latency_health_score`](/monitoring/api/metrics_gcp_p_z#pubsub/subscription/delivery_latency_health_score)) to check which factors could be contributing to an unexpected latency.\n\nFailing or slow push endpoints\n------------------------------\n\nIf the endpoint returns an error response code, then the message delivery is considered to have failed and is retried later. This can potentially lead to the endpoint receiving duplicate messages.\n\nThere are multiple metrics that you can use to [monitor push subscriptions](/pubsub/docs/monitoring#monitoring_push_subscriptions). The [`subscription/push_request_count`](/monitoring/api/metrics_gcp_p_z#pubsub/subscription/push_request_count) metric in Cloud Metrics categorizes responses from the push endpoint by `response_code` and `response_class`. The responses are useful for the identification of potential endpoint malfunctions. If this metric has data with a `response_class` other than `ack`, this indicates that the push endpoint is returning errors to Pub/Sub. Some of the most common errors include:\n\n- A `deadline_exceeded` response class indicates that the push endpoint didn't respond within the required acknowledgment (ack) deadline. The [`subscription/push_request_latencies`](/monitoring/api/metrics_gcp_p_z#pubsub/subscription/push_request_latencies) metric helps to track push ack latency.\n\n- An `invalid` response class indicates that the endpoint sent back a response that Pub/Sub couldn't understand or process correctly.\n\n- A `remote_server_4xx` response class usually indicates authentication or permission issues. These are HTTP response codes returned by the endpoint, so look at the scenarios under which this response code is returned. If authentication is enabled, confirm your account has the right permission on the endpoint. Learn more about how [authentication](/pubsub/docs/create-push-subscription#authentication) works in push subscriptions.\n\n- A `remote_server_5xx` response class indicates a server-side problem on the endpoint side. The endpoint is unable to process the request. This might be due to an ongoing maintenance or outage. Review the status of the server hosting the endpoint.\n\n- An `unreachable` response class indicates that the endpoint server cannot be reached at all. Verify the endpoint URL for typos.\n\nLearn more about the most common [error codes](/pubsub/docs/reference/error-codes) of the Pub/Sub API.\n\nRestrictions on push subscriptions inside a VPC-SC perimeter\n------------------------------------------------------------\n\nIf VPC Service Controls (VPC-SC) protection is enabled in a project, there are limitations on creating push subscriptions. Existing push subscriptions continue to work, but when you create a new push subscription, you see the error: `Request is prohibited by organization's policy`. Specifically, new push subscriptions can only be created if the push endpoint is a Cloud Run service using the default `run.app` URL. For more details and specific limitations, see [Pub/Sub documentation](/pubsub/docs/create-push-subscription#vpc-service-control) and [VPC-SC documentation](/vpc-service-controls/docs/supported-products#table_pubsub)."]]