0

I configuring the Varnish cache in Magento 2.3(CE), for that I've gone through the below link.

https://www.emiprotechnologies.com/technical_notes/magento-technical-notes-60/post/magento2-install-and-configure-varnish-cache-with-https-in-ubuntu-641

So based on this, I have done everything in my localhost. Moreover, I am not using any HTTPS & SSL.

Now my localhost URL as follows: http://127.0.0.1:8080.

Then using the following commands, I am checking the Varnish status

sudo service varnish restart - working fine
sudo service varnish status - Error: VCL Compilation failed

For your further reference herewith I've attached the error screen.

enter image description here

Currently Installed Varnish Version

enter image description here

1

the answer is what Varnish version you have installed, version 4 is very old and discontinued. magento default.vcl config is also outdated

as you can see from error message saying that fetch is deprecated. you can verify it from varnish docs: https://varnish-cache.org/docs/trunk/users-guide/vcl-built-in-subs.html#vcl-hit

vcl_hit Called when a cache lookup is successful. The vcl_hit subroutine may terminate with calling return() with one of the following keywords:

fail synth restart pass deliver

your best option is to install Varnish 6 , latest version with long support.

| improve this answer | |
  • I installed the varnish 6, but still, I am getting the same problem, I checked the currently installed version using varnishd -V (the screen I've attached in question) – senthil Jan 29 at 6:41
  • if you have varnish 6 and generated vcl file version 6, then it works ok. what error you have? – MagenX Jan 29 at 7:55
  • Thanks, after generated varnish six it's working perfect, previously I used the varnish four generated file – senthil Jan 29 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.