opentelemetry-demo icon indicating copy to clipboard operation
opentelemetry-demo copied to clipboard

Checkout action is failed when deployed with istio

Open yuxiaoba opened this issue 1 year ago • 0 comments

Bug Report

opentelemetry-demo v1.0

kubernetes v1.21.0

istio v1.12.1

Symptom

I deploy demo with istio and inject sidecar into each service

kubectl get pod -n hipster
NAME                                     READY   STATUS    RESTARTS   AGE
adservice-df96df6b6-d26lq                2/2     Running   0          18m
cartservice-59745c54cd-6g9fq             2/2     Running   0          18m
checkoutservice-5579bf6d99-dxscr         2/2     Running   0          18m
currencyservice-55b99bb884-b2zc5         2/2     Running   0          18m
emailservice-6d8cd6f8b-9xljp             2/2     Running   0          18m
featureflagservice-756647f8cc-29s8r      2/2     Running   1          18m
ffspostgres-557f847d89-w5kbk             2/2     Running   0          18m
frontend-774674886c-sp2rx                2/2     Running   0          18m
paymentservice-75c79cb9b8-skpb5          2/2     Running   0          18m
productcatalogservice-66cdd77c46-hzrz8   2/2     Running   0          18m
quoteservice-6b9c7d8c9-n9gbf             2/2     Running   0          18m
recommendationservice-79f4666c65-4ldnc   2/2     Running   0          18m
redis-cart-77c468597f-klvmf              2/2     Running   0          18m
shippingservice-5b4d947646-sv8qc         2/2     Running   0          18m

When I click checkout button in the UI, the operation has any react for the click.

The frontend has some error logs

Error: 2 UNKNOWN: invalid float literal
    at Object.callErrorFromStatus (/app/node_modules/@grpc/grpc-js/build/src/call.js:31:26)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client.js:189:52)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:365:141)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:328:181)
    at /app/node_modules/@grpc/grpc-js/build/src/call-stream.js:187:78
    at processTicksAndRejections (node:internal/process/task_queues:78:11) {
  code: 2,
  details: 'invalid float literal',
  metadata: Metadata {
    internalRepr: Map(5) {
      'content-type' => [Array],
      'content-length' => [Array],
      'date' => [Array],
      'x-envoy-upstream-service-time' => [Array],
      'server' => [Array]
    },
    options: {}
  }
}

The checkout service also has some error output

{"message":"[PlaceOrder] user_id=\"576b61d0-8e82-43d0-a18e-03cafc026f27\" user_currency=\"CAD\"","severity":"info","timestamp":"2022-10-26T12:07:13.165389876Z"}
2022/10/26 12:08:04 max retry time elapsed: rpc error: code = Unavailable desc = upstream connect error or disconnect/reset before headers. reset reason: protocol error
2022/10/26 12:09:04 max retry time elapsed: rpc error: code = Unavailable desc = upstream connect error or disconnect/reset before headers. reset reason: protocol error

Additional Context

When I deploy demo without sidecar injection, I can click the check button normally.

Thus I think that this issue was introduced by istio proxy.

How can I deploy demo with istio successfully?

yuxiaoba avatar Oct 26 '22 12:10 yuxiaoba