User Tools

Site Tools


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/ $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/ $uid $lid $ip

3) If you cannot connect to (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/ $uid $lid ; echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue' >> /etc/cron.d/directadmin_cron ; /etc/init.d/crond restart
control-panels/directadmin/directadmin-license-has-expired.txt · Last modified: 2020/06/01 09:17 by Karson N.