【问题标题】:Varnish configured, socket(): Address family not supported by protocol已配置清漆,socket():协议不支持的地址族
【发布时间】:2017-09-09 13:57:29
【问题描述】:

我正在使用 Apache 2.4 开发 Centos 6.8,安装 varnish 并为我的 Magento 2 站点正确配置了所有内容。

我已安装 SLL 证书,因此我将 -p feature=+esi_ignore_https 添加到我的 sysconfig 文件中。

一开始看起来一切都很好

>  service varnish restart 
>  Stopping Varnish Cache:                       [  OK  ] 
>  Starting Varnish Cache:                       [  OK  ]

然后当我用

启动 Varnish CLI
> varnishd -d -f /etc/varnish/default.vcl
> 
> Type 'help' for command list.   
> Type 'quit' to close CLI session. 
> Type 'start' to launch worker process.
> 
> **socket(): Address family not supported by protocol**

当我进入开始时,我会得到一个无限循环

Child cleanup complete
socket(): Address family not supported by protocol
child (30530) Started
Child (30530) said Child starts
Child (30530) died signal=6
Child (30530) Panic message:
Assert error in vca_acct(), cache/cache_acceptor.c line 386:
  Condition((listen(ls->sock, cache_param->listen_depth)) == 0) not true.
errno = 98 (Address already in use)
thread = (cache-acceptor)
version = varnish-4.0.4 revision 386f712
ident = Linux,2.6.32-042stab113.11,x86_64,-smalloc,-smalloc,-hcritbit,epoll
Backtrace:
  0x432425: varnishd() [0x432425]
  0x40d71d: varnishd() [0x40d71d]
  0x7f105722aaa1: /lib64/libpthread.so.0(+0x7aa1) [0x7f105722aaa1]
  0x7f1056f77bcd: /lib64/libc.so.6(clone+0x6d) [0x7f1056f77bcd]

当我尝试登录 varnishlog 时

无法打开 VSM 文件(废弃的 VSM 文件(清漆未运行?) /var/lib/varnish/patriciasouths.com/_.vsm)

【问题讨论】:

  • 你知道 Varnish 不支持 HTTPS,对吧?你必须使用 NGINX 之类的东西来终止 HTTPS,然后传递给 Varnish。

标签: apache centos magento2 varnish


【解决方案1】:

服务清漆启动 启动清漆缓存:错误:无法打开套接字::6081:协议不支持地址系列

所以这真的很愚蠢..默认安装是这个..

DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
             -f ${VARNISH_VCL_CONF} \
             -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
             -p thread_pool_min=${VARNISH_MIN_THREADS} \
             -p thread_pool_max=${VARNISH_MAX_THREADS} \
             -S ${VARNISH_SECRET_FILE} \
             -s ${VARNISH_STORAGE}"

这里我们有一个要使用的变量 ${VARNISH_LISTEN_ADDRESS}...但它以前没有定义!

# Telnet admin interface listen address and port
VARNISH_ADMIN_LISTEN_PORT=6082

DOH!所以添加它。

# Telnet admin interface listen address and port
VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
VARNISH_ADMIN_LISTEN_PORT=6082

启动清漆缓存:[确定]

varnish.x86_64 0:4.1.10-1.el6 失败来自https://packagecloud.io/varnishcache/varnish41/el/6/SRPMS

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-12-20
    • 1970-01-01
    • 2018-09-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-26
    • 1970-01-01
    相关资源
    最近更新 更多