Statistics page fails to open with error: Plugin load for plugin 'geoip' failed

Refers to:

  • Plesk 12.5 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:52:45 UTC

Modified:

2016-12-21 19:26:23 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Statistics page fails to open with error: Plugin load for plugin 'geoip' failed

Symptoms

The following error appears when you try to open domain's web statistics at https://example.com/plesk-stat/webstat/

Error: Plugin load for plugin 'geoip' failed with return code: Error: Can't locate Geo/IP.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /usr/share/awstats/lib /usr/share/awstats/plugins) at (eval 3) line 1. Can't locate Geo/IP/PurePerl.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl . /usr/share/awstats/lib /usr/share/awstats/plugins) at (eval 4) line 1. Error: Need Perl module Geo::IP or Geo::IP::PurePerl

Setup ('/opt/psa/etc/awstats/awstats.example.com-http.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).

Cause

Perl plugins Geo::IP and Geo::IP::PurePerl are not installed.

Resolution

In case if the error is shown for previous month use the following article: #213901965 - How to recalculate AWStats statistics from logs for previous months

AWStats GeoIP plugin uses Perl modules to resolve IP addresses in countries. If you have GeoIP plugin enabled in awstats config file with the line:

LoadPlugin="geoip GEOIP_STANDARD"**

you should make sure that corresponding Perl modules are installed on the system, because original AWStats package does not contain them.

This error message indicates missing required Perl module: Error: Can't locate Geo/IP/PurePerl.pm in ...

To resolve the issue it's necessary to install Perl module required by this plugin. Installation commands:

# perl -MCPAN -e "install Geo::IP::PurePerl" 
# perl -MCPAN -e "install Geo::IP"

or you can install Perl modules in traditional way by downloading and compiling tarballs:

# wget geoip-xxx.tar.gz 
# tar -xzf geoip-xxx.tar.gz
# cd geoip-xxx
# perl Makefile.PL
# make && make install

Here is the link where you can find GeoIP Perl modules: http://search.cpan.org/search?query=Geo%3A%3AIP&mode=all

Two packages, Geo::IP and Geo::IP::PurePerl should be installed, because Geo::IP::PurePerl depends on Geo::IP .Sometimes GeoIP C API should be installed before adding perl Geo::IP module. It can be downloaded here: http://www.maxmind.com/app/c .

Once all this staff is installed on the server, AWStats statistics page for domains with enabled GeoIP plugin should function well after next statistics recalculation, or you could recalculate it manually.

Have more questions? Submit a request
Please sign in to leave a comment.