mondoohq / mondoo-operator

☸️ Mondoo Client Kubernetes Operator
https://mondoo.com
Other
35 stars 13 forks source link

Scan API errors on server connection #1090

Closed czunker closed 6 months ago

czunker commented 6 months ago

Describe the bug The logs show different errors when the Scan API tries to send data upstream.

ERR unable to create runtime for asset error="rpc error: code = Unavailable desc = error reading from server: EOF" asset=

Strange is also, that the asset has no name. Perhaps that is also part of the problem.

To Reproduce

??? Need to figure this out.

Steps to reproduce the behavior:

  1. Go to '...'
  2. Select '....'
  3. Scroll down to '....'
  4. Note the error

Expected behavior cnspec should be able to talk to upstream.

The asset should have a name.

Desktop (please complete the following information):

czunker commented 6 months ago

Just a thought: Or does this error happen during the communication to the k8s API?

But the default k8s client has a default retry, IIRC. It could be, the retry doesn't not happen for these errors.

czunker commented 6 months ago

Some other mentions of EOF errors: https://github.com/golang/go/issues/53472 Some of the linked issues: https://github.com/Dynatrace/dynatrace-configuration-as-code/pull/1143 https://github.com/0chain/gosdk/pull/915

czunker commented 6 months ago

As just discussed with @imilchev , this might be a race condition. It can happen that a provider is shutting down, and a new scan tries to use the provider instead of creating a new one.

imilchev commented 6 months ago

Fixed in mondoohq/cnquery#3775