title: upstream connect error or disconnect/reset before headers. reset reason: connection failure. Spring Boot and java 11
body: <p>I'm having a problem migrating my pure Kubernetes app to an Istio managed. I'm using Google Cloud Platform (GCP), Istio 1.4, Google Kubernetes Engine (GKE), Spring Boot and JAVA 11.</p>
  <p>I had the containers running in a pure GKE environment without a problem. Now I started the migration of my Kubernetes cluster to use Istio. Since then I'm getting the following message when I try to access the exposed service.</p>
  <p><strong>upstream connect error or disconnect/reset before headers. reset reason: connection failure</strong></p>
  <p>This error message looks like a really generic. I found a lot of different problems, with the same error message, but no one was related to my problem.</p>
  <p>Bellow the version of the Istio:</p>
  <pre><code>client version: 1.4.10
  control plane version: 1.4.10-gke.5
  data plane version: 1.4.10-gke.5 (2 proxies)
  </code></pre>
  <p>Bellow my yaml files:</p>
  <pre><code>apiVersion: v1
  kind: ServiceAccount
  metadata:
    labels:
      account: tree-guest
    name: tree-guest-service-account
  ---
  apiVersion: v1
  kind: Service
  metadata:
    labels:
      app: tree-guest
      service: tree-guest
    name: tree-guest
  spec:
    ports:
    - name: http
      port: 8080
      targetPort: 8080
    selector:
      app: tree-guest
  ---
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    labels:
      app: tree-guest
      version: v1
    name: tree-guest-v1
  spec:
    replicas: 1
    selector:
      matchLabels:
        app: tree-guest
        version: v1
    template:
      metadata:
        labels:
          app: tree-guestaz
          version: v1
      spec:
        containers:
        - image: registry.hub.docker.com/victorsens/tree-quest:circle_ci_build_00923285-3c44-4955-8de1-ed578e23c5cf
          imagePullPolicy: IfNotPresent
          name: tree-guest
          ports:
          - containerPort: 8080
        serviceAccount: tree-guest-service-account
  ---
  apiVersion: networking.istio.io/v1alpha3
  kind: Gateway
  metadata:
    name: tree-guest-gateway
  spec:
    selector:
      istio: ingressgateway # use istio default controller
    servers:
      - port:
          number: 80
          name: http
          protocol: HTTP
        hosts:
          - &quot;*&quot;
  ---
  apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    name: tree-guest-virtual-service
  spec:
    hosts:
      - &quot;*&quot;
    gateways:
      - tree-guest-gateway
    http:
      - match:
          - uri:
              prefix: /v1
        route:
          - destination:
              host: tree-guest
              port:
                number: 8080
  </code></pre>
  <p>To apply the yaml file I used the following argument:</p>
  <pre><code>kubectl apply -f &lt;(istioctl kube-inject -f ./tree-guest.yaml)
  </code></pre>
  <p>Below the result of the Istio proxy argument, after deploying the application:</p>
  <pre><code>istio-ingressgateway-6674cc989b-vwzqg.istio-system SYNCED SYNCED SYNCED SYNCED 
  istio-pilot-ff4489db8-2hx5f 1.4.10-gke.5 tree-guest-v1-774bf84ddd-jkhsh.default SYNCED SYNCED SYNCED SYNCED istio-pilot-ff4489db8-2hx5f 1.4.10-gke.5
  </code></pre>
  <p>If someone have a tip about what is going wrong, please let me know. I'm stuck in this problem for a couple of days.</p>
  <p>Thanks.</p>