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
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.