清漆错误:无法打开(任何)接受套接字

时间:2015-09-16 09:51:23

标签: docker varnish ulimit

我正在尝试重新启动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}

有任何建议如何解决问题?

1 个答案:

答案 0 :(得分:1)

问题是由于我升级了docker以及其他一些进程如何从最后一个容器保持工作状态。

sudo killall nginx

sudo killall varnish

再次启动服务,有 解决了这个问题