带有PubSub的GKE上的Google Healthcare API-INVALID_ARGUMENT

时间:2019-04-11 17:37:02

标签: kubernetes google-cloud-platform google-kubernetes-engine google-cloud-pubsub hl7

我们一直在专门针对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

当我尝试从VM发送消息时,没有看到响应,并且pod中的日志显示了以下错误:

@Entity
public class Team {
    @Id @GeneratedValue long id;
    private String name;
}

@Entity
public class Player {
    @Id @GeneratedValue long id;
    long teamId;
    String name;
    String position;
}

此错误令人困惑,因为GKE群集和VM在同一区域/区域中。有人使用MLLP适配器和GKE遇到过类似的问题吗?

2 个答案:

答案 0 :(得分:3)

似乎HL7v2商店路径(在yaml,hl7_v2_location_id中)的location id参数可能丢失或不正确;该错误似乎是由于MLLP适配器向Cloud Healthcare API发出的请求引发的,而不是GKE特有的错误。

答案 1 :(得分:0)

问题是我指定位置/区域的方式:

最初,我的模板是这样的:

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"

谢谢。