Incorrect parallel license usage on kubernetes deployment



  • We recently purchased a JSReport license and have activated this on our environments last week.

    We have the following environments where we applied this license:
    • 5x Local dev environment on developers laptop (using development=true parameter)
    • 1x ‘Live’ dev environment in Azure Kubernetes cluster, exclusively accessed by developers (using development=true parameter)
    • 1x live test environment in another azure Kubernetes cluster, accessible to testers and stakeholders (not using development=true parameter)

    So, we only have 1 non-development environment running with this license key.
    Today I accessed the studio and got the following pop-up:

    Detected parallel usage of another jsreport instance with the same license key.
    The development instances should use config license.development=true and every production instance should have its own enterprise license key. The deployment with several production jsreport instances should use enterprise scale license which doesn't limit the license key usage.

    I have a suspicion what is causing this: Because we are running Kubernetes, and using a deployment to start a JSReport pod, every time we modify the deployment, a new pod is started with a random generated suffix (e.g. js-report-c47b65884-972fb).
    I noticed on the dashboard the monitoring statistics also show up with each of the pod names that were previously being used:
    0_1642578997658_upload-2b6543af-bc3b-48de-8796-6e24cdc0e583

    I suspect that this pod name is probably used somewhere to detect parallel license use?
    Does this mean we’re using JSReport inside Kubernetes in the wrong way?



  • Thank you for the great description. I see the problem.
    We will try to update the licensing server to cover this situation. The false warning shouldn't pop up then.
    Please ignore the warning now.



  • The licensing server was updated.
    Please let me know if you would see the usage warnings in the future.



  • I just got another popup complaining about parallel license usage. This is on a new 'live' development environment running on a different azure kubernetes cluster, it also has the development=true parameter set



  • Ouch. I guess you use the environment variable to set license_development=true, right?. I've just found a bug in this environment variable parsing so the only way to configure the development license is in the config file or when setting up jsreport in nodejs.

     "license": {
        "development": true
      }
    

    I've pushed the fix to the repo, we will likely ship a release in the next few days with it.



  • Indeed since we're deploying the docker image in a Kubernetes cluster, the easiest way is to use environment variables to configure it.
    But are you sure that it's broken? Because I do see (development) in the license modal when looking in studio, hence I assumed it was correctly detecting the development flag:
    0_1642773491921_upload-f6ab5cc7-0120-45ba-a163-f16b2d8a1b81

    Just for my information, is there any restrictions in the API when this license verification fails?



  • But are you sure that it's broken? Because I do see (development) in the license modal when looking in studio

    Because of the bug, the server thinks it runs in the production, but the studio thinks it runs in the development.

    Just for my information, is there any restrictions in the API when this license verification fails?

    I believe you mean when the parallel usage check fails. There are no limitations. Just the warnings you see. Everything runs the same.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.