During a virtual server restore the process got (I assume right to the end) and showed an awstats error (a tmp file was not found) everything else was successful. The virtual server restored correctly and is running fine however the awstats report is no longer available.
Now when I open the AWStats Report for that Virtual Server is is completely empty and shows the alert "Never updated (See 'Build/Update' on awstats_setup.html page)". So I go to the AWStats Configuration page leave everything as default and click the following error
Error - Perl execution failed
Undefined subroutine &virtual_server::get_domain_by called at /usr/libexec/webmin/virtualmin-awstats/generate.cgi line 11.
Any guidance on re-setting the awstats config would be appreciated.
Comments
Submitted by Gratous on Wed, 09/20/2017 - 03:34 Comment #1
I got the same error. I think it came after a theme update. I try to change the theme but still got the same error. I am suspecting one of the updated package if it is not coming from the theme.
Submitted by Eskes on Wed, 09/20/2017 - 08:41 Comment #2
Centos 7 Fully updated. It season atat automatic generation worked this morning. Manually giving the error.
Submitted by JamieCameron on Wed, 09/20/2017 - 18:44 Comment #3
Which version of the AWstats plugin are you running there? You can see it in the file
/usr/libexec/webmin/virtualmin-awstats/module.info
Submitted by Gratous on Wed, 09/20/2017 - 20:30 Comment #4
I could not find the file you mentionned but from the report it seems that the version is: Advanced Web Statistics 7.2 (build 1.992). And as the previous poster mentioned the cron job updated the AWSTATS reports last night. I suspect a template/theme issue. It is only happening when you generate/update the reports manually.
You can also ask the package manager what version you have:
# rpm -q wbm-virtualmin-awstats
Submitted by Eskes on Thu, 09/21/2017 - 03:19 Comment #6
Same as Gratous , Advanced Web Statistics 7.2 (build 1.992)
rpm -q wbm-virtualmin-awstats--> wbm-virtualmin-awstats-5.5-1.noarch
//Mattias
Submitted by JamieCameron on Thu, 09/21/2017 - 16:05 Comment #7
Looks like we need a new 5.6 release that includes a fix for the original issue. Joe, I've updated the version to 5.6 in git, so you can roll it out.
Submitted by apt_virtualmin on Thu, 09/21/2017 - 18:20 Pro Licensee Comment #8
wbm-virtualmin-awstats-5.5-1.noarch
If it helps at all, I just run the restore again and here is the output with the error at the end
Starting restore of 1 domains from local file /backup/atl2-21-09-2017/acmecorp.com.tar.gz ..
Extracting backup archive file ..
.. done
Restoring backup for virtual server acmecorp.com ..
Restoring virtual server password, quota and other details ..
.. done
Updating administration password and quotas ..
.. done
Restoring Cron jobs ..
.. done
Extracting TAR file of home directory ..
.. done
Setting ownership of home directory ..
.. done
Restoring Apache virtual host configuration ..
.. done
Checking restored PHP execution mode ..
.. mode FCGId OK for this system
Updating home directory in PHP configuration ..
.. done
Restoring Apache log files ..
.. done
Restoring SSL Apache virtual host configuration and certificate ..
.. done
Restoring allowed MySQL hosts ..
.. done
Deleting old MySQL databases ..
.. done
Re-loading MySQL database acmecorp ..
Creating MySQL database acmecorp ..
.. done
.. done
Restoring Webmin ACL files ..
.. done
Restoring AWstats configuration file ..
.. done
Restore failed : Failed to open /home/acmecorp/public_html/cgi-bin/awstats.pl.webmintmp.1253 : No such file or directory
I'm syncing the repos with the new version of the awstats module now. Should be available in a few minutes.
Submitted by Gratous on Fri, 09/22/2017 - 03:39 Comment #10
I just loaded the latest update module and I still get the same error Undefined subroutine &virtual_server::get_domain_by called at /usr/share/webmin/virtualmin-awstats/generate.cgi line 11.
Submitted by Eskes on Fri, 09/22/2017 - 03:56 Comment #11
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.netsite.dk * extras: mirror.netsite.dk * updates: mirrors.glesys.net Resolving Dependencies --> Running transaction check ---> Package wbm-virtualmin-awstats.noarch 2:5.5-1 will be updated ---> Package wbm-virtualmin-awstats.noarch 2:5.6-1 will be an update --> Processing Dependency: wbm-software for package: 2:wbm-virtualmin-awstats-5.6-1.noarch --> Processing Dependency: wbm-cron for package: 2:wbm-virtualmin-awstats-5.6-1.noarch --> Finished Dependency Resolution Error: Package: 2:wbm-virtualmin-awstats-5.6-1.noarch (virtualmin-universal) Requires: wbm-cron Error: Package: 2:wbm-virtualmin-awstats-5.6-1.noarch (virtualmin-universal) Requires: wbm-software You could try using --skip-broken to work around the problem ** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows: libmodule-10.0.0.1696-b10_0_0_1696.x86_64 has missing requires of libodbc.so.1()(64bit)
Submitted by checksumerror on Fri, 09/22/2017 - 04:08 Comment #12
I am seeing this same issue as well.
[ERROR] Something went wrong. Exiting.
[ERROR] The last few log entries were:
Warning: Group virtualmin-lamp does not have any packages.
Installing dependencies and system packages: Success.
Spin pid is: 14952
Package perl-Log-Log4perl-1.30-1.el6.noarch already installed and latest version
Package 1:perl-parent-0.221-144.el6.x86_64 already installed and latest version
Package 1:perl-Module-Load-0.16-144.el6.x86_64 already installed and latest version
Error: Package: 2:wbm-virtualmin-awstats-5.6-1.noarch (virtualmin-universal)
Requires: wbm-cron
Error: Package: 2:wbm-virtualmin-awstats-5.6-1.noarch (virtualmin-universal)
Requires: wbm-software
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Installing Virtualmin and all related packages: [2017-09-22 08:46:32 UTC] [ERROR] Failed with error: 1
[2017-09-22 08:46:32 UTC] [ERROR] Something went wrong. Exiting.
[2017-09-22 08:46:32 UTC] [ERROR] The last few log entries were:
OK, packaging problem has been fixed in 5.6-2. Update and try again.
Submitted by Eskes on Fri, 09/22/2017 - 06:42 Comment #14
Perfect. Thanks
Submitted by checksumerror on Fri, 09/22/2017 - 06:43 Comment #15
Not 100% sure what I was meant to do, so I just ran a yum update, followed by bash install.sh for virtualmin, and still getting the same output..
[ERROR] Something went wrong. Exiting.
[ERROR] The last few log entries were:
Installing dependencies and system packages: Success.
Spin pid is: 30634
Package perl-Log-Log4perl-1.30-1.el6.noarch already installed and latest version
Package 1:perl-parent-0.221-144.el6.x86_64 already installed and latest version
Package webmin-1.852-1.noarch already installed and latest version
Package 1:perl-Module-Load-0.16-144.el6.x86_64 already installed and latest version
Error: Package: 2:wbm-virtualmin-awstats-5.6-1.noarch (virtualmin-universal)
Requires: wbm-cron
Error: Package: 2:wbm-virtualmin-awstats-5.6-1.noarch (virtualmin-universal)
Requires: wbm-software
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Installing Virtualmin and all related packages: [2017-09-22 11:41:08 UTC] [ERROR] Failed with error: 1
[2017-09-22 11:41:08 UTC] [ERROR] Something went wrong. Exiting.
[2017-09-22 11:41:08 UTC] [ERROR] The last few log entries were:
Submitted by Eskes on Fri, 09/22/2017 - 06:44 Comment #16
You did run old broken update. Scan for new.
If doing from command line:
# yum clean all
# yum update
If in Virtualmin, click "Refresh available packages"
Submitted by sle44102 on Fri, 09/22/2017 - 09:50 Comment #18
I had same issue on centos 7, yum clean all did not work, but
doing rm -rf /var/cache/yum followed by yum update fixed the issue
Submitted by apt_virtualmin on Fri, 09/22/2017 - 15:08 Pro Licensee Comment #19
No longer get an errors running this script but it still does not produce a 100% functioning report as the AWStats Report screen for this domain still shows as below
Statistics for: localhost.localdomain
Last Update: Never updated (See 'Build/Update' on awstats_setup.html page)
When you click a month and refresh the report is shows some stats but having to do that every time you view the report is less than ideal?
This is only the case for the virtual server that was restored.
Submitted by Gratous on Fri, 09/22/2017 - 17:18 Comment #20
Works for me now. Thanks. Great job!
Submitted by IssueBot on Fri, 10/06/2017 - 17:30 Comment #21
Automatically closed - issue fixed for 2 weeks with no activity.