Are you facing the error, 330 Content Decoding Failed?
This guide will help.
Sometimes, Most Nagios users experience '330 Content Decoding Failed' error while accessing Nagios products in the web browser.
Generally, 330 Content Decoding Failed error happens when HTTP request's headers claim that content is gzip encoded while it's not.
In this context, we shall look into how to resolve the Content Decoding error in Nagios.
Nature of the error, 330 Content Decoding Failed
When this issue happens, you will see an error message such as this:
Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
* Please contact the website owners to inform them of this problem.
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.
As earlier mentioned, this happens when an HTTP request's headers claim that the content is gzip encoded, but it is not.
How to resolve 330 Content Decoding Failed Nagios Web browser error ?
To begin, Start by turning on zlib.output_compression.
The Apache web server requires this to configure to On in the /etc/php.ini file.
To do so, we open the file /etc/php.ini in any text editor.
Then to locate zlib.output_compression we type:
Once it takes us to the line, we change the setting to On:
zlib.output_compression = On
Eventually, we save the changes.
Then we restart the Apache service using any of the below commands:
RHEL 7+ | CentOS 7+
$ systemctl restart httpd.service
Debian | Ubuntu 16/18/20
$ systemctl restart apache2.service
Once the service restarts, the problem should no longer occur.
In addition, we can perform a few more steps.
We can try to save the codes with UTF8 format without BOM (Byte Order Mark).
Sometimes, codes written with Notepad++ use UTF8 encode which can result in this error.
If we receive this error specifically on the Chrome browser, we upgrade it to the latest version or reinstall it.
In Chrome extensions, disable them all and access the webpage.
If it works fine, we enable them one by one. Thus, we can determine the culprit extension and disable it.
If we have installed any antivirus software on the local computer, turn it off for a while and reload the page we have problems with.
Thus, we could identify if antivirus is causing the problem.