Ambari only serves gzip

Posted on 23 Feb 2015

By default Ambari only serves up gzip encoded resources. This is of course the right thing to do. However, sometimes the realities of a corportate network mean old proxies that do odd things. This will stop Ambari from working, and frankly makes it look really weird (just like any SPA without its styles and scripts).

To enable Ambari to host out plain encoded versions as well, just run:

for a in /usr/lib/ambari-server/web/{javascripts,stylesheets}/*.gz; do gzip -dc $a > ${a%.gz}; done

on your ambari-server. This will uncompress the gzip files to generate plain text encoded versions of them which Ambari’s spring content negotiation will then serve out in the absence of gzip in the Accept-Encoding header. Problem solved.

See my stack overflow post on this

StackOverflow Flair

profile for Simon Elliston Ball at Stack Overflow, Q&A for professional and enthusiast programmers