Varnish Error: Failed to open (any) accept sockets

Varnish Error: Failed to open (any) accept sockets

我正在尝试重新启动 vagrant 容器 sudo /etc/init.d/varnish restart 中的 varnish 服务,但它抛出了这些错误:

/etc/init.d/varnish: 36: ulimit: error setting limit (Operation not permitted)
/etc/init.d/varnish: 36: ulimit: error setting limit (Operation not permitted)
[FAIL] Stopping HTTP accelerator: varnishd failed!
/etc/init.d/varnish: 36: ulimit: error setting limit (Operation not permitted)
[FAIL] Starting HTTP accelerator: varnishd failed!
bind(): Address already in use
bind(): Address already in use
bind(): Address already in use
bind(): Address already in use
Error: Failed to open (any) accept sockets.

我检查了第 36 行:

# Open files (usually 1024, which is way too small for varnish)
ulimit -n ${NFILES:-131072}

# Maxiumum locked memory size for shared memory log
ulimit -l ${MEMLOCK:-82000}

有什么解决问题的建议吗?

问题是在我升级 docker 时引起的,一些其他进程如何从最后一个容器继续工作。

sudo killall nginx

sudo killall varnish

重新启动服务,有 解决了问题