Why HTTP_GET/SSL_GET is not re-enabling the real server after a downtime in Red Hat Enterprise Linux ?
Environment
- keepalived-1.2-10-2
- Red Hat Enterprise Linux 7
- HTTP_GET/SSL_GET configured to check for return status code 200
Issue
- Why HTTP_GET/SSL_GET is not re-enabling the real server after a downtime in Red Hat Enterprise Linux ?
- Keepalived is failing to re-enable the real server after a downtime when HTTP_GET/SSL_GET is used
Snip from the configuration
real_server 192.168.0.10 80 {
weight 1
HTTP_GET {
url {
path /index.php
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
status_code 200
}
Resolution
Correct the configuration error by moving the "status_code 200" to the url block so that it looks like
HTTP_GET {
url {
path /index.php
status_code 200
}
connect_timeout 3
nb_get_retry 3
delay_before_retry 3
}
Root Cause
The config parser in keepalived needs improvement to verify the "status_code" which is valid keyword for the virtual server is placed within in the URL block and not outside
.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
