Jail options were implemented and the old options got dropped. Maybe we can do something like: --- varnishd.virgin 2015-12-08 06:42:14.397997561 +0000 +++ varnishd 2015-12-08 06:53:38.288324140 +0000 @@ -12,10 +12,6 @@ # Alternatively, don't listen to a backend VARNISHD_OPTS="-a 127.0.0.1:8080" - -# User/Group -VARNISHD_OPTS="${VARNISHD_OPTS} -u varnish -g varnish" - # You may need to increase the number of open files (-n) # and the maximum amount off locked memory (-l) # See bug #459142 --- varnishd.virgin 2015-12-08 06:42:14.324997425 +0000 +++ varnishd 2015-12-08 06:54:52.063384765 +0000 @@ -7,7 +7,7 @@ CONFIGFILES="${CONFIGFILE:-/etc/varnish/default.vcl}" command="${VARNISHD:-/usr/sbin/varnishd}" -command_args="-P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}" +command_args="-j unix,user=varnish -P ${VARNISHD_PID} -f ${CONFIGFILE} ${VARNISHD_OPTS}" pidfile="${VARNISHD_PID}" extra_commands="configtest" I tried altering the conf.d, but it reports that the jail option must be the first argument.
The first diff is from conf.d/varnishd, the second is init.d/varnishd, forgot the mention that but I think it's obvious ;)
idl0r, any comments?
(In reply to Anthony Basile from comment #2) > idl0r, any comments? Yeah, we'll have to remove -u/-g since user/group is hardcoded in 4.1. It's just "varnish" AFAIR.
i added 4.1.1 to the tree with this change. can you please test 4.1.1. also, I would appreciate a suggestion for a default /etc/varnish/default.vcl so that it works out of the box.
Version 4.1.0 still fails in the default configuration. # /etc/init.d/varnishd restart * Caching service dependencies ... [ ok ] * Starting varnishd ... /usr/sbin/varnishd: invalid option -- 'u' usage: varnishd [options] -a address[:port][,proto] # HTTP listen address and port (default: *:80) # address: defaults to loopback # port: port or service (default: 80) # proto: HTTP/1 (default), PROXY -b address[:port] # backend address and port # address: hostname or IP # port: port or service (default: 80) -C # print VCL code compiled to C language -d # debug -F # Run in foreground -f file # VCL script -h kind[,hashoptions] # Hash specification # -h critbit [default] # -h simple_list # -h classic # -h classic,<buckets> -i identity # Identity of varnish instance -j jail[,jailoptions] # Jail specification # -j unix[,user=<user>][,ccgroup=<group>] # -j none -l vsl[,vsm] # Size of shared memory file # vsl: space for VSL records [80m] # vsm: space for stats counters [1m] -M address:port # Reverse CLI destination -n dir # varnishd working directory -P file # PID file -p param=value # set parameter -r param[,param...] # make parameter read-only -S secret-file # Secret file for CLI authentication -s [name=]kind[,options] # Backend storage specification # -s malloc[,<size>] # -s file,<dir_or_file> # -s file,<dir_or_file>,<size> # -s file,<dir_or_file>,<size>,<granularity> # -s persistent (experimental) -T address:port # Telnet listen address and port -t TTL # Default TTL -V # version -W waiter # Waiter implementation # -W epoll # -W poll * start-stop-daemon: failed to start `/usr/sbin/varnishd' * Failed to start varnishd [ !! ] * ERROR: varnishd failed to start
(In reply to Tomáš Mózes from comment #5) > Version 4.1.0 still fails in the default configuration. > > I took 4.1.0 off the tree. Please use 4.1.2.
Yes that works fine, thanks Anthony.