Issue
-
Upgrading to Jenkins 2.0 with HA (active/passive) caused the following error:
WARNING o.e.jetty.util.log.JavaUtilLog#warn: badMessage: 400 Bad Host header for HttpChannelOverHttp@123456{r=0,c=false,a=IDLE,uri=/ha/health-check}
Resolution
In Jenkins 2.7.19, Jetty was upgraded from 8.1 to 9.2 which removes AJP functionality, and also requires that if the HOST:
field is used it can not be empty.
Example of invalid string for health check:
GET /ha/health-check HTTP/1.1\r\nHOST: \r\nConnection: Close\r\n\r\n
Example of good string for health check:
GET /ha/health-check HTTP/1.1\r\nHOST:null \r\nConnection: Close\r\n\r\n
The issue is tracked as JENKINS-40693