LCS Preconfiguration

Before registering your server with LCS, there are a few things you must configure. The sections in this guide walk you through these steps:

  1. Downloading the LCS Client App
  2. Preconfiguring LCS to Connect Through a Proxy
  3. Ensuring Access to LCS
  4. NTP Server Synchronization
  5. Configuring the Patching Tool
  6. Configuring WebSphere: This is only necessary if you’re running Liferay DXP on the WebSphere application server.
  7. Installing the LCS Client App

The last section in this guide shows you how to upgrade the LCS client app once your server is registered with LCS. We highly recommend that you upgrade the app whenever Liferay releases a new version of it.

Downloading the LCS Client App

The LCS client app is included in each Liferay DXP bundle and autodeploys when the bundle starts. The included version of the app, however, may be outdated. To get the latest version of the LCS client app, you must first download it via Liferay Marketplace.

Use these steps to purchase and download the app (if you’ve already purchased the app, you can skip to step 3 to download it):

  1. Navigate to the LCS client app in Liferay Marketplace. Sign in to Marketplace, then click the LCS client app’s Free button.

    Figure 1: Click the apps Free button to begin the purchase process.

    Figure 1: Click the app's *Free* button to begin the purchase process.

  2. Select your project, accept the license agreement, and then click the Purchase button. Marketplace then displays your receipt.

    Figure 2: Liferay Marketplace displays your receipt for the LCS client app.

    Figure 2: Liferay Marketplace displays your receipt for the LCS client app.

  3. On the receipt, click See Purchased. This shows where you can download the LCS client app. To download the app, click the App button next to the latest version of the app.

    Figure 3: Click the App button next to the version of the app you want to download.

    Figure 3: Click the *App* button next to the version of the app you want to download.

Great! You’ve successfully downloaded the LCS client app. Before installing it, however, there are a few additional pre-configuration steps you should complete. These appear next; then you’ll learn how to install the app.

Preconfiguring LCS to Connect Through a Proxy

If your server connects to the Internet through a proxy, you must set some properties before deploying the LCS client app. There are two ways to do so—chose only one:

  1. As JVM app server arguments.

  2. As LCS client app properties.

JVM App Server Arguments

To set the proxy properties in your server, set them as JVM app server arguments. Set these properties to the appropriate values for your proxy:


Note that the user, password, and https properties are only needed if your proxy requires authentication.

LCS Client App Properties

To set the proxy properties via the LCS client app, you must create and deploy a config file containing the properties. Follow these steps to do so:

  1. Create the config file com.liferay.lcs.client.configuration.LCSConfiguration.config. In the steps that follow, you’ll set the proxy properties in this file.

  2. Set these proxy* properties to the appropriate values for your proxy:

  3. If your proxy requires authentication, pass the credentials via these properties:

  4. If your proxy requires NTLM authentication, you must also populate these properties:


    Be sure to set proxyDomain and proxyWorkstation to the appropriate values for your proxy. Note that you can leave proxyWorkstation blank if you don’t need it.

  5. Deploy the config file to osgi/configs.

Ensuring Access to LCS

For the LCS client app to work, it must be able to access the following DNS names. If your server is behind a proxy and/or a firewall, then you must open access to these:


As an added security measure, you can also restrict traffic to HTTPS.

The next section discusses NTP server synchronization.

NTP Server Synchronization

For LCS to work properly, the application server running Liferay DXP should be synchronized with a time server. If it’s not, you may get log errors similar to these:

ERROR [pool-6-thread-3][HandshakeTask:68] java.lang.RuntimeException: Handshake expired. 
Check that the server is synchronized with an NTP server. 

WARN [liferay/hot_deploy-1][LCSHotDeployMessageListener:186] LCS portlet is not connected 
java.lang.RuntimeException: com.liferay.jsonwebserviceclient.JSONWebServiceInvocationException: 
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'oauth_problem': was expecting 
('true', 'false' or 'null')_ at [Source: oauth_problem=timestamp_refused&oauth_acceptable_timestamps=1477311475-1477312075; 
line: 1, column: 14] [Sanitized]

For information on how to synchronize your application server with a time server, see your application server’s documentation.

Next, you’ll learn how to configure Liferay DXP’s patching tool.

Configuring the Patching Tool

LCS uses Liferay DXP’s patching tool to apply updates. In bundles, the patching tool is pre-installed. If you’re not running a bundle, you must download and install the patching tool separately.

Once installed, there are a few steps you must complete before LCS can use the patching tool. Note that the commands below apply to Linux, Unix, and Mac. If you’re running Windows, drop the .sh from each command that has it.

  1. Navigate to the patching-tool directory on the command line. It’s typically located in the Liferay Home folder. Liferay Home is usually the parent folder of the application server’s folder.

  2. To let the patching tool discover your Liferay DXP installation, run this command: auto-discovery
  3. To configure the patching tool, run this command: setup
  4. On server startup, the patching tool agent installs the patches downloaded by LCS. For the agent to start with your server, you must set the javaagent property in the JVM options to point to your patching tool installation’s patching-tool-agent.jar. Be sure to specify the correct path to this file:

  5. If your patching tool is installed in a location other than the Liferay Home folder, you must also specify the patching-tool folder’s path as an app server JVM argument. Do this with the patching.tool.home property:


There are also a few other things to consider when using the agent. Due to class loading issues, the agent starts in a separate JVM. You can specify options for it with the patching.tool.agent.jvm.opts property.

-Dpatching.tool.agent.jvm.opts="-Xmx1024m -Xms512m -Dfile.encoding=UTF-8"

You may also experience issues on Windows if the user starting the app server doesn’t have administrator privileges. Here are some examples of the errors you may see:

java.nio.file.FileSystemException: ..\webapps\ROOT\WEB-INF\lib\util-java.jar: Not a file! Access refused

To solve this, set the system property as follows in the patching.tool.agent.jvm.opts property:

-Dpatching.tool.agent.jvm.opts="-Xmx1024m -Xms512m -Dfile.encoding=UTF-8"

The agent also has some flags you can set to control how it behaves:

  • debug: Provides verbose output in the console.
  • nohalt: Starts the portal even if the agent encounters an issue.

You can specify these as follows:,nohalt

Configuring WebSphere

IBM ® WebSphere ® is a trademark of International Business Machines Corporation, registered in many jurisdictions worldwide.

If you’re running the WebSphere application server, then there are some additional configuration steps you must take before deploying the LCS client app:

  1. Shut down the application server.

  2. Add these properties in a file:\
  3. In your Liferay DXP installation, delete the osgi/state folder.

  4. Start the application server.

  5. Navigate to the WebSphere console in a browser.

  6. Select your server and navigate to Java and Process ManagementProcess DefinitionAdditional Properties.

  7. Select Java Virtual MachineCustom Properties.

  8. Click New, and enter the following:

    • Name:
    • Value: false
  9. Click Save, then OK to apply changes to the master configuration.

Note that for LCS client app versions prior to 5.0.0, you must also change the value of the digital.signature.algorithm.provider property in the app’s file to IBMJCE:


Installing the LCS Client App

Once you’ve addressed the above pre-configuration steps, you’re ready to install the LCS client app. Follow these steps to install the app:

  1. In your Liferay Home folder (usually the parent folder of the application server’s folder), delete this file:

    osgi/marketplace/Liferay Connected Services Client.lpkg
  2. Place the new Liferay Connected Services Client.lpkg in osgi/marketplace.

Great! Now you’re all set to register your server with LCS.

The next section shows you how to upgrade the LCS client app. We highly recommend that you do this whenever Liferay releases a new version of the app.

Upgrading the LCS Client App

Your server should always be running the latest version of the LCS client app. There are two ways to upgrade the app, depending on the exact LCS pre-configuration steps you followed:

  1. Via Liferay Marketplace inside Liferay DXP. Use this method if you don’t need to configure the LCS client app (e.g., to connect through a proxy) before it deploys.

    To perform the upgrade, first navigate to Control PanelAppsPurchased. Apps needing an update are listed first. Click Update next to the LCS client app. Note that you may need to restart your server for the upgrade to complete.

  2. Manually, after downloading the LCS client app’s LPKG file to your machine. Use this method if you must pre-configure the LCS client app to connect through a proxy.

    To update the LCS client app manually, follow the previous sections in this guide for downloading and pre-configuring the app. Then deploy it to [Liferay Home]/deploy as you would any other app.

Contact Liferay Support if you need additional assistance with the upgrade process.

« Getting Started with LCSRegistering Your Liferay DXP Server with LCS »
Was this article helpful?
0 out of 0 found this helpful