I have activated license on an ubuntu 16.04 server machine and now I’m trying to run our software on a docker container with volume mount of /home/ubuntu/.local/share/data/bconf/data.conf with a sudo user (ubuntu) . However, it is returning an error of LA_E_SYSTEM_PERMISSION when islicensegenuine() is called. Does anyone know what’s happening here?
If you are not running your app as a root user, then you must pass LA_USER flag. Please console log the user and home directory from your app. It seems it is trying to write in a different directory.
Also, try writing to any temp file in .local/share/data/ folder from your python code.
I am able to create a file from within the docker container onto the /.local/share/data folder. I have also added ubuntu as a user in my docker file but now it returns another error 63 MACHINE_FINGERPRINT.
in the host. it will work if activated in the container instead which is strange. I’ve also tried running islicensegenuine() on the host after activating in the container and it actually takes on the latest value of expiry.
Will there be issues if I were to deploy new images and spurn up containers next time?
Also, why does license validation work in both the host and container when first activated in the container but not vice versa? i.e activate in host and try to validate in container
The docker is somewhat like a light virtual machine. It doesn’t give access to all the host details, hence generates its own fingerprint.
Ideally you should call ActivateLicense() and IsProductGenuine() inside the docker with ~/.local/share/data/ as mounted directory for all the containers. You should use the host system for data persistence only and not for Activation.
Host generates a better stronger fingerprint as it can access many resources including mac address. The docker generates a weaker fingerprint as it doesn’t include mac address. The docker fingerprint can be a subset of host fingerprint. Since default fingerprint matching strategy is “fuzzy” it may or may not accept the fingerprint depending on the fingerprint score.
If you change fingerprint matching strategy to “exact” (not recommended usually) then you won’t observe this behaviour.
It is ideal if it is a subset but yet can correctly identify the machine. We want to have a docker image that can be readily deployed at multiple machines and each of these machines should already have been activated before hand. This is so when we push out new images, the license date never changes. Having to activate every single time means we need a response file that never expires.
I would recommend using on-premise floating-license. You install the LexFloatServer (can be activated offline) in the customer’s LAN on some machine (not inside a docker).
Then your containers lease licenses from the LexFloatServer inside the LAN. You don’t need any persistence too as license data is stored in RAM.