簡體   English   中英

如何修復'無法將VCL應用於127.0.0.1:6082:無法在Magento-1.9.4中讀取Varnish中的響應代碼'錯誤

[英]How to fix 'Failed to apply the VCL to 127.0.0.1:6082: Failed to read response code from Varnish' error in Magento-1.9.4

我正在嘗試將Varnish-4.1安裝到magento-1.9,清漆工作正常,但當我嘗試在管理 - >系統 - >緩存管理中單擊btn時,它會在標題中顯示錯誤:無法應用VCL到127.0.0.1:6082:無法從Varnish讀取響應代碼

操作系統:Ubuntu 18.04
Apache:2.4.29(Ubuntu)端口:8080 PHP 7.1.28-1 + ubuntu18.04.1
Magento ver。 1.9.4.1
varnish-4.1.11端口80來自: https//packagecloud.io/varnishcache/varnish41/install#manual-deb

/etc/systemd/system/varnish.service的內容

[Unit]
Description=Varnish HTTP accelerator
Documentation=https://www.varnish-cache.org/docs/4.1/ man:varnishd

[Service]
Type=simple
LimitNOFILE=131072
LimitMEMLOCK=82000
ExecStart=/usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T 127.0.0.1:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m -p vcc_allow_inline_c=on -p feature=+esi_ignore_other_elements -p feature=+esi_disable_xml_check
ExecReload=/usr/share/varnish/reload-vcl
ProtectSystem=full
ProtectHome=true
PrivateTmp=true
PrivateDevices=true

[Install]
WantedBy=multi-user.target

sudo systemctl狀態清漆

● varnish.service - Varnish HTTP accelerator
   Loaded: loaded (/etc/systemd/system/varnish.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/varnish.service.d
           └─override.conf
   Active: active (running) since Tue 2019-04-16 16:13:42 CEST; 24min ago
     Docs: https://www.varnish-cache.org/docs/4.1/
           man:varnishd
 Main PID: 31280 (varnishd)
    Tasks: 218 (limit: 4915)
   CGroup: /system.slice/varnish.service
           ├─31280 /usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T 127.0.0.1:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m -p vcc_allow_inline_c=on -p feature=+esi_ignore_other_elements -p feature=+esi_disable_xml_check
           └─31385 /usr/sbin/varnishd -j unix,user=vcache -F -a :80 -T 127.0.0.1:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,256m -p vcc_allow_inline_c=on -p feature=+esi_ignore_other_elements -p feature=+esi_disable_xml_check

Apr 16 16:26:07 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37242 127.0.0.1 6082 Rd "ban" "obj.http.X-Varnish-Session" "==" "i0fmpqecahms4mi8olvi3uamk5" "&&" "obj.http.X-Turpentine-Flush-Events" "~" "core_session_abstract_add_message"
Apr 16 16:26:07 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37242 127.0.0.1 6082 Wr 200
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37246 127.0.0.1 6082 Rd "auth" "long key"
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37246 127.0.0.1 6082 Wr 200 -----------------------------
                                                Varnish Cache CLI 1.0
                                                -----------------------------
                                                Linux,4.18.0-17-generic,x86_64,-junix,-smalloc,-smalloc,-hcritbit
                                                varnish-4.1.11 revision 61367ed17d08a9ef80a2d42dc84caef79cdeee7a

                                                Type 'help' for command list.
                                                Type 'quit' to close CLI session.
Apr 16 16:26:16 ubunut varnishd[31280]: CLI telnet 127.0.0.1 37246 127.0.0.1 6082 Rd "param.show" "feature"
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37246 127.0.0.1 6082 Wr 200 feature
                                                        Value is: +esi_disable_xml_check,+esi_ignore_other_elements
                                                        Default is: none

                                                        Enable/Disable various minor features.
                                                           none                       Disable all features.

                                                        Use +/- prefix to enable/disable individual feature:
                                                           short_panic                Short panic message.
                                                           wait_silo                  Wait for persistent silo.
                                                           no_coredump                No coredumps.
                                                           esi_ignore_https           Treat HTTPS as HTTP in
                                                                                      ESI:includes
                                                           esi_disable_xml_check      Don't check of body looks like
                                                                                      XML
                                                           esi_ignore_other_elements  Ignore non-esi XML-elements
                                                           esi_remove_bom             Remove UTF-8 BOM
                                                           https_scheme               Also split https URIs
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37248 127.0.0.1 6082 Rd "auth" "long key"
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37248 127.0.0.1 6082 Wr 200 -----------------------------
                                                Varnish Cache CLI 1.0
                                                -----------------------------
                                                Linux,4.18.0-17-generic,x86_64,-junix,-smalloc,-smalloc,-hcritbit
                                                varnish-4.1.11 revision 61367ed17d08a9ef80a2d42dc84caef79cdeee7a

                                                Type 'help' for command list.
                                                Type 'quit' to close CLI session.
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37248 127.0.0.1 6082 Rd "ban" "obj.http.X-Varnish-Session" "==" "i0fmpqecahms4mi8olvi3uamk5" "&&" "obj.http.X-Turpentine-Flush-Events" "~" "core_session_abstract_add_message"
Apr 16 16:26:16 ubuntu varnishd[31280]: CLI telnet 127.0.0.1 37248 127.0.0.1 6082 Wr 200

我想要的最終結果是簡單地說它已成功應用或類似的東西。
注意:我知道密鑰與\\ n正確放置。 這里是我嘗試安裝清漆的鏈接: https//www.howtoforge.com/tutorial/how-to-setup-magento-2-with-varnish-and-apache-on-ubuntu-1604/ I跳過關於燈和magento的所有內容,因為它已經安裝並運行,我只運行了清漆部分的命令。 提前致謝

如果你想檢查Varnish是否在Magento前正確運行你可以運行curl -I localhost你應該得到一個標題,提到Varnish並提供你后端的內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM