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

I have varnsih setup on my RHEL6.x. While the varnish, varnishlog and varnishstats show proper data varnisncsa does not log any data even when run without any options defined. I have lsofed all the process and ensured that they are reading the proper _.vsm file. what could be happening that is causing varnishncsa to give out a blank output?

My /etc/sysconfig/varnishncsa file is as follows

#NCSA log format, to be used by HTTP log analyzers
VARNISHNCSA_ENABLED=yes
# Include log entries which result from communication with a backend server.
LOG_BACKEND=no
# Include log entries which result from communication with a client.
LOG_CLIENT=yes
#extra options to varnishncsa
DAEMON_OPTS="$DAEMON_OPTS -F '%{Host}i %h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"'"
share|improve this question
    
have you checked for AVC denials (if SELinux is in enforcing mode)? –  dawud May 31 '13 at 20:47

1 Answer 1

Are you using Varnish as "transparent proxy" with "return(pipe)"?

In that case if you are using return(pipe) will have to change it to return(pass).

From https://www.varnish-cache.org/docs/2.1/tutorial/vcl.html

pass

When you return pass the request and subsequent response will be passed to and from the backend server. It will not be cached. pass can be returned from vcl_recv

pipe

Pipe can be returned from vcl_recv as well. Pipe short circuits the client and the backend connections and Varnish will just sit there and shuffle bytes back and forth. Varnish will not look at the data being send back and forth - so your logs will be incomplete. Beware That with HTTP 1.1 client can send several requests on the same connection and so You should instruct Varnish to add a "Connection: close" header pipe before actually returning.

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.