<div dir="ltr"><div>Hi, Joao.</div><div><br></div><div>Can you post the output of following command:</div><div><br></div><div>#varnishd -C -f /etc/varnish/default.vcl</div><div><br></div><div>I hope it helps.</div><div><br>
</div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div><br></div><div><font color="#999999">Atenciosamente,</font></div><div><font color="#999999">Fábio Fraga Machado</font></div><div>
<div style="font-family:arial;font-size:small"><font color="#999999">Diretor de Tecnologia e Infraestrutura</font></div><div style="font-family:arial;font-size:small"><font color="#999999">Data Space Networks & TI</font></div>
</div><div style="font-family:arial;font-size:small"><font color="#999999"><br></font></div><div><font color="#999999">: Telefone: (48) 4052-9252</font></div><div><font color="#999999">: MSN: </font><span style="color:rgb(153,153,153)"> </span><a href="mailto:fabio@dataspace.com.br" target="_blank">fabio@dataspace.com.br</a></div>
<div><font color="#999999">: GTalk: <a href="mailto:fabio@dataspace.com.br" target="_blank">fabio@dataspace.com.br</a></font></div></div></div>
<br><br><div class="gmail_quote">On Wed, May 21, 2014 at 3:11 PM, Joao Rios <span dir="ltr"><<a href="mailto:jprr773@gmail.com" target="_blank">jprr773@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Hi ,<br><br></div>I am trying to run Varnish 3.0.5 on Centos 6.5 with no sucess.<br></div>After installing the rpm and follow the installation procedures, <br></div>it seems the service fails to start:<br>
<br># service varnish restart<br>Stopping Varnish Cache: [FAILED]<br>Starting Varnish Cache: [ OK ]<br><br></div><div></div><div>I really appreciate in advance all the help you can give.<br><br></div><div><br>
</div>Here are the details:<br><br><br>installed Varnish For RHEL 6:<br># rpm --nosignature -i <a href="http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm" target="_blank">http://repo.varnish-cache.org/redhat/varnish-3.0/el6/noarch/varnish-release/varnish-release-3.0-1.el6.noarch.rpm</a><br>
<br>and then:<br><br><br># yum install varnish<br><br><br>Centos Version:<br><br>#cat /etc/redhat-release<br>CentOS release 6.5 (Final)<br><br>Apache version:<br># httpd -v<br>Server version: Apache/2.2.27 (Unix)<br>Server built: May 17 2014 12:17:16<br>
Cpanel::Easy::Apache v3.24.18 rev9999<br><br><br><br>Varnish version:<br># varnishd -V<br>varnishd (varnish-3.0.5 revision 1a89b1f)<br>Copyright (c) 2006 Verdens Gang AS<br>Copyright (c) 2006-2011 Varnish Software AS<br>
<br>
<br># service varnish restart<br>Stopping Varnish Cache: [FAILED]<br>Starting Varnish Cache: [ OK ]<br><br><br>Configuration:<br><br># /etc/sysconfig/varnish<br><br><br># Configuration file for varnish<br>#<br>
# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this<br># shell script fragment.<br>#<br><br># Maximum number of open files (for ulimit -n)<br>NFILES=131072<br><br># Locked shared memory (for ulimit -l)<br>
# Default log size is 82MB + header<br>MEMLOCK=82000<br><br># Maximum number of threads (for ulimit -u)<br>NPROCS="unlimited"<br><br># Maximum size of corefile (for ulimit -c). Default in Fedora is 0<br># DAEMON_COREFILE_LIMIT="unlimited"<br>
<br># Set this to 1 to make init script reload try to switch vcl without restart.<br># To make this work, you need to set the following variables<br># explicit: VARNISH_VCL_CONF, VARNISH_ADMIN_LISTEN_ADDRESS,<br># VARNISH_ADMIN_LISTEN_PORT, VARNISH_SECRET_FILE, or in short,<br>
# use Alternative 3, Advanced configuration, below<br>RELOAD_VCL=1<br><br># This file contains 4 alternatives, please use only one.<br><br>## Alternative 1, Minimal configuration, no VCL<br>#<br># Listen on port 6081, administration on localhost:6082, and forward to<br>
# content server on localhost:8080. Use a fixed-size cache file.<br>#<br>#DAEMON_OPTS="-a :6081 \<br># -T localhost:6082 \<br># -b localhost:8080 \<br># -u varnish -g varnish \<br>
# -s file,/var/lib/varnish/varnish_storage.bin,1G"<br><br><br><br>## Alternative 2, Configuration with VCL<br>#<br># Listen on port 6081, administration on localhost:6082, and forward to<br># one content server selected by the vcl file, based on the request. Use a<br>
# fixed-size cache file.<br>#<br>###DAEMON_OPTS="-a :80 -T localhost:6082 -f /etc/varnish/default.vcl -u varnish -g varnish -S /etc/varnish/secret -s file,/var/lib/varnish/varnish_storage.bin,256m"<br><br>## Alternative 3, Advanced configuration<br>
#<br># See varnishd(1) for more information.<br>#<br># # Main configuration file. You probably want to change it :)<br>VARNISH_VCL_CONF=/etc/varnish/default.vcl<br>#<br># # Default address and port to bind to<br># # Blank address means all IPv4 and IPv6 interfaces, otherwise specify<br>
# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.<br>VARNISH_LISTEN_ADDRESS=<a href="tel:37.61.236.139" value="+553761236139" target="_blank">37.61.236.139</a><br>VARNISH_LISTEN_PORT=80<br>#<br># # Telnet admin interface listen address and port<br>
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1<br>
VARNISH_ADMIN_LISTEN_PORT=6082<br>#<br># # Shared secret file for admin interface<br>VARNISH_SECRET_FILE=/etc/varnish/secret<br>#<br># # The minimum number of worker threads to start<br>VARNISH_MIN_THREADS=50<br>#<br># # The Maximum number of worker threads to start<br>
VARNISH_MAX_THREADS=1000<br>#<br># # Idle timeout for worker threads<br>VARNISH_THREAD_TIMEOUT=120<br>#<br># # Cache file location<br>VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin<br>#<br># # Cache file size: in bytes, optionally using k / M / G / T suffix,<br>
# # or in percentage of available disk space using the % suffix.<br>VARNISH_STORAGE_SIZE=256m<br>#<br># # Backend storage specification<br>VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}"<br>
#<br># # Default TTL used when the backend does not specify one<br>VARNISH_TTL=120<br>#<br># # DAEMON_OPTS is used by the init script. If you add or remove options, make<br># # sure you update this section, too.<br>DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT}<br>
-f ${VARNISH_VCL_CONF}<br> -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT}<br> -t ${VARNISH_TTL}<br> -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT}<br>
-u varnish<br> -g varnish -S ${VARNISH_SECRET_FILE} -s ${VARNISH_STORAGE}"<br><br><br><br>## Alternative 4, Do It Yourself. See varnishd(1) for more information.<br>#<br># DAEMON_OPTS=""<br>
<br><br><br><br>/etc/varnich/default.vcl<br><br># This is a basic VCL configuration file for varnish. See the vcl(7)<br># man page for details on VCL syntax and semantics.<br>#<br># Default backend definition. Set this to point to your content<br>
# server.<br>#<br>backend default {<br> .host = "127.0.0.1";<br> .port = "80";<br>}<br>#<br># Below is a commented-out copy of the default VCL logic. If you<br># redefine any of these subroutines, the built-in logic will be<br>
# appended to your code.<br># sub vcl_recv {<br># if (req.restarts == 0) {<br># if (req.http.x-forwarded-for) {<br># set req.http.X-Forwarded-For =<br># req.http.X-Forwarded-For + ", " + client.ip;<br>
# } else {<br># set req.http.X-Forwarded-For = client.ip;<br># }<br># }<br># if (req.request != "GET" &&<br># req.request != "HEAD" &&<br># req.request != "PUT" &&<br>
# req.request != "POST" &&<br># req.request != "TRACE" &&<br># req.request != "OPTIONS" &&<br># req.request != "DELETE") {<br># /* Non-RFC2616 or CONNECT which is weird. */<br>
# return (pipe);<br># }<br># if (req.request != "GET" && req.request != "HEAD") {<br># /* We only deal with GET and HEAD by default */<br># return (pass);<br># }<br>
# if (req.http.Authorization || req.http.Cookie) {<br># /* Not cacheable by default */<br># return (pass);<br># }<br># return (lookup);<br># }<br><br># sub vcl_pipe {<br># # Note that only the first request to the backend will have<br>
# # X-Forwarded-For set. If you use X-Forwarded-For and want to<br># # have it set for all requests, make sure to have:<br># # set bereq.http.connection = "close";<br># # here. It is not set by default as it might break some broken web<br>
# # applications, like IIS with NTLM authentication.<br># return (pipe);<br># }<br>#<br># sub vcl_pass {<br># return (pass);<br># }<br>#<br># sub vcl_hash {<br># hash_data(req.url);<br># if (req.http.host) {<br>
# hash_data(req.http.host);<br># } else {<br># hash_data(server.ip);<br># }<br># return (hash);<br># }<br>#<br><br># sub vcl_hit {<br># return (deliver);<br># }<br>#<br># sub vcl_miss {<br>
# return (fetch);<br># }<br>#<br># sub vcl_fetch {<br># if (beresp.ttl <= 0s ||<br># beresp.http.Set-Cookie ||<br># beresp.http.Vary == "*") {<br># /*<br># * Mark as "Hit-For-Pass" for the next 2 minutes<br>
# */<br># set beresp.ttl = 120 s;<br># return (hit_for_pass);<br># }<br># return (deliver);<br># }<br>#<br># sub vcl_deliver {<br># return (deliver);<br># }<br><br># sub vcl_error {<br>
# set obj.http.Content-Type = "text/html; charset=utf-8";<br># set obj.http.Retry-After = "5";<br># synthetic {"<br># <?xml version="1.0" encoding="utf-8"?><br>
# <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"<br># "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"><br>
# <html><br>
# <head><br># <title>"} + obj.status + " " + obj.response + {"</title><br># </head><br># <body><br># <h1>Error "} + obj.status + " " + obj.response + {"</h1><br>
# <p>"} + obj.response + {"</p><br># <h3>Guru Meditation:</h3><br># <p>XID: "} + req.xid + {"</p><br># <hr><br># <p>Varnish cache server</p><br>
# </body><br># </html><br># "};<br># return (deliver);<br># }<br>#<br># sub vcl_init {<br># return (ok);<br># }<br>#<br># sub vcl_fini {<br># return (ok);<br># }<br><br><br><br><br><br>
<br>
<br><br><div><div><div><br><br><br></div></div></div></div>
<br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br></div>