이 문서에서는 App Engine 가변형 환경에서 Cloud Endpoints 배포 문제를 해결하는 방법에 대해 설명합니다. API 요청에 대한 응답으로 오류를 받은 경우 응답 오류 문제해결에서 오류 문제해결에 대한 정보를 확인하세요.
배포 오류
이 섹션에서는 gcloud app deploy 실행 시 문제해결 방법을 설명합니다.
오류 메시지
문제 해결
할당된 시간 안에 배포가 정상 상태가 되지 않았기 때문에 롤백되었습니다. 오류라고 생각되면 readiness_check 섹션에서 app_start_timeout_sec 설정을 조정해 보세요.
app.yaml 파일에 app_start_timeout_sec의 값이 포함된 readiness_check 섹션이 있는지 확인합니다. 없으면 섹션을 추가하고 app_start_timeout_sec의 값을 기본값 300 초보다 높은 값으로 설정합니다.
자세한 내용은 준비 확인을 참조하세요.
Endpoints 및 ESP에 필요한 모든 Google Cloud 서비스가 프로젝트에 사용 설정되어 있는지 확인합니다. 자세한 내용은 필수 서비스 확인을 참조하세요.
rollout_strategy에 대한 오류 메시지
배포 전에 app.yaml을 구성하는 경우 endpoints_api_service 섹션을 추가해야 합니다. 이 섹션에 지정하는 설정은 Extensible Service Proxy(ESP)에서 서비스의 구성을 받기 위해 필요합니다. config_id 필드에 구성 ID를 지정하거나 rollout_strategy: managed 옵션을 포함해야 합니다(동시 설정 불가). 이 옵션은 배포된 최신 서비스 구성을 사용하도록 ESP를 구성합니다. 이 옵션을 지정하면 새 서비스 구성을 배포하고 최대 5분 후 ESP가 변경 사항을 감지하고 자동으로 사용하기 시작합니다. ESP에 사용할 특정 구성 ID 대신 이 옵션을 지정하는 것이 좋습니다.
예를 들면 다음과 같습니다.
ESP가 서비스 구성을 받는 데 필요한 정보가 endpoints_api_service 섹션에 포함되어 있지 않으면 다음 메시지 중 하나가 표시됩니다.
오류 메시지
문제 해결
rollout_strategy가 "managed"로 설정된 경우 config_id는 금지됨
구성 ID와 rollout_strategy: managed를 모두 지정할 수는 없습니다. 특정 구성 ID를 사용해야 할 이유가 없다면 app.yaml에서 config_id: [YOUR_CONFIG_ID]를 제거하고 gcloud app deploy를 다시 실행하세요.
rollout_strategy가 지정되지 않거나 "fixed"로 설정된 경우 config_id를 지정해야 함
이 오류 메시지는 app.yaml에 rollout_strategy: managed가 포함되어 있지 않거나 rollout_strategy가 fixed로 설정되어 있고 구성 ID가 지정되지 않은 경우에 표시됩니다. 특정 구성 ID를 사용해야 할 이유가 없다면 app.yaml의 endpoints_api_service 섹션에 rollout_strategy: managed를 추가하고 gcloud app deploy를 다시 실행하세요.
인스턴스에서 로그 보기
App Engine이 비정상적으로 종료되면 시스템 로그에 애플리케이션이 시작되지 않거나 올바르게 수행되지 않은 이유에 대한 정보가 제공됩니다. Endpoints 로그에서 추가 디버깅 정보를 찾을 수 있습니다.
Google Cloud Console에서 SSH를 통해 가상 머신에 연결합니다. 자세한 내용은 인스턴스에 연결을 참조하세요.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2024-12-21(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)"]]