Memecahkan masalah deployment fleksibel App Engine
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
OpenAPI | gRPC
Dokumen ini menyajikan teknik pemecahan masalah untuk deployment Cloud Endpoints di lingkungan fleksibel App Engine. Jika Anda menerima
error dari permintaan ke API, lihat
Memecahkan masalah error respons
untuk mengetahui informasi tentang cara memecahkan masalah error.
Error saat deployment
Bagian ini menjelaskan cara memecahkan masalah error dari gcloud app deploy.
Pesan error
Pemecahan masalah
Deployment Anda gagal menjadi responsif dalam waktu yang ditentukan, sehingga deployment tersebut di-roll back. Jika Anda yakin ini adalah kesalahan, coba sesuaikan
setelan app_start_timeout_sec di
bagian readiness_check.
Pastikan file app.yaml Anda memiliki bagian readiness_check
dengan nilai untuk app_start_timeout_sec. Jika tidak ada, tambahkan bagian dan tetapkan nilai app_start_timeout_sec
ke lebih tinggi dari default 300 detik.
Untuk informasi selengkapnya, lihat
pemeriksaan kesiapan.
Pastikan semua Google Cloud layanan yang diperlukan Endpoint dan ESP diaktifkan di project Anda. Lihat
Memeriksa
layanan yang diperlukan untuk mengetahui detailnya.
Pesan error tentang rollout_strategy
Saat mengonfigurasi app.yaml sebelum men-deploy, Anda harus menambahkan
bagian endpoints_api_service. Extensible Service Proxy (ESP) memerlukan
setelan yang Anda tentukan di bagian ini untuk mendapatkan konfigurasi untuk
layanan Anda. Anda harus menentukan ID konfigurasi di kolom config_id, atau
menyertakan opsi rollout_strategy: managed, tetapi tidak boleh keduanya. Opsi ini
mengonfigurasi ESP untuk menggunakan konfigurasi layanan terbaru yang di-deploy. Saat Anda menentukan opsi ini, hingga 5 menit setelah Anda men-deploy konfigurasi layanan baru, ESP akan mendeteksi perubahan dan otomatis mulai menggunakannya. Sebaiknya
tentukan opsi ini, bukan ID konfigurasi tertentu
yang akan digunakan ESP.
Contoh:
Jika bagian endpoints_api_service tidak menyertakan informasi yang
diperlukan ESP untuk mendapatkan konfigurasi layanan, salah satu pesan
berikut akan ditampilkan:
Pesan error
Pemecahan masalah
config_id dilarang jika rollout_strategy ditetapkan
ke "managed"
Anda tidak dapat menentukan ID konfigurasi dan
rollout_strategy: managed. Kecuali jika Anda memiliki alasan untuk menggunakan ID konfigurasi tertentu, sebaiknya hapus config_id: [YOUR_CONFIG_ID] dari app.yaml dan jalankan kembali gcloud app deploy.
config_id harus ditentukan jika rollout_strategy
tidak ditentukan atau ditetapkan ke "fixed"
Pesan error ini ditampilkan saat app.yaml tidak
menyertakan rollout_strategy: managed atau
rollout_strategy ditetapkan ke fixed dan Anda
belum menentukan ID konfigurasi. Kecuali jika Anda memiliki alasan untuk
menggunakan ID konfigurasi tertentu, sebaiknya tambahkan
rollout_strategy: managed ke
bagian endpoints_api_service di app.yaml dan jalankan ulang
gcloud app deploy.
Melihat log di instance
Error App Engine dan log sistem memberikan informasi tentang alasan
aplikasi gagal diluncurkan atau berperforma seperti yang diinginkan. Anda dapat menemukan informasi proses debug lebih lanjut di log Endpoints.
Di konsol Google Cloud , gunakan SSH untuk terhubung ke virtual machine Anda. Lihat
menghubungkan ke instance
untuk mengetahui informasi selengkapnya.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-18 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)"]]