0

I upgraded from Varnish 4.0 to 4.1, had one minor issue at the beginning and fixed that and was up and running. I needed to clear the cache and when I restarted Varnish it said "Starting", but when checking the status it shows stopped. Nothing has changed on the system or the configs. Varnish.log is empty and messages shows

System: CentOS 6.7 Varnish: 4.1.0-1

Nov 30 23:30:42 www varnishd[16665]: Child (16667) not responding to CLI, killing it.
Nov 30 23:30:42 www varnishd[16665]: Child (16667) died signal=11 (core dumped)
Nov 30 23:30:42 www varnishd[16665]: Child (16667) Panic message:#012 Assert error in child_sigsegv_handler(), mgt/mgt_child.c line 297:#012  Condition(Segmentation fault by instruction at 0x205970) not true.#012thread = (cache-worker)#012version = varnish-4.1.0 revision 3041728#012ident = Linux,2.6.32-573.8.1.el6.x86_64,x86_64,-junix,-smalloc,-smalloc,-hcritbit,epoll#012Backtrace:#012  0x432483: varnishd() [0x432483]#012  0x450de9: varnishd() [0x450de9]#012  0x34a480f790: libpthread.so.0() [0x34a480f790]#012  0x43c2b9: varnishd(VCL_DefaultDirector+0x19) [0x43c2b9]#012  0x436b9e: varnishd(CNT_Request+0x74e) [0x436b9e]#012  0x44cc3b: varnishd(HTTP1_Session+0x11b) [0x44cc3b]#012  0x439921: varnishd(SES_Proto_Req+0x61) [0x439921]#012  0x447aed: varnishd() [0x447aed]#012  0x447eeb: varnishd() [0x447eeb]#012  0x34a4807a51: libpthread.so.0() [0x34a4807a51]#012req = 0x7fe026896020 {#012  vxid = 2, step = R_STP_RECV,#012  req_body = R_BODY_NONE,#012  restarts = 0, esi_level = 0,#012  sp = 0x7fe02640f420 {#012    fd = 13, vxid = 1,#012    client = 180.76.15.6 56796,#012    step = S_STP_H1PROC,#012  },#012  worker = 0x7fe02d7eebc0 {#012    stack = {0x7fe02d7ef000 -> 0x7fe02d7e3000},#012    ws = 0x7fe02d7eedb8 {#012      id = "wrk",#012      {s,f,r,e} = {0x7fe02d7ee380,0x7fe02d7ee380,(nil),+2040},#012    },#012    VCL::method = none,#012    ws = 0x7fe026896200 {#012      id = "req",#012      {s,f,r,e} = {0x7fe026898000,+216,(nil),+57336},#012    },#012    http_conn = 0x7fe026896128 {#012      fd = 13,#012      doclose = NULL,#012      ws = 0x7fe026896200,#012      {rxbuf_b, rxbuf_e} = {0x7fe026898000, 0x7fe0268980b8},#012      {pipeline_b, pipeline_e} = {(nil), (nil)},#012      content_length = -1,#012      body_status = none,#012      first_byte_timeout = 0.000000,#012      between_bytes_timeout = 0.000000,#012    },#012    http[req] = 0x7fe026896298 {#012      ws[req] = 0x7fe026896200,#012      hdrs {#012        "GET",#012        "/",#012        "HTTP/1.1",#012        "Host: wsww",#012        "Accept-Lang
Nov 30 23:30:42 www varnishd[16665]: child (17228) Started
Nov 30 23:30:43 www varnishd[16665]: Pushing vcls failed:#012Could not load compiled VCL.#012#011dlopen(vcl_boot/vgc.so) = vcl_boot/vgc.so: cannot open shared object file: No such file or directory
Nov 30 23:30:44 www varnishd[16665]: Child (17228) ended
Nov 30 23:30:44 www varnishd[16665]: Child (17228) said Child starts
Nov 30 23:30:44 www varnishd[16665]: Child (17228) said Child dies
Nov 30 23:32:20 www varnishd[16665]: Manager got SIGINT
Nov 30 23:32:24 www varnishd[18670]: Platform: Linux,2.6.32-573.8.1.el6.x86_64,x86_64,-junix,-smalloc,-smalloc,-hcritbit
Nov 30 23:32:24 www varnishd[18670]: child (18672) Started
Nov 30 23:32:24 www varnishd[18670]: Child (18672) said Child starts
Nov 30 23:32:51 www varnishd[18670]: Manager got SIGINT
Nov 30 23:32:52 www varnishd[18670]: Child (18672) ended
Nov 30 23:32:52 www varnishd[18670]: Child (18672) said Child die

My default.vcl which was working just fine until that last restart of the service and was the default.vcl that came with the install:

#
# This is an example VCL file for Varnish.
#
# It does not do anything by default, delegating control to the
# builtin VCL. The builtin VCL is called when there is no explicit
# return statement.
#
# See the VCL chapters in the Users Guide at https://www.varnish-cache.org/docs/
# and http://varnish-cache.org/trac/wiki/VCLExamples for more examples.

# Marker to tell the VCL compiler that this VCL has been adapted to the
# new 4.0 format.
vcl 4.0;

# Default backend definition. Set this to point to your content server.
backend default {
.host = "127.0.0.1";
.port = "8080";
}

sub vcl_recv {
# Happens before we check if we have this in cache already.
#
# Typically you clean up the request here, removing cookies you don't need,
# rewriting the request, etc.
}

sub vcl_backend_response {
# Happens after we have read the response headers from the backend.
#
# Here you clean the response headers, removing silly Set-Cookie headers
# and other mistakes your backend does.
}
# Below is a commented-out copy of the default VCL logic.  If you
# redefine any of these subroutines, the built-in logic will be
# appended to your code.
sub vcl_recv {
 if (req.restarts == 0) {
    if (req.http.x-forwarded-for) {
        set req.http.X-Forwarded-For =
            req.http.X-Forwarded-For + ", " + client.ip;
    } else {
        set req.http.X-Forwarded-For = client.ip;
    }
}
sub vcl_pipe {
#     # Note that only the first request to the backend will have
#     # X-Forwarded-For set.  If you use X-Forwarded-For and want to
#     # have it set for all requests, make sure to have:
  set bereq.http.connection = "close";
#     # here.  It is not set by default as it might break some broken web
#     # applications, like IIS with NTLM authentication.
 return (pipe);
}
  • something else was updated as well, you need to look into that rather than varnish – alexus Dec 2 '15 at 5:03
  • such as? I have not done any updates since the upgrade from V4 to V4.1 – Pure Geek Dec 2 '15 at 5:30
  • Downgrading to V4 got be back online so it is something with V4.1 – Pure Geek Dec 2 '15 at 5:48
0
Nov 30 23:30:43 www varnishd[16665]: Pushing vcls failed:#012Could not load compiled VCL.#012#011dlopen(vcl_boot/vgc.so) = vcl_boot/vgc.so: cannot open shared object file: No such file or directory

I'm not sure about this one, could you paste your .vcl files? I guess it comes from your custom plugin could not be loaded.

Nov 30 23:31:53 www named[2444]: error (network unreachable) resolving 'www.amazon.it/A/IN': 2001:502:4612::1#53

This one, check again that your host can connect to dns server and able to resolve the name of your backend in .vcl files. Varnish compiles vcl files when restart and tries to resolve all backend from hostname/dns to IP, if not success it will break.

| improve this answer | |
  • You can ignore the named line, that does not have anything to do with Varnish as I downgraded to 4.0 and it started without issue so I can have my server back online, i just forgot to remove that line of the log before posting – Pure Geek Dec 2 '15 at 5:29
  • I am curious as to what this is as I cannot find it on my system: vcl_boot/vgc.so – Pure Geek Dec 2 '15 at 5:45
  • You will see that named error is for IPv6 and not IPv4, I verified what you asked and all came back successfully connected – Pure Geek Dec 2 '15 at 5:47
  • add one more '}' to your second sub vcl_recv. I don't have centos6.7 but varnish4.1 on my centos6.5 can compile your vcl file without error. also check ldd /usr/sbin/varnishd to see any missing library – cuongnv23 Dec 2 '15 at 7:07
0

I'm running your vcl file with varnish4.1 on centos6.5 (of course after corrected it) and can see:

[root@node1 ~]# ls /var/lib/varnish/node1/ -R
/var/lib/varnish/node1/:
vcl_boot  _.vsm

/var/lib/varnish/node1/vcl_boot:
vgc.so

The reason you don't have this file is simple, your vcl file is not compiled properly. Correct your default.vcl ( you should remove unused sub vcl_recv):

sub vcl_recv {
 if (req.restarts == 0) {
    if (req.http.x-forwarded-for) {
        set req.http.X-Forwarded-For =
            req.http.X-Forwarded-For + ", " + client.ip;
    } else {
        set req.http.X-Forwarded-For = client.ip;
    }
}
} # <- add one more
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.