How to set CHEMAXON_LICENSE_URL for impersonation on Red Hat

User 33839140be

13-02-2015 04:54:05

G'day,


I am trying to license the ChemAxon collection for Pipeline Pilot on a server running AEP9.2 on Red Hat EL 6.6.


The server is running in impersonation mode.


I've successfully, installed and registered the collection. If I copy the license file to .chemaxon/license.cxl in my home directory then I can run the example protocols run successfully (but only I can).


Where I am having difficulty is setting CHEMAXON_LICENSE_URL globally so that all users can use the collection.


I have copied the license file to /apps/pp/licensing/Licenses/chemaxon_license.cxl. How do I set CHEMAXON_LICENSE_URL to the license path for all users?


I've tried the following:



  1. Append the following line to /etc/environment:
    CHEMAXON_LICENSE_URL=/apps/pp/licensing/Licenses/chemaxon_license.cxl

  2. Append the following line to /etc/security/pam_env.conf
    CHEMAXON_LICENSE_URL    DEFAULT=/apps/pp/licensing/Licenses/chemaxon_license.cxl

  3. Created /etc/profile.d/chemaxon.sh and /etc/profile.d/chemaxon.csh to set CHEMAXON_LICENSE_URL 


None of these methods has succeeded. In each case I see the error message given below.


How can I set CHEMAXON_LICENSE_URL globally on Red Hat so it will work with impersonation mode.


Thanks,


Chris.


Error report:


Fri Feb 13 05:48:52 CET 2015


 


No license file was found.


Product name: Structure to Name Plugin


Licenses are read from:


Please visit http://www.chemaxon.com/contact-us/ or contact sales _at_ chemaxon.com to obtain the corresponding license.


 


 


JChem version : 15.2.9.0


Component collection version : 15.2.9.0


JVM: Oracle Corporation  Java HotSpot(TM) 64-Bit Server VM  1.7.0_15


Memory:  368.0 MB maximum  368.0 MB total  344.0 MB free


OS: amd64 Linux 2.6.32-504.el6.x86_64


Exception ID: E23211330


 


Current input structure:


No PP input structure found.


 


 


Stack trace:


chemaxon.license.LicenseException: No license file was found.


Product name: Structure to Name Plugin


Licenses are read from:


Please visit http://www.chemaxon.com/contact-us/ or contact sales _at_ chemaxon.com to obtain the corresponding license.


 


        at chemaxon.license.LicenseHandler.checkLicense(LicenseHandler.java:810)


        at chemaxon.license.LicenseHandler.checkLicense(LicenseHandler.java:786)


        at chemaxon.marvin.io.formats.name.nameexport.IUPACNamer.checkLicense(IUPACNamer.java:40)


        at chemaxon.marvin.io.formats.name.nameexport.IUPACNamer.generateName(IUPACNamer.java:34)


        at chemaxon.marvin.io.formats.name.nameexport.NameExportModule.convert(NameExportModule.java:66)


        at chemaxon.formats.MolExporter.exportToObject(MolExporter.java:1348)


        at chemaxon.formats.MolExporter.exportToObject(MolExporter.java:1292)


        at chemaxon.pp.MolConverter.export(MolConverter.java:218)


        at chemaxon.pp.MolConverter.onProcessBody(MolConverter.java:167)


        at chemaxon.pp.ChemAxonComponent.onProcess(ChemAxonComponent.java:54)


        at com.scitegic.pilot.Pilot.callOnProcess(Pilot.java:443)


 


CTAB of current structure:


No PP input structure found.


---------------------------------


ChemAxon 9c0afc9aaf

13-02-2015 06:45:00

Hi Chris,


I don't have a Red Hat instance at hand at the moment to investigate the system environment variables, but here is a quicker solution (probably we will document this too):


Edit the file "<install_root>/apps/scitegic/core/xml/Objects/JavaEnvironment.xml" 


Add the following argument to "JVMArgs":


<sci:value>-Dchemaxon.license.url=<path_to_license_file></sci:value>


e.g. in your case:


<sci:value>-Dchemaxon.license.url=/apps/pp/licensing/Licenses/chemaxon_license.cxl</sci:value>


You may need to try the protocol more than once after saving this, if necessary restart the PP server.


You can also check the status of licenses via executing:


"ChemAxon" -> "Utilities" -> "Show ChemAxon Environment" (Components window)


BTW I'm not sure the directory you choose was intended to hold 3rd party licenses, but they seem to coexist quite happily.


Please let me know if this helps.


Best regards,


Szilard

User 33839140be

13-02-2015 10:09:00

G'day,


Thanks for the suggestion.


I haven't tried it as I came across a different solution


I read the following in the AEP packging manual:



When the server starts on a Linux system, it looks for any shell script with the .sh extension in the directory "<install_root>/linux_bin/env.d". Such scripts are sourced as a part of the server startup process. A package can add a file to this location, typically to define package-specific environment settings that refer to locations in the package installation itself. You can add a file to this directory using the Copy instruction of the OnInstall directive in the "package.conf" file.



So I created a chemaxon.sh script in the env.d directory with the contents:


echo export CHEMAXON_LICENSE_URL=/apps/pp/licensing/Licenses/chemaxon_license.cxl


Then I restarted the server and the ChemAxon components ran successfully.


Perhaps future versions of the ChemAxon PP package could use this approach, i.e. created .../env.d/chemaxon.sh, and direct admins to edit this file to hold the license file's location.


Thanks,


Chris.

ChemAxon 9c0afc9aaf

13-02-2015 12:19:40

Hi Chris,


 


I'm glad you could resolve the problem, and thank you for the information !


I have also looked at the packaging guide and read the relevant part.


It is also valid solution, but we wiil probably stick with the JavaEnvironment approach, as it is platform neutral and keeps the documentation simpler. The server restart may also be avoided this way (which can be a pain on a live system).


To be decided ... in any case there is a choice of methods now for Linux administrators :)


Best,


Szilard