michael_S

Registered
Aug 26, 2002
2
0
151
I enabled logaholic in whm for all users.

When visiting logaholic through cpanel, the only page that loads is this:

Logaholic is performing an upgrade.

This should only take a few moments.
You may refresh this page at that time.
Thank you for your patience.
And refreshing the page does nothing. Logaholic will not load.


I read that I should remove and reinstall logoholic. I removed the logaholic installation and attempted a reinstallation but the reinstall fails. See the commands and output below:

mv /usr/local/cpanel/base/3rdparty/Logaholic /usr/local/cpanel/base/3rdparty/Logaholic.bk
/usr/local/cpanel/bin/update-logaholic --force

The update command returns the following output:

================================================
Updating Logaholic
with --force.
================================================

STATUS - Starting deployment of Logaholic '2.9.1' with cPanel update patch 'cp3'.
INFO - Logaholic will be locked out during this process.
STATUS - Prepare Logaholic source '2.9.1'.
info [update-logaholic] Applied patch '0001-Improve-Logaholic-API-delete-profile-MySQL-statement.patch'
patching file logaholic_api/includes/common.php
info [update-logaholic] Applied patch '0002-Make-batch-export-time-limit-configurable.patch'
patching file logaholic_api/includes/LogaholicDBBatch.php
info [update-logaholic] Applied patch '0003-Terminate-execution-if-Logaholic-URL-param-conf-is-n.patch'
patching file logaholic/top.php
info [update-logaholic] Applied patch '0004-Improve-operations-to-reduce-likelihood-of-memory-ex.patch'
patching file logaholic/update.php
info [update-logaholic] Applied patch '0005-Remove-Logaholic-s-Standard-Edition-ADMIN_NAME-funct.patch'
patching file logaholic/user_login/admin.php
patching file logaholic/user_login/constants.php
patching file logaholic/user_login/database.php
patching file logaholic/user_login/session.php
patching file logaholic/version_check.php
info [update-logaholic] Successfully applied 5 patches
INFO - Applied cPanel patches (if any) to Logaholic source.
STATUS - Applying Logaholic sources to cPanel.
INFO - Backing up, updating and verify database schema as necessasry.
INFO - Tables schema is not correct. Backing up current database and applying full Logaholic database schema now.
STATUS - Making temporary backup of Logaholic database.
STATUS - Enforcing Logaholic application and API permissions.
INFO - Application configuration created.
INFO - Setting ownership for root and mode '0600', recursively, for /var/cpanel/logaholic/logaholic_api.
INFO - Setting mode '0700' for dir /var/cpanel/logaholic/logaholic_api and /var/cpanel/logaholic/logaholic_api/includes.
INFO - Setting mode '0640' for /usr/local/cpanel/base/3rdparty/Logaholic/files/global.php.
INFO - Setting mode '0600' for /var/cpanel/logaholic/logaholic_api/config.php.
INFO - Setting ownership '0:0' for /var/cpanel/logaholic/logaholic_api/config.php.
INFO - Setting mode '0600' for /var/cpanel/logaholic/logaholic_api/config.php.yaml.
INFO - Setting ownership '0:0' for /var/cpanel/logaholic/logaholic_api/config.php.yaml.
INFO - Setting mode '0600' for /var/cpanel/logaholic/logaholic_api/config.php.cache.
INFO - Setting ownership '0:0' for /var/cpanel/logaholic/logaholic_api/config.php.cache.
FAIL - Something is wrong with the Logaholic APP configuration.
- The cPanel error_log may have Logaholic error details.
FAIL - Logaholic application config doesn't work.
NOTICE - Logaholic will be left in a non-functional state until this is resolved and/or ‘/var/cpanel/logaholic/updating’ is removed.

================================================
LOGAHOLIC UPDATE FAILED!
================================================

This is the cpanel error_log from running the logaholic update:

[2012-10-30 10:47:48 -0500] info [update-logaholic] Applied patch '0001-Improve-Logaholic-API-delete-profile-MySQL-statement.patch'
patching file logaholic_api/includes/common.php
[2012-10-30 10:47:48 -0500] info [update-logaholic] Applied patch '0002-Make-batch-export-time-limit-configurable.patch'
patching file logaholic_api/includes/LogaholicDBBatch.php
[2012-10-30 10:47:48 -0500] info [update-logaholic] Applied patch '0003-Terminate-execution-if-Logaholic-URL-param-conf-is-n.patch'
patching file logaholic/top.php
[2012-10-30 10:47:48 -0500] info [update-logaholic] Applied patch '0004-Improve-operations-to-reduce-likelihood-of-memory-ex.patch'
patching file logaholic/update.php
[2012-10-30 10:47:48 -0500] info [update-logaholic] Applied patch '0005-Remove-Logaholic-s-Standard-Edition-ADMIN_NAME-funct.patch'
patching file logaholic/user_login/admin.php
patching file logaholic/user_login/constants.php
patching file logaholic/user_login/database.php
patching file logaholic/user_login/session.php
patching file logaholic/version_check.php
[2012-10-30 10:47:48 -0500] info [update-logaholic] Successfully applied 5 patches

And this is the error_log output from trying to load the users logahoic page from cpanel:

[2012-10-30 10:50:01 -0500] info [logaholicadmin] The Logaholic API failed to return valid output for the “fetchuser†actionStatus: 500 Internal Server Error
X-Powered-By: PHP/5.2.6
Content-type: text/html


[2012-10-30 10:50:01 -0500] info [logaholicadmin] The Logaholic API failed to return valid output for the “adduser†actionStatus: 500 Internal Server Error
X-Powered-By: PHP/5.2.6
Content-type: text/html


[2012-10-30 10:50:01 -0500] warn [logaholicadmin] Failed to initialize the Logaholic user 'bizbox' at /usr/local/cpanel/Cpanel/Logaholic/AppAPI.pm line 1786
Cpanel::Logaholic::AppAPI::_user_maintenance(Cpanel::Logaholic::AppAPI=HASH(0x89e46a4), HASH(0x89e4614)) called at /usr/local/cpanel/bin/logaholicadmin line 108
[2012-10-30 10:50:01 -0500] warn [cpsrvd-ssl] Failed to finish initializing the Logaholic user 'bizbox' at /usr/local/cpanel/Cpanel/Logaholic.pm line 659
Cpanel::Logaholic::user_maintenance('bizbox', HASH(0x8e4baa8)) called at cpsrvd-ssl line 2230
eval {...} called at cpsrvd-ssl line 2238
main::dodoc_cpaneld() called at cpsrvd-ssl line 1473
main::dodoc(HASH(0x856092c)) called at cpsrvd-ssl line 1214
main::handle_one_connection() called at cpsrvd-ssl line 875

Finally, when I check the database server (a remote mysql server - mysql is not local to the logaholic server) there are no databases created for any users under LogaholicDB

So what do I need to do to fix logaholic?
 
Last edited:

michael_S

Registered
Aug 26, 2002
2
0
151
After some checking the users on the remote mysql server, I found that the user that was created for logaholic did not have access permission from the server it is on. I added the correct user permissions manually from the mysql command line and then did another re-installation of logaholic.

The installation completed successfully this time and all appears to be working properly now.

If anyone else runs into this problem the specific mysql command to add the correct user/permissions that I used is:

GRANT ALL PRIVILEGES ON logaholicDB_YOUR_DB.* to 'logaholic'@'remote_host' IDENTIFIED BY 'logaholic_password';

Replace YOUR_DB above with the master database for logaholic (usually the subdomain portion of the hostname).

Replace 'remote_host' above with the correct IP or hostname of the server that logaholic is installed on.

Replace 'logaholic_password' with the actual logaholic $config['mysqlpass'] found in /var/cpanel/logaholic/logaholic_api/config.php