For customers working on Liferay DXP, Liferay Commerce or Liferay Portal, this article serves as a troubleshooting guide for activation key issues.
Table of Contents
1. Reading Folders and Logs
Reading the License Manager
When an activation key fails, there will likely be an error on the screen. This section describes how to read the activation XML file you've just deployed and cross reference it with what the License Manager page says.
- View License Manager page at
{eg. localhost}/c/portal/license
- Cross reference recently deployed XML with XML being read by the server
- License Manager page provides useful information about deployed keys:
- Version of Liferay
- Server Details (MAC, IP, Host name)
- Activation Key Type (Production, Non-production, Developer)
- Lifetime of activation key (perpetual or trial)
- If the information does not match with the recently deployed XML, please check the Deploy / Directory covered below.
Checking the Deploy Directory
Symptom: When first attempting to deploy your .xml
activation key file, it's possible that the file is not deployed. A majority of the time, this issue is due to the .xml
file not being placed in the correct directory.
- Start up your application server. The deploy/ directory will be created in
${liferay.home}
on the first startup- XML files should be placed in
${auto.deploy.deploy.dir}
directory (usually,${liferay.home}/deploy
) - XML files should not be placed in
${liferay.home}/data/license
- XML files should be placed in
- Once dropped, the XML will disappear while the server is running
- A
.li
file will be generated in${liferay.home}/data/license
If the XML is still sitting in /deploy directory, check Deployment.
The *.li exists in ${liferay.home}/data/*
Symptom:
Conflict with existing activation keys
If an activation key has been deployed in the past, you will have an *.li file in ${liferay.home}/data/license
. If the current key is not being deployed there may be conflicts with this file.
- Remove the .li file that resides in
${liferay.home}/data/*
- For Liferay DXP, remove any *.xml files from the
${liferay.home}/osgi/modules/*
folder - Redeploy the provided key XML file by copying it into liferay deploy directory (see
auto.deploy.deploy.dir
)
If the error reoccurs, proceed to the next step, Searching for the *.li file.
Conflict with LCS
Up to Liferay DXP 7.0 Fix Pack 53, activation through *.xml keys is not compatible with Liferay Connected Services activation. Therefore it is mandatory to uninstall the LCS client before deploying the activation key.
- Shut down the server
- Remove Liferay Connected Services Client.lpkg, located:
- In the Tomcat bundle, in the
$ {liferay.home}/osgi/marketplace
folder - In case of using another application server, in the
OSGi Dependencies/marketplace
folder
- In the Tomcat bundle, in the
- Start up Liferay
These steps are optional for Liferay DXP 7.2, 7.1 and 7.0 Fix Pack 54 or higher.
If the error reoccurs, proceed to the next step, Searching for the *.li file.
Searching for the *.li file
Symptom: If there is no *.li in ${liferay.home}/data/license
, it is possible that the activation key has been deploying somewhere else. If this happens, there will be conflicts. This scenario will happen most with custom deployments of Liferay Portal.
- Run a search for .li files in any directory
- Remove any .li files found
- Redeploy the XML activation key file
If the error reoccurs, proceed to Reading the Server Logs article.
Reading the Server Logs
Symptom: If after removing all .li
files an activation key error persists, please check the logs.
- Check the
${liferay.home}/logs
folder - Locate the logs generated during deployment
Common error logs that are generated:
- License has been deployed in the data/license folder
ERROR [LicenseManager:?] Failed to read license file C:\Users\Liferay\Desktop\liferay-portal-6.1.10-ee-ga1\data\license\license-portaldevelopment-developer-6.1-liferaycom.xml ERROR [LicenseManager:?] No binary licenses found
Please place the XML file into the ${auto.deploy.deploy.dir}
folder (usually, ${liferay.home}/deploy
). If you have confirmed that the XML file has been dropped in ${auto.deploy.deploy.dir}
, please refer to Checking Deploy/ Directory article.
- Read-write permissions must be configured
ERROR [AutoDeployDir:143] Unable to write license-portalproduction-production-6.1ga1-abc123.xml
If this error if found within your logs, please refer to Read/Write Permissions article.
2. Deployment Issues
Incorrect Deploy Directory
Symptom: An activation error message is still received after clearing the data/license folder, removing all .li file, and confirming that the XML file has been dropped into ${liferay.home}/deploy
directory.
There are two properties that control the directories involved in activation key deployment:
liferay.home
is the root of some directories used by the portal, including the one where .li key files are copied as a result of the activation process. Its default value depends on the application server liferay is running on.auto.deploy.deploy.dir
defines where the portal will listen to in order to deploy new components, including .xml activation key files. This property defaults to${liferay.home}/deploy
Therefore, to check the involved directories,
- Check the
auto.deploy.deploy.dir
value. This directory is where a xml key file has to be copied to initiate the activation key deployment process. - Check the
liferay.home
value. On activation key deployment, a .li file will be written into${liferay.home}/data/license
Please note that you can configure these properties via portal-ext.properties
. However, in case your portal was running before changing liferay.home, you should move old liferay.home contents to the new location.
If the activation error message is still received, please proceed with opening a Help Center ticket and providing the following information:
- A screenshot of the error on the license manager page
- The logs generated during the deployment process
- The
portal-ext.properties
file
Read-Write Permissions
One error that can occur in deploying activation keys is due to the permission settings on the operating system.
Symptoms:
- The XML file sits in the
${liferay.home}/deploy
folder - A .li file is not generated into the
${liferay.home}/data/license
- The following error log is generated during deployment
ERROR [AutoDeployDir:xxx] Unable to write license-portalproduction-production-6.1ga1-abc123.xml
Read/Write Permissions Must Be Configured
Linux
- To see what permissions files have, open a terminal,
cd
to the corresponding folder inside${liferay.home}
, then run commandls -l
- To change permissions, enter command
chmod -R 777 file
orchmod -R a+rwx file
(where file is either the activation key file or some directory)
Windows
Even though your user may have read/write permissions on the directory and file, they may have the Windows “read only” flag set in place. This setting will cause Java to think that the file cannot be written to.
To check the permissions and to change the flag:
- Right-click the activation key file, and select Properties
- In the General tab, uncheck the Read-only checkbox if it is checked.
- Place the key file in the deploy folder to try again.
Open a Help Center Support Ticket:
If the license error message is still received, please proceed with opening a Help Center ticket and providing the following information:
- A screenshot of the error on the license manager page
- The logs generated during the deployment process
- The
portal-ext.properties
file
Using an Order ID (Marketplace Applications)
Symptom: For applications registered with an order ID and an error message is received
- No licenses available/server is already registered
- No external internet connectivity: "unable to find valid certification path to requested target"
Please open a Help Center ticket and provide the following information:
- Server details (MAC address, IP address, and host name).
- If your server is running multiple JVM's or instances of Liferay.
- Server environment.
- Logs that are generated during the deployment process.
- Name of the Marketplace App to be activated