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?

Eli Sapir
  • 71
  • 1
  • 3

1 Answers1

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.

Keith
  • 339
  • 2
  • 16
  • what could possible be the reason for this error ? – jAckOdE Dec 31 '20 at 23:12
  • 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 section – Keith Jan 02 '21 at 00:08
  • 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. – Mikko Rantalainen Jun 09 '22 at 13:40