LexActivator return LA_FAIL during floating activation in a specific PC

Hello support.

Some of our customers are experiencing LA_FAIL error code when requesting floating license activation.

Our app is a console application using C# API. We use dotnet publish (linux-x64, self-contained) command to build the application for Linux.

Only on Ubuntu 20.04.6 LTS on the customer’s PC, when running the Linux version, the following happens:

  1. When activating a floating license, if the license limit has not been reached, an LF_FAIL(1) error occurs.In this case, if you check the server’s Activation Logs page, you will see that the license lease is successful.

  2. If the license limit has been reached, an LF_E_LICENSE_LIMIT_REACHED(49) error occurs.

  3. When activating a user license with the same application, the activation is successful, LF_OK(0) .

  • Use proxy, no username and password
  • Good internet
  • Free floating licenses (5 licenses, 0-1 used)

If we run the same application on our PC, use the proxy, and activate the floating license with the same license key, we get LF_OK(0) success.

The code is as follows.

var productData = @"product-data";
var productId = @"product-id";
var serverUrl = @"proxy-server.address";
var portNum = @"port_numer";
var proxyUserName = "";
var proxyPassword = "";

LexActivator.SetProductData(productData);
LexActivator.SetProductId(productId, LexActivator.PermissionFlags.LA_USER);

var proxy = string.Format(@"http://{2}:{3}@{0}:{1}", serverUrl, portNum, proxyUserName, proxyPassword);
LexActivator.SetNetworkProxy(proxy);

LexActivator.SetLicenseKey(licenseKey);

var status = LexActivator.ActivateLicense();
// status == 1

Any quick assistance would be appreciated as our customers are stumbling over this issue.

thank you.

Hi Osamu,

You have shared status codes from LexFloatClient library, but the code is from LexActivator library. The only reason LexActivator can return LA_FAIL for a floating license activation is when the device’s time is in future, so the activation will succeed on the server and you should see an activation. But when the server sends back the response, LexActivator compares the leaseExpiresAt property of activation response (which will be Now() + leaseDuration) with the local time. If local time is more than leaseExpiresAt it considers the activation lease expired (even if it isn’t) and returns LA_FAIL. It is the only possible reason for LA_FAIL in the case of hosted-floating license. So you have to ensure that the time on the device is correct.

A quick fix (from your side) would be to increase the lease duration to say one day (the local clock most probably won’t be so skewed or a wrong timezone won’t differ by more than one day).