Symptoms
The most likely reason that you've found this article is that you see the following error shortly after trying to set up a Tomcat instance. The following command is run as the cPanel user:
# ubic status ea-tomcat85
ubic is not configured, run 'ubic-admin setup' first
Description
This error occurs when ubic is not setup fully when the account was initially added to tomcat. The most likely cause is that the user does not have permission to access crontab.
Here's the error you might have seen during setup:
Installing ubic.update service...
Installing cron jobs...
crontab -l failed at /usr/local/cpanel/3rdparty/perl/530/lib/perl5/cpanel_lib/Ubic/Admin/Setup.pm line 381.
Could not ensure base ubic configuration: 256
Failed to add service management (exit 2304)
And this is another error indicative of this issue while running crontab as the cPanel user:
# crontab -l
You (username) are not allowed to use this program (/usr/bin/crontab)
See crontab(1) for more information
Workaround
You will want to make sure the user has access to the crontab. If /etc/cron.allow exists, the user must be in the file, or else you can delete the file. If the user exists in /etc/cron.deny, the user will not be able to properly use Tomcat with Ubic.
After fixing the user's crontab access, you will need to remove and readd the user to tomcat.
Warning: The following commands take a backup of the ea-tomcat85 directory for the user, then remove the user from tomcat which will remove the user's data before setting tomcat up again. Be sure that you have a backup available before taking these steps if you have made customizations.
This command can be run as the user to backup the directory:
cp -ai /home/username/ea-tomcat85{,.orig}
The ea-tomcat85 script will need to be run as root.
/usr/local/cpanel/scripts/ea-tomcat85 rem username --verify=username
/usr/local/cpanel/scripts/ea-tomcat85 add username
After crontab is functioning and the root user runs these commands, Tomcat will be up, and ubic will function.
Comments
0 comments
Article is closed for comments.