Fehlerbehebung bei der flexiblen App Engine-Bereitstellung
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
OpenAPI | gRPC
In diesem Dokument werden Methoden zur Fehlerbehebung für Cloud Endpoints-Bereitstellungen in flexiblen App Engine-Umgebungen erläutert. Wenn Sie von einer API-Anfrage eine Fehlermeldung erhalten, finden Sie unter Fehlerbehebung bei Antwortfehlern weitere Informationen.
Bereitstellungsfehler
In diesem Abschnitt wird beschrieben, wie Sie Fehler in Zusammenhang mit gcloud app deploy beheben.
Fehlermeldung
Fehlerbehebung
Die Bereitstellung hat in der vorgesehenen Zeit keinen fehlerfreien Zustand erreicht und wird daher rückgängig gemacht. Wenn Sie glauben, dass dies unberechtigt war, können Sie die Einstellung app_start_timeout_sec im Abschnitt readiness_check anpassen.
Prüfen Sie, dass die Datei app.yaml über den Abschnitt readiness_check verfügt und für app_start_timeout_sec ein Wert festgelegt ist. Fehlt dieser Abschnitt, fügen Sie ihn ein und setzen Sie den Wert von app_start_timeout_sec auf einen Wert, der höher als der Standardwert von 300 Sekunden ist.
Weitere Informationen finden Sie unter Bereitschaftsprüfungen.
Achten Sie darauf, dass Sie alle Google Cloud -Dienste aktivieren, die von Endpoints und ESP benötigt werden. Weitere Informationen finden Sie unter Erforderliche Dienste überprüfen.
Fehlermeldungen im Zusammenhang mit rollout_strategy
Wenn Sie app.yaml vor der Bereitstellung konfigurieren, müssen Sie den Abschnitt endpoints_api_service hinzufügen. Der Extensible Service Proxy (ESP) benötigt die Einstellungen, die Sie in diesem Abschnitt angeben, um die Konfiguration für Ihren Dienst abzurufen. Sie müssen entweder eine Konfigurations-ID im Feld config_id oder die Option rollout_strategy: managed angeben, jedoch nicht beide. Diese Option konfiguriert den ESP so, dass die zuletzt bereitgestellte Dienstkonfiguration verwendet wird. Wenn Sie diese Option innerhalb von 5 Minuten nach der Bereitstellung einer neuen Dienstkonfiguration angeben, erkennt der ESP die Änderung und verwendet automatisch die neue Konfiguration. Wir empfehlen, diese Option anstelle einer konkreten Konfigurations-ID anzugeben, die vom ESP verwendet werden soll.
Beispiel:
Fehlen im Abschnitt endpoints_api_service die Informationen, die der ESP benötigt, um eine Dienstkonfiguration zu erhalten, wird eine der folgenden Meldungen angezeigt:
Fehlermeldung
Fehlerbehebung
config_id ist verboten, wenn rollout_strategy auf "managed" festgelegt ist
Sie können nicht gleichzeitig eine Konfigurations-ID und rollout_strategy: managed angeben. Solange Sie keinen Grund für die Verwendung einer bestimmten Konfigurations-ID haben, sollten Sie config_id: [YOUR_CONFIG_ID] aus app.yaml entfernen und gcloud app deploy noch einmal ausführen.
config_id muss angegeben werden, wenn rollout_strategy nicht angegeben oder auf "fixed" festgelegt ist
Diese Fehlermeldung wird angezeigt, wenn app.yaml kein rollout_strategy: managed enthält oder rollout_strategy auf fixed festgelegt ist und keine Konfigurations-ID angegeben ist. Solange Sie keinen Grund für die Verwendung einer bestimmten Konfigurations-ID haben, sollten Sie rollout_strategy: managed zum Abschnitt endpoints_api_service in der app.yaml hinzufügen und gcloud app deploy noch einmal ausführen.
Logs für eine Instanz abrufen
In den Absturz- und Systemlogs für App Engine finden Sie Informationen darüber, warum die Anwendung nicht gestartet werden konnte oder nicht ordnungsgemäß funktioniert. Weitere Informationen zum Debuggen finden Sie im Endpoints-Log.
Stellen Sie in der Google Cloud Console eine SSH-Verbindung zu Ihrer virtuellen Maschine her. Weitere Informationen finden Sie unter Verbindung zu einer Instanz herstellen.
[[["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-09-04 (UTC)."],[[["\u003cp\u003eThis document provides troubleshooting guidance for Cloud Endpoints deployments in App Engine flexible environments, specifically addressing errors encountered during the \u003ccode\u003egcloud app deploy\u003c/code\u003e process.\u003c/p\u003e\n"],["\u003cp\u003eIf your deployment fails due to health checks, adjust the \u003ccode\u003eapp_start_timeout_sec\u003c/code\u003e setting in the \u003ccode\u003ereadiness_check\u003c/code\u003e section of your \u003ccode\u003eapp.yaml\u003c/code\u003e file, ensuring it's higher than the default of 300 seconds and ensuring all necessary Google Cloud services are enabled.\u003c/p\u003e\n"],["\u003cp\u003eWhen configuring \u003ccode\u003eapp.yaml\u003c/code\u003e, the \u003ccode\u003eendpoints_api_service\u003c/code\u003e section should include either \u003ccode\u003econfig_id\u003c/code\u003e or \u003ccode\u003erollout_strategy: managed\u003c/code\u003e, but not both, with \u003ccode\u003erollout_strategy: managed\u003c/code\u003e recommended for automatic service configuration updates.\u003c/p\u003e\n"],["\u003cp\u003eErrors related to \u003ccode\u003erollout_strategy\u003c/code\u003e indicate either an invalid combination of \u003ccode\u003econfig_id\u003c/code\u003e and \u003ccode\u003erollout_strategy\u003c/code\u003e settings or a missing \u003ccode\u003econfig_id\u003c/code\u003e when \u003ccode\u003erollout_strategy\u003c/code\u003e is not set to \u003ccode\u003emanaged\u003c/code\u003e, which is resolvable by modifying the \u003ccode\u003eapp.yaml\u003c/code\u003e file and redeploying.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine logs, including crash, system and Endpoints logs, can be accessed via SSH to an instance to help pinpoint the source of issues, utilizing tools like tail to view log data.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting App Engine flexible deployment\n\nOpenAPI \\| gRPC\n\n\u003cbr /\u003e\n\nThis document presents troubleshooting techniques for Cloud Endpoints\ndeployments in App Engine flexible environments. If you receive an\nerror back from a request to your API, see\n[Troubleshooting response errors](/endpoints/docs/openapi/troubleshoot-response-errors)\nfor information on troubleshooting the error.\n\nDeployment errors\n-----------------\n\nThis section describes how to troubleshoot errors from `gcloud app deploy`.\n\n### Error messages about `rollout_strategy`\n\nWhen you configure `app.yaml` before deploying, you must add the\n`endpoints_api_service` section. The Extensible Service Proxy (ESP) needs the\nsettings that you specify in this section to obtain the configuration for your\nservice. You must specify either a configuration ID in the `config_id` field, or\ninclude the `rollout_strategy: managed` option, but not both. This option\n\nconfigures ESP to use the latest deployed service configuration. When you\nspecify this option, up to 5 minutes after you deploy a new service\nconfiguration, ESP detects the change and automatically begins using it. We\nrecommend that you specify this option instead of a specific configuration ID\nfor ESP to use.\nFor example: \n\n endpoints_api_service:\n name: example-project-12345.appspot.com\n rollout_strategy: managed\n\nIf the `endpoints_api_service` section doesn't include the information that\nESP needs to obtain a service configuration, one of the following\nmessages is displayed:\n\nViewing logs on an instance\n---------------------------\n\nApp Engine crash and system logs provide information on why the\napplication failed to launch or perform as intended. You can find further\ndebugging information in the Endpoints log.\n\n1. In the Google Cloud console, SSH into your virtual machine. See\n [connecting to an instance](/appengine/docs/flexible/python/debugging-an-instance#connecting_to_the_instance)\n for more information.\n\n2. Use a text viewer such as `tail`:\n\n tail -f /var/log/nginx/error.log\n\nWhat's next\n-----------\n\n- [App Engine flexible environment logs](https://cloud.google.com/logging/docs/view/service/appengine-logs#appengine-vms)\n- [Viewing Logs](https://cloud.google.com/logging/docs/view/logs-explorer-interface)\n- [Using Cloud Logging in App Engine apps](https://cloud.google.com/appengine/articles/logging)"]]