DirectAdmin License has Expired
Invalid license errors are either due to wrong uid/lid, IP, or date, or the DA cron isn’t running. You should first see if the cron is running by searching the cron log for license update crons,
grep license /var/log/cron
If not, try to run the cron manually,
cd /usr/local/directadmin; echo 'action=update&value=license' >> data/task.queue; ./dataskq d2000
If you see errors like the following, you may need to then try to update the license manually (this indicates that the cron is running if these messages have been sent daily),
* An error has occurred while trying to update the license file *
You can try updating the license to resolve this issue,
uid=$(grep uid /usr/local/directadmin/scripts/setup.txt | awk -F'=' {'print $2'}); lid=$(grep lid /usr/local/directadmin/scripts/setup.txt | awk -F'=' {'print $2'}); sh /usr/local/directadmin/scripts/getLicense.sh $uid $lid ; service directadmin restart
There are a few errors that may occur,
1) DirectAdmin fails to stop and start during the restart command. Use this command to correct,
killall -9 directadmin; /etc/init.d/directadmin start
Retry the restart command, to ensure that both the “Stopping” and “Starting” sections are “[ OK ]”.
2) You may need to specify the primary IP with the command to ensure that the correct IP is being bound by wget to the license key,
uid=$(grep uid /usr/local/directadmin/scripts/setup.txt | awk -F'=' {'print $2'}); lid=$(grep lid /usr/local/directadmin/scripts/setup.txt | awk -F'=' {'print $2'}); ip=`hostname -i`; sh /usr/local/directadmin/scripts/getLicense.sh $uid $lid $ip
3) If you cannot connect to https://directadmin.com (port 443), you can try using port 80,
echo 1 > /root/.insecure_download
If you find that this error is reoccurring, you could make a separate cron to automatically update the license for you.
uid=$(grep uid /usr/local/directadmin/scripts/setup.txt | awk -F'=' {'print $2'}); lid=$(grep lid /usr/local/directadmin/scripts/setup.txt | awk -F'=' {'print $2'}); echo '0 0 4 * * root /usr/local/directadmin/scripts/getLicense.sh $uid $lid ; echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue' >> /etc/cron.d/directadmin_cron ; /etc/init.d/crond restart
Conclusion
Now that we’ve gone over different types of DirectAdmin license errors and looked around at those errors. We also shared the steps to update the license key and configuring the correct cron job for the license update.
KnownHost offers 365 days a year, 24 hours a day, all 7 days of the week best in class technical support. A dedicated team ready to help you with requests such as adding new password protected directories; should you need our assistance. You’re not using KnownHost for the best webhosting experience? Well, why not? Check with our Sales team to see what can KnownHost do for you in improving your webhosting experience.