[Varnish] #876: Can't start varnish: "SHMFILE owned by running varnishd master"

Varnish varnish-bugs at varnish-cache.org
Wed Mar 16 11:54:58 CET 2011


#876: Can't start varnish: "SHMFILE owned by running varnishd master"
-------------------+--------------------------------------------------------
 Reporter:  wijet  |        Type:  defect  
   Status:  new    |    Priority:  normal  
Milestone:         |   Component:  varnishd
  Version:  2.1.3  |    Severity:  normal  
 Keywords:         |  
-------------------+--------------------------------------------------------
 Sometimes I can't start varnish, I'm keep getting the following error:

 {{{
 storage_file: filename: /var/cache/varnish/todo-list-test.bin size 256 MB.
 SHMFILE owned by running varnishd master (pid=1891)
 (Use unique -n arguments if you want multiple instances.)
 }}}

 with different PID. What is interesting the PID doesn't belong to a
 varnish process.

 For starting varnish I use standard init.d script, which basically does
 {{{
 /usr/sbin/varnishd -a localhost:9169 -T localhost:9170 -f /etc/varnish
 /todo-list-test.vcl
 -n todo-list-test -u varnish -g varnish -s file,/var/cache/varnish/todo-
 list-test.bin,256M
 }}}

 I'm not sure if that's really a problem with varnish, because when do
 "ps", process with PID 1891 doesn't exist.

 However, a directory for that process in /proc exists. cat
 /proc/1891/cmdline returns

 {{{
 /usr/lib/erlang/erts-5.8/bin/beam.smp-Ww-Ktrue-A30-P1048576---root/usr/lib
 /erlang-prognameerl---
 home/var/lib/rabbitmq---pa/usr/lib/rabbitmq/lib/rabbitmq_server-1.8.1/sbin
 /../ebin-noshell-noinput-srabbit-
 snamerabbit at cc-bootstart_sasl-
 kernelinet_default_listen_options[{nodelay,true}]-
 kernelinet_default_connect_options[{nodelay,true}]-saslerrlog_typeerror-
 kernelerror_logger{file,"/var/log/rabbitmq/rabbit at cc.log"}-saslsasl_error_logger{file,"/var/log/rabbitmq/rabbit
 @cc-sasl.log"}-
 os_monstart_cpu_suptrue-os_monstart_disksupfalse-os_monstart_memsupfalse-
 mnesiadir"/var/lib/rabbitmq/mnesia/rabbit at cc"-
 noshell-noinput
 }}}

 In this example there is rabbitmq-server, but that can be any other
 process.

 Restarting the process which is inside that /proc/PID/cmdline, resolves
 the problem.

-- 
Ticket URL: <http://www.varnish-cache.org/trac/ticket/876>
Varnish <http://varnish-cache.org/>
The Varnish HTTP Accelerator




More information about the varnish-bugs mailing list