[Thu Nov 18 18:27:57 2010] [error] Can't locate /etc/webmin/virtualmin-google-analytics/apachemod.pl in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 2) line 1.\n
[Fri Nov 19 11:18:07 2010] [error] Can't locate /etc/webmin/virtualmin-google-analytics/apachemod.pl in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . /etc/httpd) at (eval 2) line 1.\n
So is this a borked install? I don’t know where further to look. There is no production system on this Centos VM so I can reboot, but would like to know where this is coming from.
It looks like it’s having trouble loading Google Analytics. You may want to look in System Settings -> Features and Plugins, and verify that Google Analytics is enabled there.
I want to migrate domains from another location. For this site I ran a backup on the other system, transferred by FTP, then did a restore. All the data seems to have migrated nicely but I started getting this error. I have now done as you suggested and the feature is installed and enabled by default. I am still unable to start apache, though.
Can you double-check that in System Settings -> Features and Plugins, that the Google Analytics plugin is still checked? If it’s unchecked for some reason, that might explain why it’s not working correctly.
In theory, once that’s checked, the file that Apache can’t load should be put into place (/etc/webmin/virtualmin-google-analytics/apachemod.pl).
Okay, how about this… what if you go into Virtualmin, edit the domain in question that has Google Analytics… and within that domain, remove the Google Analytics feature, save, and then re-enable it.
This GPL install of VM persistently won’t start apache. I know from the exchange above that it is due to a missing file, but the whole purpose of using VM rather than editing config files by hand is (for me) to subsume the detail involved into a GUI. I have the option of either editing out the reference in httpd.conf or copying apachemod.pl into the relevant directory. But isn’t that what VM is supposed to do?
Well, it sounds like the issue you’re seeing is a bug
Apparently, importing a Virtual Server with Google Analytics enabled doesn’t necessarily enable it on your current installation… and it actually seems to go a step further in making it difficult to enable.
You’re right – the two solutions would be to either comment out that line in the Apache config, or to copy over that file from another installation. However, that’s just a workaround to the bug.
The actual fix would be to file a bug report, using the Support link above, and Jamie would work with you to get that resolved for the next Virtualmin version.
I can confirm that Vmin does/should copy the .pl file in question to /etc/webmin/virtualmin-google-analytics as soon as the first domain gets the analytics feature turned on (or off and on). At least it does so in Pro… If it does not do that in GPL or specifically after restoring a backup with analytics enabled, I too guess that’s a bug.
And I found another little discrepancy: It is possible to turn off the analytics plugin under Features and Plugins, even though there are still domains using it. For the other features I’m used to getting an error message that features cannot be turned off as long as domains are still using them.
For one thing apachemod.pl is only two or three lines long. I just typed it into vi and made it executable so now the system boots, apache runs and things “just work.” So operationally as long as I know that this is needed I can do it. But it isn’t a solution that scales well and it is so surprising to me to find that what seems like a trivial (but necessary) copy operation has persistently failed that at first I resisted the idea then got upset, neither, of course, very productive (re-)actions. So I guess I’ll take Eric’s advice and file a bug report. I’ll report back.