Magento Can';t打开Varnish日志(不是VSL块)

Magento Can';t打开Varnish日志(不是VSL块),magento,varnish,Magento,Varnish,我正在尝试使用Magento启动并运行Varnish,但似乎无法使用最基本的Varnish配置(删除所有缓存头和cookie)访问缓存 运行varnishlog(带或不带sudo)时,我总是收到以下错误消息: Can't open log (Not a VSL chunk ) Varnish确实在运行,并像预期的那样作为代理工作(我在Chrome Inspector中看到Varnish标题) 我正在运行Varnish 4.0.3-2~ trusty,这是我的VCL: vcl 4.0; bac

我正在尝试使用Magento启动并运行Varnish,但似乎无法使用最基本的Varnish配置(删除所有缓存头和cookie)访问缓存

运行
varnishlog
(带或不带sudo)时,我总是收到以下错误消息:

Can't open log (Not a VSL chunk
)
Varnish确实在运行,并像预期的那样作为代理工作(我在Chrome Inspector中看到Varnish标题)

我正在运行Varnish 4.0.3-2~ trusty,这是我的VCL:

vcl 4.0;

backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

sub vcl_recv {
    unset req.http.cookie;
}

sub vcl_backend_response {
    set beresp.do_esi = true;
    unset beresp.http.set-cookie;

    if (beresp.ttl < 120s) {
        set beresp.ttl = 120s;
        unset beresp.http.Cache-Control;
    }
}

sub vcl_deliver {

}
vcl4.0;
后端默认值{
.host=“127.0.0.1”;
.port=“8080”;
}
子vcl_recv{
unset req.http.cookie;
}
子vcl_后端_响应{
设置beresp.do_esi=true;
unset beresp.http.set-cookie;
如果(贝雷斯普ttl<120s){
设置beresp.ttl=120s;
取消设置beresp.http.Cache-Control;
}
}
副vcl_交付{
}

您有不同版本的varnish和libvarnishapi1(这是Ubuntu,RedHat可能有不同的包名)

现在我们想要4.0.3-2~精确的(与清漆相同)


varnishtop/varnishlog等现在可以使用了

具有完全相同的问题,相同的清漆版本
# varnishtop
Can't open log (Not a VSL chunk
)

# dpkg -s varnish
Package: varnish
Status: install ok installed
Priority: optional
Section: varnish-4.0/web
Installed-Size: 1501
Maintainer: Varnish Package Maintainers <varnish-dist@varnish-cache.org>
Architecture: amd64
Source: varnish (4.0.3-2)
Version: 4.0.3-2~precise
Provides: varnish, varnishabi-1.2, varnishabi-strict-b8c4a34
Depends: libc6 (>= 2.14), libedit2 (>= 2.11-20080614-1), libjemalloc1 (>= 2.1.1), libncurses5 (>= 5.5-5~), libpcre3 (>= 8.10), libtinfo5, libvarnishapi1 (>= 4.0.3-2~precise), adduser, gcc, libc6-dev | libc6.1-dev | libc-dev
Suggests: varnish-doc
Conffiles:
 /etc/init.d/varnishlog 3140554883a28e29559798a3213c143a
 /etc/init.d/varnishncsa bd1d80256f5c845539c366a735006bb0
 /etc/init.d/varnish b271bbb97276346e35f538bc9cbafb9f
 /etc/logrotate.d/varnish 95fbe75ebf5104ecaa532e7876d4ac8b
 /etc/varnish/default.vcl 43f33efc867d0ecd6f2ab08878a936bb
 /etc/default/varnishlog 71b0d3e5cc0b90cfb4461f76272578a5
 /etc/default/varnishncsa 3d10b15a363d07252122cef47c88ba9b
 /etc/default/varnish dce6e7d01bb20e598f417131c1d5a1c6
Description: state of the art, high-performance web accelerator
 Varnish Cache is a state of the art web accelerator written with
 performance and flexibility in mind.
 .
 Varnish Cache stores web pages in memory so web servers don't have to
 create the same web page over and over again. Varnish serves pages
 much faster than any application server; giving the website a
 significant speed up.
 .
 Some of the features include:
  * A modern design
  * VCL - a very flexible configuration language
  * Load balancing with health checking of backends
  * Partial support for ESI - Edge Side Includes
  * URL rewriting
  * Graceful handling of "dead" backends
Homepage: https://varnish-cache.org/

# dpkg -s libvarnishapi1
Package: libvarnishapi1
Status: install ok installed
Priority: optional
Section: varnish-4.1/libs
Installed-Size: 202
Maintainer: Varnish Package Maintainers <varnish-dist@varnish-cache.org>
Architecture: amd64
Source: varnish (4.1.0-1)
Version: 4.1.0-1~precise
Provides: libvarnish1
Depends: libc6 (>= 2.14), libpcre3 (>= 8.10)
Pre-Depends: multiarch-support
Conflicts: libvarnish1
Description: shared libraries for Varnish
 Shared libraries for Varnish Cache HTTP accelerator.
Homepage: https://varnish-cache.org/
# apt-cache policy libvarnishapi1
libvarnishapi1:
  Installed: 4.1.0-1~precise
  Candidate: 4.1.0-1~precise
  Version table:
 *** 4.1.0-1~precise 0
        100 /var/lib/dpkg/status
     4.0.3-2~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.3-1~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.2-1~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.1-2~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.1-1~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.0-1~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.0~beta1-2~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.0~~tp2-1~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     4.0.0~~tp1-1~precise 0
        500 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 amd64 Packages
     3.0.2-1ubuntu0.1 0
        500 http://mirror.bytemark.co.uk/ubuntu/ precise-updates/universe amd64 Packages
     3.0.2-1 0
        500 http://mirror.bytemark.co.uk/ubuntu/ precise/universe amd64 Packages
# apt-get install libvarnishapi1=4.0.3-2~precise
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  liblwgeom-2.1.7 python-meld3 python-medusa
Use 'apt-get autoremove' to remove them.
The following packages will be DOWNGRADED:
  libvarnishapi1
0 to upgrade, 0 to newly install, 1 to downgrade, 0 to remove and 123 not to upgrade.
Need to get 70.6 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://repo.varnish-cache.org/ubuntu/ precise/varnish-4.0 libvarnishapi1 amd64 4.0.3-2~precise [70.6 kB]
Fetched 70.6 kB in 0s (321 kB/s)
Committing  to: /etc/
modified default/varnish
modified varnish/default.vcl
modified varnish/secret
Committed revision 357.
dpkg: warning: downgrading libvarnishapi1 from 4.1.0-1~precise to 4.0.3-2~precise.
(Reading database ... 138915 files and directories currently installed.)
Preparing to replace libvarnishapi1 4.1.0-1~precise (using .../libvarnishapi1_4.0.3-2~precise_amd64.deb) ...
Unpacking replacement libvarnishapi1 ...
Setting up libvarnishapi1 (4.0.3-2~precise) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place