Istio fails with wss websockets - http-parser - HPE_INVALID_CONSTANT

8/11/2021

After upgrading from 1.7.3 to 1.10.2, our springboot applications using wss fail.

Using wscat to test it, we see 502/503 errors instead of the 101 responses we expect to see with no errors. The command used to test is as follows:

wscat -c "wss://cluster-name.internal.domain.etc/inbox/application-name/rsocket" -H "Connection: Upgrade" -H "Upgrade: websocket"

Enabling debug for istio shows this:

application-name-64d8d8d787-29m5x istio-proxy {"level":"debug","time":"2021-08-10T12:30:16.954905Z","scope":"envoy client","msg":"[C4438] Error dispatching received data: http/1.1 protocol error: HPE_INVALID_CONSTANT"}

This HPE_INVALID_CONSTANT seems to come this github project which maps to this technical debt of istio here.

We tried changing port names to match "tcp" or "http" or "https" or "http2" and although response codes change, things still don't work.

Any suggestions/idea on what could we do to make this work?

-- Sebastián Greco
istio
kubernetes
spring-boot
websocket

0 Answers