Issue
In certain situations, when you click the button "Flink UI" in Ververica Platform, even if the Flink job started successfully and running fine, you may get the following error message, or the following if you are calling the REST API of Ververica Platform:
{ "timestamp" : "2023-02-13T10:56:32.910+00:00", "status" : 502, "error" : "Bad Gateway", "path" : "..." }
Environment
Ververica Platform 2.9.0 or earlier
Resolution
Turn on DEBUG logging in Ververica Platform, and check whether you see the error "Request header too large" in appmanager logs, for example:
2023-01-11 20:06:15.694 DEBUG 1 --- [flinkUiProxy-95] c.d.a.a.r.F.flinkUiProxy : 631584980 proxying failed
org.eclipse.jetty.http.BadMessageException: 500: Request header too large
at org.eclipse.jetty.client.http.HttpSenderOverHTTP$HeadersCallback.process(HttpSenderOverHTTP.java:235) ~[jetty-client-9.4.48.v20220622.jar:9.4.48.v20220622]
at org.eclipse.jetty.util.IteratingCallback.processing(IteratingCallback.java:241) ~[jetty-util-9.4.48.v20220622.jar:9.4.48.v20220622]
at org.eclipse.jetty.util.IteratingCallback.iterate(IteratingCallback.java:223)
…
If so, follow the instructions below.
#tabs
##VVP 2.9.1 or later
VVP 2.9.1 or later has a default header size limit of 8KB. If your header size needs to be larger than 8KB, add the following to your Values file (e.g., increase to 10KB):
env: - name: "server.max-http-header-size" value: "10KB"
Then upgrade your Ververica Platform, e.g., with helm:
helm upgrade [RELEASE] ververica/ververica-platform --version <version> \
--values your-values.yaml
##VVP 2.9.0 or earlier
VVP 2.9.0 or earlier has an effective header size limit of 4KB. Please check whether you can reduce your header size to below 4KB. If you cannot, you need to upgrade to VVP 2.9.1 or later to be able to configure the header size limit.
#--
Cause
Ververica Platform 2.9.0 or earlier uses the default header size limit of 4KB from jetty when it forwards the request to Flink JobManager, although the HTTP server running in Ververica Platform (tomcat in this case) can accept a header size of 8KB. This could be a problem if your header size is large than 4KB, e.g., when the header includes some SSL certificates. Ververica Platform 2.9.1 or later set the header size limit to the one configured for the HTTP server which can be configured via `server.max-http-header-size`.