我们一直在用HL7专门测试Google Healthcare API,当我完成教程时,我遇到了障碍。我应该提到,我在 Kubernetes 和 AWS 方面有相当多的经验,但没有那么多的 Google Cloud。
这一步给我带来了麻烦:
https://cloud.google.com/healthcare/docs/how-tos/mllp-adapter#creating_a_compute_engine_vm_and_sending_messages
当我尝试从虚拟机发送消息时,我没有看到响应,并且 Pod 中的日志显示以下错误:
I0411 17:27:33.756432 1 healthapiclient.go:163] Dialing connection to https://healthcare.googleapis.com:443/v1beta1
I0411 17:27:58.809932 1 mllpreceiver.go:107] Accepted connection from 10.128.0.5:58698
I0411 17:27:58.810140 1 healthapiclient.go:182] Sending message of size 319.
E0411 17:27:58.880369 1 mllpreceiver.go:118] handleMessage: Send: request failed: 400
{
"error": {
"code": 400,
"message": "location ID invalid, expected us-central1",
"status": "INVALID_ARGUMENT"
}
}
I0411 17:27:58.880691 1 mllpreceiver.go:119] Closed connection from 10.128.0.5:58698
此错误令人困惑,因为 GKE 群集和 VM 位于同一区域/区域中。有没有人在使用 MLLP 适配器和 GKE 时遇到过类似的问题?
HL7v2 存储路径中的位置 id 参数(在 yaml 中,hl7_v2_location_id
(似乎可能丢失或不正确; 该错误看起来像是从 MLLP 适配器对云医疗保健 API 的请求中引发的,而不是 GKE 特有的任何内容。
问题是我指定位置/区域的方式:
最初我的模板是这样的:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mllp-adapter-deployment
spec:
replicas: 1
template:
metadata:
labels:
app: mllp-adapter
spec:
containers:
- name: mllp-adapter
imagePullPolicy: Always
image: gcr.io/cloud-healthcare-containers/mllp-adapter
ports:
- containerPort: 2575
protocol: TCP
name: "port"
command:
- "/usr/mllp_adapter/mllp_adapter"
- "--port=2575"
- "--hl7_v2_project_id=XXXXXXXXXXXXX"
- "--hl7_v2_location_id=us-central1-b"
- "--hl7_v2_dataset_id=XXX-test-set"
- "--hl7_v2_store_id=hlstore"
- "--api_addr_prefix=https://healthcare.googleapis.com:443/v1beta1"
- "--logtostderr"
- "--receiver_ip=0.0.0.0"
- "--pubsub_project_id=XXXXXXXX-api-dev"
- "--pubsub_subscription=XX-incomingsub"
并且需要像这样指定location_id
:
- "--hl7_v2_location_id=us-central1"
谢谢。