Bobcares

DirectAdmin License Update Error – Update the license & Fix error

by | Jun 13, 2021

Stuck with DirectAdmin License Update Error? We can help you.

This error can happen when we are unable to connect to port 443 on directadmin.com.

As part of our Server Management Services, we assist our customers with several DirectAdmin queries.

Today, let us discuss the steps to update the license on the Directadmin and how to fix this error.

 

DirectAdmin License Update Error

Most often, while updating the DirectAdmin license, we may come across the error:

Error determining IP via myip.directadmin.com

 

  • Update DirectAdmin license manually

In order to update the DirectAdmin license manually, we type:

/usr/local/directadmin/scripts/getLicense.sh auto
service directadmin restart

In addition, to specify the UID/LID values, we manually enter them.

Then we run the following commands:

cd /usr/local/directadmin/scripts
./getLicense.sh 1234 567890
service directadmin restart

Here, 1234 and 567890 are the Client ID and License ID, respectively.

Suppose there is no error while extracting the update.tar.gz file. Then we run head -n 1 /usr/local/directadmin/conf/license.key to search for an error.

In case there is a readable error in the file, we double-check the IP we use matches the IP in the license on the system. We also check it’s active in our client’s section.

Consider, we have multiple IPs on the device and wget is binding to the incorrect one. In such a case, we can specify the IP to bind to by adding it as the last argument:

cd /usr/local/directadmin/scripts
./getLicense.sh 1234 567890 1.2.3.4
service directadmin restart

Fix the Error determining IP error

Sometimes, we may be unable to connect to port 443 on directadmin.com (https), or won’t get any results (no returned data), it may be a block somewhere on 443.

In that case, we use port 80 to get the license.

To do so, we type:

echo 1 > /root/.insecure_download

Eventually, the scripts will automatically download over port 80, without encryption.

If we face an error during the restart, e.g.,

Stopping DirectAdmin: [ FAILED ]
Starting DirectAdmin: [ OK ]

This means the PID file may be out of sync. In this case, we restart DirectAdmin forcefully:

killall -9 directadmin
service irectadmin start

We retry the restart command, and ensure that both the “Stopping” and “Starting” sections are “[ OK ]”.

  • Automate license updates

It is also possible that the DA itself cannot connect out to update your license, regular calls to getLicense.sh will be required.

We automate this by editing /etc/cron.d/directadmin_cron and add this line at the bottom of the file:

0 6 15 * * root /usr/local/directadmin/scripts/getLicense.sh 1234 567890; echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue

Here, The day of the month that the license will update is the 15th.

We can pick a value of choice. However, it should usually be about 5 days before the update.

We restart the cron to ensure it loads in the new value:

service crond restart

On FreeBSD, the path to directadmin_cron will be /etc/crontab.

Finally, to restart crond, we run:

/etc/rc.d/cron restart

[Need help with either of the above? Feel free to contact us anytime]

 

Conclusion

In short, we saw how our Support Techs fix the License Update Error in DirectAdmin.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.