Refreshing a License Key in Plesk

This morning I encountered an odd error on one of my Plesk servers: it wouldn’t let me log in, with an error message like this:

SWKeyExFatalError
Message Repository is not opened
File functions.php

I’ve tried running the Plesk repair tool, which found some errors and corrected them, but it kept telling me that that spurious repository could not be opened. I found this help article that suggested to check if the license file at /etc/sw/keys/info might be empty and add a line to it, but mine was not.

Turns out though that Plesk had an issue with my license key. Manually refreshing it did the trick, so I thought I’d make a note on how to make that happen.

First, let’s remove the current license key file by removing it:

rm /etc/sw/keys/registry.xml

Next we’ll restart the Plesk service:

service sw-engine restart

Now we can retrieve the license key again:

/usr/local/psa/bin/license --retrieve

This will rebuild all necessary files including the one above we’ve deleted. In my case, that’s what brought Plesk to life again. For completion, this happened on a CentOS 7.9 server with Plesk Obsidian 18.0.39.1

Here’s the article that helped (solution is in the workaround section at the bottom):

You can leave a comment on my original post.