Cannot limit the number of concurrent users

Hi,

We added support for hosted floating licenses in our product but we cannot enforce the maximum allowed activations. We use LexActivator, C++.

To reproduce the issue:

As per the documentation, we created a “hosted-floating” license.
We set its “allowed activations” to 1, as a test value.

  • We start our app on computer A. We activate the license, the API call is successful.
  • We keep the app opened on computer A (no deactivation).
  • We start our app on computer B. We activate the same license, the API call is successful. This should not happen because “allowed activations” is set to 1.

What’s confusing is that the online Activation logs on the dashboard confirms that the license has been activated on both computers and that there was no deactivation. However the license summary shows “0/1 activations” in the end.

Why is this not working as intended? Are we missing something?

Thanks.

Some screenshots to illustrate:

  1. The summary after I start the app on computer A
  2. The activation log
  3. The summary then goes back to 0/1 after starting the app on computer B

And most importantly, both activations work without errors, even though “allowed activations” is 1.

Hi Lindale,

What is the lease duration set for the hosted-floating license?

When lease duration is over, the license activation auto-deactivates (not shown in logs). If server sync frequency is less than lease duration than the activation won’t auto-deactivate unless your app exits or you invoke DeactivateLicense().

The time difference between the two requests was around 31 seconds, if the lease duration was less than or equal to 30 seconds, the second request would succeed as first will have expired by then.

Lease duration should be greater than server sync interval, if you want to listen to license status events in the callback function set using SetLicenseCallback() function.

https://docs.cryptlex.com/license-management/license-policies#lease-duration

Also do read about leasing strategy:

https://docs.cryptlex.com/license-management/license-policies#leasing-strategy

HI @adnan-kamili,

When lease duration is over, the license activation auto-deactivates (not shown in logs).

That would be very useful if that was shown in the logs!

The time difference between the two requests was around 31 seconds, if the lease duration was less than or equal to 30 seconds, the second request would succeed as first will have expired by then.

The lease duration is actually the default value of 3630 (server sync 3600), so the first instance of the app could not have automatically deactivated.

Also do read about leasing strategy

We tried both leasing strategies with no differences.

(Also, the activation count is now “-1/1”…)

Any idea of we could debug this issue? Maybe we did not use the API correctly? Or is there something else to be aware of in the license options?

Can you share your code snippet which you are using and license details?

We have added some more logging to the system. We haven’t been able to replicate your issue. Can you please try again.

Hi @adnan-kamili,

I reduced the code to be able to quickly reproduce the issue, it basically only does:

SetProductData(...);
SetProductId(..., LA_USER);
SetAppVersion(...);
SetLicenseKey(...);
ActivateLicense();

I restarted from a clean state and followed those steps:

  1. Connected to the dashboard
  2. Created a new policy, left all the default values except:
  • License type: Hosted Floating
  • Allowed activations: 1
  • Allowed deactivations: 0 (infinite)
  • Validity: 0 days (infinite)
  • Server Sync Grace Period: 3600
  • Expiration Strategy: Immediate
  • Policy ID is 5b481b82-4f18-4c76-91cc-ad71c99ae057
  1. Created a new license from this policy, did not change any setting
  • License ID is bffda31a-ae00-40f8-8fae-52961cba5936

Then I did the actual test again, like described before:

  1. Start the app on computer A, ActivateLicense() returns LA_OK
  2. Keep the app open
  3. Wait for ~2 minutes
  4. Start the app on computer B, ActivateLicense() also returns LA_OK even though it should not

Let me know if you need more info.

(I also did the exact same test with a standard node-locked license, and it works well; computer B cannot activate. Only floating-licenses have this issue)

Hi,

Can you please share the license key and license page screenshot, and screenshot of the activation pages.

Hi @adnan-kamili,

Here are screenshots.

In the activation logs, we can now see two Deactivations but I can 100% confirm that
1.They were not in the logs yesterday night when I did this test
2. No Deactivate() was called between the two Activate() in our code

(I did call Deactivate() on each computer ~2 minutes after the test was done to try other tests but the log shows a different order and their date is incorrect. I double-checked our own logs.)

Is it possible that the deactivation has been triggered on your side because of an improper setting?

The deactivation date has a known bug, it displays same as activation. If you called Deactivate then they must appear in the logs.

You need to share your product id, product.dat and license key. Send that to us through email at support@cryptlex.com

I sent all of this. Thanks.

Can you share the leaseexpiry date of the license activations and confirm it is greater than created date.

@adnan-kamili
How can I obtain the lease expiry date?
I don’t see such info on the “Activations” or" Activation Logs" pages

LeaseExpiresAt property in the license activation.

I cannot see this info.

We’re talking about the Activations page, right ?
At Home > Products > Transmutr > Licenses > License > Activations

Ok I found that you need to click on the activation to see the details.

I see only 2 activations from India (You, I suppose?)
The “EXPIRES AT:” is empty.

ExpiresAt and LeaseExpiresAt are different properties

@adnan-kamili
Maybe I’m on the wrong page but I cannot see those info.
Can you please describe exactly how to access them?

Please share the screenshot of license activation page

The issue is fixed now :slight_smile:

Thanks for your support.