defguard icon indicating copy to clipboard operation
defguard copied to clipboard

Defguard crashes after proxy stops

Open teon opened this issue 1 year ago • 1 comments

Reproduction:

#1

  1. Upgraded core from 0.10.0 to 0.11.0 without problems. Even core connected to the old 0.4.0 proxy.
  2. I've started the proxy upgrade process (docker down, pull, ...)
  3. During that time the proxy was not reachable
  4. Defguard core crashed, by going into infinite loop with logs:
defguard | 2024-07-04T15:37:47.643754Z  INFO defguard::grpc: Received message from proxy
defguard | 2024-07-04T15:37:47.643757Z ERROR defguard::grpc: stream error status: Internal, message: "Unexpected EOF decoding stream.", details: [], metadata: MetadataMap { headers: {} }
defguard | 2024-07-04T15:37:47.643760Z  INFO defguard::grpc: Received message from proxy
defguard | 2024-07-04T15:37:47.643763Z ERROR defguard::grpc: stream error status: Internal, message: "Unexpected EOF decoding stream.", details: [], metadata: MetadataMap { headers: {} }
defguard | 2024-07-04T15:37:47.643767Z  INFO defguard::grpc: Received message from proxy
defguard | 2024-07-04T15:37:47.643769Z ERROR defguard::grpc: stream error status: Internal, message: "Unexpected EOF decoding stream.", details: [], metadata: MetadataMap { headers: {} }
...
(100000 more lines :D )

2

  1. Upgraded the proxy & lanched new one
  2. Restarted core to connect to new proxy
  3. bliss . works. but:
  4. Stoped proxy
  5. Again core infinite looop and isn't reachable and logs the same as above.

teon avatar Jul 04 '24 15:07 teon

The problem occurs when proxying the Proxy via Nginx.

Work around in #662

moubctez avatar Jul 05 '24 12:07 moubctez

Done in 0.11.0

teon avatar Aug 15 '24 14:08 teon