Varnish configured,socket():协议不支持的地址族

时间:2017-04-13 12:29:11

标签: apache centos magento2 varnish

我正在使用Apache 2.4处理Centos 6.8,我在安装清漆方面没有遇到任何问题,并为我的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文件(Varnish未运行?)   /var/lib/varnish/patriciasouths.com/_.vsm)

1 个答案:

答案 0 :(得分:0)

启动清漆 启动Varnish缓存:错误:无法打开套接字::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失败