3

I've implemented varnish successfully with Turpentine and now my header and footer is replaced with the message ESI processing not enabled.

If I disable the esi blocks under cache management, the header and footer are then displayed.

I'm not sure where to begin to properly diagnose to resolve the issue. The following is part of my system.log file when I had enabled the debugging option:

2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: root
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: head
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: head.calendar
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: global_notices
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: header
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: menu
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: notifications
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: notification_baseurl
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: cache_notifications
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: notification_survey
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: notification_security
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: notification_toolbar
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: notification_window
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: index_notifications
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: tax_notifications
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: left
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: adminhtml.system.config.switcher
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: left.child1
2014-04-07T20:19:29+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: content
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: aw_all_jsinit
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: moneybookers_jsinit
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: content.child2
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: ANONYMOUS_29.child0
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: formkey
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: ANONYMOUS_29.child1
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate:  ANONYMOUS_29.child1.child0
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: footer
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: js
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: js.child0
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: js.child1
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: js.child2
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: profiler
2014-04-07T20:19:30+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: before_body_end
2014-04-07T20:19:45+00:00 DEBUG (7): TURPENTINE: Cleared ESI cache for client (crawler-session) on event: catalog_controller_product_view
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: root
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: head
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: js_cookies
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: optional_zip_countries
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: addthis_smartlayers
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: after_body_start
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: google_analytics
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: turpentine_notices
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: global_notices
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: header
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Block check passed, injecting block: header
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: breadcrumbs
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: global_messages
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Block check passed, injecting block: global_messages
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: content
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.extrahint
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.extrahint.qtyincrements
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: ANONYMOUS_112
 2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: alert.urls
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: productalert.price
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: productalert.stock
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.simple
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.simple.extra
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.simple.extra.child0
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: ANONYMOUS_113
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.other
2014-04-07T20:19:45+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.media
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.additional.recurring.schedule
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.additional
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.info.tabs
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: description_tabbed
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: additional_tabbed
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: upsell_products_tabbed
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: custom
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: ANONYMOUS_114
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: custom1
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: product.tooltip
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: external.pagecache.cookie
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: footer
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Block check passed, injecting block: footer  
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: before_body_end
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: piwik_analytics
2014-04-07T20:19:46+00:00 INFO (6): TURPENTINE: Checking ESI block candidate: core_profiler
2014-04-07T20:19:46+00:00 DEBUG (7): TURPENTINE: Set Varnish cache flag header to: 1
2014-04-07T20:19:46+00:00 DEBUG (7): TURPENTINE: Set ESI flag header to: 1

Other possible relevant information: Centos 6.5, Magento 1.8, Apache 2.2. Varnish 2.1.5, Redis 2.4

How can I troubleshoot the ESI processing not enabled error message that appear in the header and footer of my website?

I understand that this section does not cover third party modules, however since there have been numerous recommendations to implement this in a magento installation I hope an exception can be made.

10

The problem is related to an incompatibility between Magento 1.8 and Turpentine. The latest version of Turpentine requires that the varnish configuration be modified to include the following line under DAEMON_OPTS

-p esi_syntax=0x2

Once this was applied, it was necessary to restart the varnish service, apply the Varnish Config (Under Cache Management in the Admin Panel) and flush all cache.

This also resolved an issue that was present that I had not previously detected: Adding to cart would redirect you to a empty cart page. The cart would also not allow you to remove items and did not behave as expected.

The above mentioned fix addresses both issues.

  • 2
    +1 Thanks for coming back and answering your own question once you figured it out. Not enough people do that. – Alan Storm Apr 11 '14 at 3:47
  • No problem Alan, this community has been an invaluable tool for me in learning and developing my store. I make it a point to try and contribute whatever/whenever I can. This problem was extremely frustrating and I'm sure based on my searches that others will now fall on this problem and will find the solution. SR – SR_Magento Apr 11 '14 at 11:07
  • You Sir, just saved my life :) – Mantas Feb 20 '15 at 13:03
  • I am facing the same issue in my magento 1.8 site, the checkout page footer is showing ESI processing not enabled, i have followed all the steps which you have specified in your answer but still facing an issue. Can you suggest what will be the issue apart from configuration in DAEMON_OPTS. – Keyur Patel Jul 24 '15 at 9:52
4

I realize that this has been solved, however I ended up spending several hours troubleshooting this on my local machine while I was trying to learn Magento / Varnish / Turpentine. After much testing I came to realize that the site worked fine when I tested via telnet. Here is what I did:

Start varnish in debug mode

Attach varnish logger

Capture all the traffic between varnish and my web back end

Replaced the exact inputs (GET ... Host: ... X-Forwarded-For: ... all the headers), for example:

GET /index.php/quotes/index/index/ HTTP/1.0
Host: webdev.my.domain.com
X-Real-IP: 1.1.1.1
X-Forwarded-For: 1.1.1.1
Connection: close
Cache-Control: no-cache
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip,deflate,sdch
Pragma: no-cache
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.131 Safari/537.36
Accept-Language: en-US,en;q=0.8
Cookie: frontend=000000004a164a168a270554169c39e2; __utma=153613246.645323269.1399775368.1399775368.1399775368.1; __utmb=153613246.4.10.1399775368; __utmc=153613246; __utmz=153613246.1399775368.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)

I found that the output from the server was gzipped. So I removed the Accept-Encoding: gzip,deflate,sdch from the post content. When I checked the output - everything looked great, the ESI tags were properly replaced.

But everytime I viewed the site in my browser, I saw the dreaded ESI processing not enabled. message. Arrggh.

Well, I set out to completely disable compression and found that I had this line in my PHP.ini:

zlib.output_compression = On

I turned changed the 'On' to 'Off', restarted Apache and wouldn't you know it - the site worked fine! I did see some other notes out there about mod_deflate causing problems for Varnish, but never saw anything about PHP and zlib.

Just for background, my current setup is this:

Nginx -> Varnish -> Apache

This is because there is another problem - if you use mod_proxy on a single node (which I'm doing for dev purposes), then Apache has problems if you localhost in the ProxyPass and ProxyPassReverse - instead of doing the passing behind the scenes, Apache sends a 302 redirect response to the user, which doesn't work.

  • +1. I had used the php.ini that come with magento as sample and it had that line. Once I commented out that line, ESI processing not enabled disappeared. – Damodar Bashyal Dec 6 '16 at 6:09

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.