[SOLVED] Re: varnishd working fine, but no output on varnishncsa/varnishlog/varnishstat

Javi Lavandeira javi at lavandeira.net
Fri Jun 22 18:39:22 CEST 2012


Hello again,

I found out what was wrong. I needed to add -F to the command line in the property list that launches Varnish from launchctl. 

This is the plist file that works, in case someone else has the same issue:

[root]cache:~ # cat /Library/LaunchDaemons/org.macports.varnish.plist 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>org.macports.varnish</string>
  <key>ProgramArguments</key>
  <array>
    <string>/opt/local/sbin/varnishd</string>
    <string>-F</string>
    <string>-f</string>
    <string>/opt/local/etc/varnish/default.vcl</string>
    <string>-s</string>
    <string>malloc,3G</string>
    <string>-T</string>
    <string>127.0.0.1:2000</string>
    <string>-a</string>
    <string>0.0.0.0:80</string>
  </array>
  <key>KeepAlive</key>
  <true/>
  <key>RunAtLoad</key>
  <true/>
  <key>WorkingDirectory</key>
  <string>/opt/local/sbin</string>
  <key>StandardErrorPath</key>
  <string>/var/log/varnish.log</string>
  <key>StandardOutPath</key>
  <string>/var/log/varnish.log</string>
</dict>
</plist>


Regards,

--
Javi Lavandeira
http://www.lavandeira.net

On Jun 23, 2012, at 1:27 AM, Javi Lavandeira wrote:

> Hello,
> 
> I have Varnish 3.0.2 running on an OS X Lion Server machine (10.7.3), installed from MacPorts. Varnish works fine (it's serving my site), but I get no output when I run varnishncsa/varnishlog/varnishstat.
> 
> Any idea on what I'm doing wrong?
> 
> Here's my config file just in case, though there's nothing especial on it; it's just the typical Wordpress cookie/admin settings, purge support and X-Forwarded-For: header for the Apache backend: http://pastebin.com/tgrbYw26
> 
> Also, these are the related paths, binary versions and command line that I'm using:
> 
> [root]cache:~ # which varnishstat
> /opt/local/bin/varnishstat
> [root]cache:~ # which varnishd
> /opt/local/sbin/varnishd
> [root]cache:~ # varnishd -V
> varnishd (varnish-3.0.2 revision 55e70a4)
> Copyright (c) 2006 Verdens Gang AS
> Copyright (c) 2006-2011 Varnish Software AS
> [root]cache:~ # varnishstat -V
> varnishstat (varnish-3.0.2 revision 55e70a4)
> Copyright (c) 2006 Verdens Gang AS
> Copyright (c) 2006-2011 Varnish Software AS
> 
> [root]cache:~ # ps -ef |grep varnishd
>     0 19790     1   0 Tue11AM ??         0:08.19 /opt/local/sbin/varnishd -f /opt/local/etc/varnish/default.vcl -s malloc,3G -T 127.0.0.1:2000 -a 0.0.0.0:80
>    -2 41275 19790   0  4:09AM ??         0:33.84 /opt/local/sbin/varnishd -f /opt/local/etc/varnish/default.vcl -s malloc,3G -T 127.0.0.1:2000 -a 0.0.0.0:80
>     0 13266 13224   0  1:10AM ttys000    0:00.00 grep varnishd
> 
> [root]cache:~ # system_profiler SPSoftwareDataType
> Software:
> 
>     System Software Overview:
> 
>       System Version: Mac OS X 10.7.3 (11D50)
>       Kernel Version: Darwin 11.3.0
>       Boot Volume: HD1
>       Boot Mode: Normal
>       Computer Name: cache
>       User Name: System Administrator (root)
>       Secure Virtual Memory: Enabled
>       64-bit Kernel and Extensions: Yes
>       Time since boot: 5 days 44 minutes
> 
> [root]cache:~ # uname -a
> Darwin cache.local 11.3.0 Darwin Kernel Version 11.3.0: Thu Jan 12 18:47:41 PST 2012; root:xnu-1699.24.23~1/RELEASE_X86_64 x86_64
> 
> [root]cache:~ # port info varnish
> Warning: port definitions are more than two weeks old, consider using selfupdate
> varnish @3.0.2 (www)
> Variants:             universal
> 
> Description:          Varnish was written from the ground up to be a high performance caching reverse proxy.
> Homepage:             http://www.varnish-cache.org
> 
> Build Dependencies:   pkgconfig
> Library Dependencies: pcre
> Platforms:            darwin
> License:              unknown
> Maintainers:          pmq at macports.org, openmaintainer at macports.org
> 
> Thanks in advance,
> 
> --
> Javi Lavandeira
> http://www.lavandeira.net
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120623/8958474e/attachment-0001.html>


More information about the varnish-misc mailing list