如果要建立 backend 的 load balance 出現以下的錯誤訊息
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: Command failed with error code 106
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: Message from VCC-compiler:
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: Symbol not found: 'directors.round_robin' at ('/etc/varnish/default.vcl' Line 340 Pos 21)
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: new MYIP = directors.round_robin();
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: --------------------#####################---
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: Running VCC-compiler failed, exited with 2
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: VCL compilation failed
Sep 13 09:37:25 varnish-100.myip.pass.tw varnish_reload_vcl[14705]: varnishadm -S /etc/varnish/secret -T 127.0.0.1:6082 vcl.load failed
Sep 13 09:37:25 varnish-100.myip.pass.tw systemd[1]: varnish.service: control process exited, code=exited status=1
Sep 13 09:37:25 varnish-100.myip.pass.tw systemd[1]: Reload failed for Varnish Cache, a high-performance HTTP accelerator.


解決方式
vcl 4.0;
import directors; ## <= 新增這一行即可
 

arrow
arrow
    文章標籤
    varnish cache cdn
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()