Cloud Healthcare API를 사용하는 데 문제가 발생하면 도움이 될 수 있는 문제 해결 단계를 알아봅니다.
Cloud Healthcare API를 사용 설정할 수 없음
Google Cloud 프로젝트에서 Cloud Healthcare API를 처음 사용 설정하면 프로젝트에 Google Cloud APIs를 사용 설정할 수 있는 권한이 없다는 권한 오류가 발생할 수 있습니다.
Cloud Healthcare API를 포함한 Google Cloud APIs 사용 설정 방법에 대한 자세한 내용은 API 사용 설정 및 중지를 참조하세요.
Cloud Healthcare API에 인증할 수 없음
Cloud Healthcare API를 호출할 때 '애플리케이션 기본 사용자 인증 정보'를 사용할 수 없다는 오류 메시지가 표시될 수 있습니다.
애플리케이션 기본 사용자 인증 정보를 구성하는 방법 또는 인증 사용자 인증 정보를 애플리케이션 또는 명령어로 수동으로 전달하는 방법에 대한 자세한 내용은 API에 인증을 참조하세요.
Cloud Healthcare API 서비스 계정 또는 Healthcare 서비스 에이전트 역할 누락
Cloud Healthcare API를 사용 설정하고 첫 번째 데이터 세트를 만들면Cloud Healthcare 서비스 에이전트 서비스 계정이 자동으로 생성됩니다. 이 계정은 Google 관리형 서비스 계정입니다.
서비스 계정을 완전히 삭제할 수 없지만 특정 환경에서는 ID 및 액세스 관리 페이지에 표시되지 않을 수 있으며, Cloud Healthcare API에 문제가 발생할 수 있습니다.
Cloud Healthcare API가 올바르게 작동하고 Pub/Sub에서 메시지를 게시 및 수신하거나 Cloud Logging에 측정항목을 작성하는 것과 같은 작업을 완료하기 위해서는 Cloud Healthcare 서비스 에이전트 서비스 계정이 존재해야 하며, Healthcare 서비스 에이전트 IAM 역할을 포함해야 합니다.
다음 문제 중 하나가 발생하면 Cloud Healthcare 서비스 에이전트 서비스 계정을 다시 만들거나 Healthcare 서비스 에이전트 IAM 역할을 부여할 수 있습니다.
ID 및 액세스 관리 페이지에서 Cloud Healthcare 서비스 에이전트 서비스 계정을 찾을 수 없습니다.
Cloud Healthcare 서비스 에이전트 서비스 계정은 찾을 수 있지만 Healthcare 서비스 에이전트 역할은 포함되어 있지 않습니다.
Google Cloud CLI를 사용하여 healthcare.serviceAgent 역할을 서비스 계정 식별자(service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com 형식 사용)를 사용하는 Cloud Healthcare Service Agent 서비스 계정에 추가합니다.
Updated IAM policy for project [PROJECT_ID].
bindings:
...
- members:
- serviceAccount:service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com
role: roles/healthcare.serviceAgent
...
etag: VALUE
version: VALUE
구성원 열에는 service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount 형식의 서비스 계정 식별자가 포함되어 있습니다.
구성원 열과 같은 행의 이름 열에는 Cloud Healthcare 서비스 에이전트가 포함되어 있습니다.
구성원 열과 같은 행의 역할 열에는 Healthcare 서비스 에이전트가 포함되어 있습니다.
누적 과부하로 인해 FHIR 트랜잭션 번들 취소됨
FHIR 트랜잭션 번들을 실행할 때 요청이 '트랜잭션 번들 실행에 대한 누적 과부하로 인해 취소됨'을 나타내는 오류 메시지가 수신될 수 있습니다.
트랜잭션 번들을 실행할 때 만들 수 있는 잠금 경합 양에는 제한이 없습니다. 예를 들어 각 번들에서 공통 환자 리소스 하나를 업데이트하고 공통적이지 않은 일부 다른 리소스도 만드는 번들 집합을 구축하고 동시에 실행하는 경우 모든 번들에서 전체 트랜잭션의 공통 환자를 잠가야 하므로 소요 시간이 빠르게 증가합니다. 이로 인해 시간이 제한되기 시작합니다. Cloud Healthcare API에서 트랜잭션 번들 제한 시간을 감지하면 이 오류 메시지가 있는 모든 트랜잭션 번들을 일시적으로 거부하여 경합을 해결합니다.
이 문제를 방지하려면 다음 중 하나를 시도해 보세요.
트랜잭션 시맨틱스가 필요하지 않은 경우 일괄 번들을 사용합니다. 일괄 번들은 원자적이지 않으므로 이 문제를 완전히 피할 수 있습니다. 하지만 이렇게 하면 참조 무결성 적용이 줄어듭니다.
동시에 업데이트되는 리소스를 식별할 수 있다면 업데이트를 제외하거나 피할 수 있는지 확인합니다. FHIR에서 Observation과 같은 새 리소스를 만들고 이미 존재하며 변경되지 않는 연결된 Patient(또는 Organization, Location, Device 등)를 업데이트하는 경우에도 이 문제가 발생합니다.
클라이언트 측에 대한 비율 제한은 트랜잭션 번들이 실행되는 데 시간이 오래 걸리는 경우 요청 시간이 초과되기 전에 수집 속도를 줄이세요.
[[["이해하기 쉬움","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-22(UTC)"],[[["\u003cp\u003eThis guide covers troubleshooting common issues encountered when using the Cloud Healthcare API, including permissions errors during API enablement and authentication problems.\u003c/p\u003e\n"],["\u003cp\u003eThe Cloud Healthcare Service Agent service account is essential for API functionality, and steps are provided to resolve issues if it's missing or lacks the required Healthcare Service Agent role.\u003c/p\u003e\n"],["\u003cp\u003eInstructions are included to add the \u003ccode\u003ehealthcare.serviceAgent\u003c/code\u003e role to the Cloud Healthcare Service Agent account using the Google Cloud CLI, if this is necessary.\u003c/p\u003e\n"],["\u003cp\u003eIf FHIR transactional bundles fail due to heavy load, suggestions include using batch bundles, reducing parallel updates on common resources, or implementing client-side rate limiting.\u003c/p\u003e\n"]]],[],null,["# Troubleshooting\n\nLearn about troubleshooting steps that you might find helpful\nif you run into problems using the Cloud Healthcare API.\n\nCannot enable the Cloud Healthcare API\n--------------------------------------\n\nWhen enabling the Cloud Healthcare API for the first time in your\nGoogle Cloud project, you might encounter a permissions error indicating\nthat you don't have permission to enable Google Cloud\nAPIs for your project.\n\nSee [Enabling and disabling APIs](/apis/docs/enable-disable-apis) for information\non how to enable Google Cloud APIs, including the Cloud Healthcare API.\n\nCannot authenticate to the Cloud Healthcare API\n-----------------------------------------------\n\nWhen calling the Cloud Healthcare API, you might receive an error message\nindicating that your \"Application Default Credentials\" are unavailable.\n\nSee [Authenticating to the API](/healthcare-api/docs/how-tos/authentication) for\ninformation on how to configure Application Default Credentials or how to\npass in authentication credentials manually to an application or command.\n\nMissing the Cloud Healthcare API service account or Healthcare Service Agent role\n---------------------------------------------------------------------------------\n\nThe **Cloud Healthcare Service Agent** service account is automatically created\nwhen you enable the Cloud Healthcare API and [create your first dataset](/healthcare-api/docs/datasets). This is a [Google-managed service account](/iam/docs/service-account-types#google-managed_service_accounts).\nYou cannot delete the service account entirely, but under certain circumstances\nit might not appear in the [Identity and Access Management page](https://console.cloud.google.com/iam-admin/iam)\nand you might encounter issues with the Cloud Healthcare API.\n\nFor the Cloud Healthcare API to function correctly and complete tasks like\npublishing and receiving messages from Pub/Sub or writing metrics to\nCloud Logging, the **Cloud Healthcare Service Agent** service account must\nexist and must have the **Healthcare Service Agent** IAM\nrole.\n\nYou can recreate the **Cloud Healthcare Service Agent** service account or\ngrant it the **Healthcare Service Agent** IAM\nrole if you encounter any of the following issues:\n\n- You cannot find the **Cloud Healthcare Service Agent** service account in the [Identity and Access Management page](https://console.cloud.google.com/iam-admin/iam).\n- You can find the **Cloud Healthcare Service Agent** service account, but it does not contain the **Healthcare Service Agent** role.\n\nUse the [Google Cloud CLI](/sdk/gcloud/reference/projects/add-iam-policy-binding)\nto add the `healthcare.serviceAgent` role to the\n**Cloud Healthcare Service Agent** service account using the\nservice account's identifier, which uses the format\n`service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-healthcare.iam.gserviceaccount.com`.\n\nTo recreate the service account or grant it the **Healthcare Service Agent** IAM\nrole, run the [`gcloud projects add-iam-policy-binding`](/sdk/gcloud/reference/projects/add-iam-policy-binding)\ncommand. To find the \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e and \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e,\nsee [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects). \n\n```bash\ngcloud projects add-iam-policy-binding PROJECT_ID \\\n --member=serviceAccount:service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com \\\n --role=roles/healthcare.serviceAgent\n```\n\nIf the request is successful, the command prompt displays a message similar to\nthe following sample: \n\n```\nUpdated IAM policy for project [PROJECT_ID].\nbindings:\n...\n- members:\n - serviceAccount:service-PROJECT_NUMBER@gcp-sa-healthcare.iam.gserviceaccount.com\n role: roles/healthcare.serviceAgent\n...\netag: VALUE\nversion: VALUE\n```\n\nReturn to the [Identity and Access Management page](https://console.cloud.google.com/iam-admin/iam)\nagain and verify the following:\n\n- The **Member** column contains a service account identifier in the format `service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-healthcare.iam.gserviceaccount`.\n- In the same row as the **Member** column, the **Name** column contains **Cloud Healthcare Service Agent**.\n- In the same row as the **Member** column, the **Role** column contains **Healthcare Service Agent**.\n\nFHIR transactional bundle aborted due to cumulative heavy load\n--------------------------------------------------------------\n\nWhen executing a FHIR transactional bundle, you might receive an error message\nindicating that the request is \"aborted due to cumulative heavy load for\nexecuting transactional bundle\".\n\nWhen you execute transactional bundles there is no bound on how much\nlock contention you can create. For example, if you construct a set of bundles\nwhere each bundle updates a single common Patient resource and also creates some\nother resources that are not common, and execute these in parallel, the time\nthey take will rapidly increase as every bundle has to hold the lock on that\ncommon Patient for the entire transaction. As a result, they will start to\ntime out. When the Cloud Healthcare API detects transactional bundles\ntiming out, it temporarily rejects all transactional bundles with this\nerror message to try to let the contention clear up.\n\nTo avoid this issue, you can try one of the following:\n\n- Use batch bundles if you do not need transaction semantics. Batch bundles avoid this problem entirely because they are not atomic. However, this reduces referential integrity enforcement.\n- If you can identify what resource is being updated in parallel, determine if those updates can be factored out or avoided. In FHIR, this happens if you are creating a new resource such as Observation and also updating the associated Patient (or Organization, Location, Device, etc.) that already exists and isn't changing.\n- Rate limiting on the client side; if your transactional bundles are taking a long time to execute, reduce the ingestion rate before the requests start timing out."]]