Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

haproxy shows in log file (-1) as the status code

Tags:

haproxy

I have a strange status code in my log file of haproxy (Note that its not a customized log-format its the default one in log-http)

43.56.77.23:55309 [27/Oct/2015:20:14:34.749] front-http mybackend/app 349/0/-1/-1/359 **-1** 0 - - CC-- 1658/1658/21/21/0 0/0 "GET /img/button_bkg.png HTTP/1.1"

What does the -1 status code mean, i tried to find the solution online but unfortunately i could not find anything that resembles my problem.

Does anyone knows what this status code means?

like image 869
Eli Sapir Avatar asked Oct 27 '15 20:10

Eli Sapir


People also ask

How do you read HAProxy logs?

When you are troubleshooting HAProxy using its log file, examine /var/log/haproxy. log for errors using a tool like tail or less . For example, to view the last two lines of the log using tail , run the following command: sudo tail -n 2 /var/log/haproxy.

How can I check my HAProxy status?

Use this systemctl command to examine HAProxy's status on any Linux distribution: sudo systemctl status haproxy.

How do I enable HAProxy logs?

Logs can be enabled by adding the below line in the config of HAProxy. Lets break down what the above code means: log — adds a global syslog server. 127.0.


1 Answers

-1 indicates that the status code is not available. The reason is in the termination flags field.

See section 8.5 in the docs.

like image 123
Keith Avatar answered Oct 06 '22 12:10

Keith