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

1

7

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?

Mastic answered 27/10, 2015 at 20:41 Comment(0)
D
5

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

See section 8.5 in the docs.

Dolora answered 8/3, 2017 at 17:13 Comment(3)
what could possible be the reason for this error ?Ciccia
It means the session was terminated before it finished, so there's no status code. The reason is in the "termination flags" field. I've updated the docs link to the HTML version, including an anchor that goes directly to the relevant sectionDolora
See the string of letters after the status code (termination_state). It's the string of four dashes for successful request but it contains one of the letters explained in the section 8.5 (see above answer). For example, C--- means that the client connection aborted (e.g. mobile connection went out of range). LR-- means that the response was provided by HAProxy cache without consulting the backend servers – I haven't been able to figure out why these have -1 as the status code because it should match the cached status in my opinion.Mortmain

© 2022 - 2024 — McMap. All rights reserved.