XenMobile: Samsung SAFE ELM License Key fails to deploy with error Invalid ELM Key or ELM Key Corrupted

Bug Xenmobile
Symptoms or Error
Attempts to use the macro ‘${elm.license.key}’, as per the stated configuration instructions for XenMobile Server, may not provide the desired result. The Samsung SAFE license key itself may fail to deploy and when you check on the log files to see why this failure has occurred, you may find an error stating ‘Invalid ELM Key’ or instead ‘ELM Key Corrupted’.

Solution
Proceed as follows in order to confirm that your server is displaying the symptoms of this specific problem.

Firstly, generate and collect a Support Bundle from XenMobile Server.
Then locate the file that is named ‘variables.xml’ within the Support Bundle.
Take note of the ELM License Key value that is found inside of this file.

Next, run the following SQL command on the SQL database server for XenMobile Server:

SELECT * FROM EWPROPERTY WHERE NAME = ‘elm.license.key’

Note that this particular database query may or may not return a result.
Only if a result is returned from the database by this query and the value returned is different to the value of the ELM License Key as found within ‘variables.xml’, then your server does have the symptoms of this specific problem.

To clarify:
If a result is not returned from the database by this query, then your server does not have the symptoms of this specific problem. Instead, there may be a different cause of the problem, which still needs to be identified.
Similarly, if a result is returned from the database by this query and the value returned is identical to the value of the ELM License Key within ‘variables.xml’, then your server does not have the symptoms of this specific problem.

If you have confirmed that your server is indeed displaying symptoms of this specific problem, then proceed through the following instructions:

As a best practice, backup the SQL database itself (or the entire database server) before making the following change.
Run the following SQL command on the SQL database server for XenMobile Server:

DELETE FROM EWPROPERTY WHERE NAME = ‘elm.license.key’

The command listed above will remove the offending entry from the underlying database.
As such, XenMobile Server 10.7 will begin to use the correct key, as stored in ‘variables.xml’, when trying to resolve the macro ‘${elm.license.key}’.


Problem Cause
XenMobile Server 9 made use of a database entry for storing the actual value of the ELM License Key.
The introduction of XenMobile 10 saw the use of the local file ‘variables.xml’ to store the license key instead.
XenMobile Server 10.7 will use the value which is stored in the database, if it exists, before checking for the value which is stored in ‘variables.xml’.
As such, it is necessary to delete the old XenMobile 9 era database entry which may still exist in the underlying database.