2

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\"'"
nashrafeeq
  • 255
  • 1
  • 3
  • 12

1 Answers1

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.