Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to figure out why i'm getting BADREQs from time to time, by using "show errors" in socat. The problem is that it only shows the last error. I want to be able to see all of them ( like using tail -f ... | grep something).

can somebody tell me please how can I continuously show these BADREQs? with or without socat?

The real problem is that I'm getting BADREQs in haproxy log, but [echo "show errors" | socat unix-connect:/var/run/haproxy.sock stdio] does not catch them. Is it something with haproxy configuration?

share|improve this question

Since show errors is defined as:

show errors : report last request and response errors for each proxy

I think you might be out of luck. However, with a little shell scripting, you should be able to collect enough of them in a file to get to the bottom of it:

#Run the command every 10 seconds, appending to the errors file in the current directory
nohup bash -c 'while true; do echo "show errors" | socat stdio /var/run/haproxy-t1.stat; sleep 10; done >> errors'
share|improve this answer

maybe the increasing counter means no real "bad requests", but things like port scans, as mentioned in ?

I also notice increasing badreq-counters without matching entries in "show errors".

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.