Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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 http://serverfault.com/a/202654/227214 ?

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

share|improve this answer

Your Answer

 
discard

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.