Installing Flexlm License Server on Linux
June 11, 2015
Steve DiBartolomeo
Applications Manager
Steve DiBartolomeo
Applications Manager
A couple of videos that can be very helpful
Introduction to the Flexlm License Manager |
Floating license installation and FLEXlm troubleshooting / debug. The following info will provide assistance to setup your FLEXlm server. NOTE: Since FLEXlm is a third-party tool, Altia cannot support it directly. Also, some/many FLEXlm problems arise from internal IT/network/firewall configurations that Altia cannot assist with. If the license is already activated, the host name and host ID for the server must match the values used for activation. The license will be placed in /opt/intel/serverlicenses. If you are not connected: Provide the path to the license file or folder from step 2.2 above. The license manager will start automatically.
Step 1 - Getting the Machine's Hostid
One cannot simply use the Linux operating system's hostid command to obtain the hostid. You must use the utility called lmhostid that is provided as part of the flexlm utilities. Here is an example.
On my machine (ubuntu 2.6 kernel) I type:
using the lmhostid utility I type: Clearly these are two different values and if you request a license using the hostid a8c09100 your license server won't run using the license codes we send you.
Where can you get the lmhostid utility? Here:
32 bit version flexlm_artwork_v11.14.1.1.linux32.tar.gz
Step 2 - Send an Email to Artwork Requesting your License Codes
This is a 'sample' Please don't copy and paste this verbatim and email to us.
Step 3 - Download the Flexlm Linux Software
You should get an email back from Artwork that includes the download link to the flexlm license server software as well as your license codes. Here is what it will look like (approximately):
In this example I am going to create a directory called: /home/cad/flex and ftp directly from this directory to Artwork's ftp server and download the zipped version of the release. (Of course, if you have a web browser you can use that to connect to our ftp server, download the file and move it to the directory of your choice ...)
Now I've got the file I need in my /home/cad/flex directory where I plan to install the files.
Step 4 Installation
First, let's unpack the zip file:
Now using the method of your choice (i.e. vi or gedit) let's create and edit our license file and customize it as needed. Two things have to be decided that affect the contents of the license file.
What port will this license manager listen on?
Where is the artwork daemon?
The choice of port is up to you (and your system administrator) I am going to select port 27005. And I know where the artwork daemon is located because I just copied it into /home/cad/flex directory. So let me create a file called license.dat and edit the codes I received from Artwork there.
Edits
I added the port 27005 to the SERVER line
I added the path /home/cad/flex/artwork to the VENDOR line
Starting The License Manager
Now all we have to do is to start the license manager. This requires a couple of additional command line arguments:
the name of the license file
the name of the log file
Now let's start the license manager:
[there are no carriage returns, of course.]
You can check successful launching of the license manager by using the lmstat utility.
On the Client Side
The lmgrd license server will continue to run and listen on port 27005 for any license requests. Any client (i.e. the Qckvu3 software) can obtain a license as long as one is available for checkout. On each client machine you need an environment variable set which points to the license manager and port. In this example the environment variable is:
Variable | Value |
ARTWORK_LICENSE_FILE | 27005@asmsc45 |
Restarting the License Manager on Reboot
Servers are rarely rebooted but if the license server is rebooted you want to be sure that the license server is restarted so that your clients can continue to check out licenses.
This can be best accomplished by adding a line to the OS's start up section. This may vary for different Linux flavors but typically the file to be edited is:
/etc/init.d/rc.local While you can put in a fancy script for testing the existance of lmgrd and license.dat and then checking for an existing process already running, it is sufficient to just include simple command:
[there are no carriage returns, of course.]
Known Problems and Their Solution
We've run into these problems enough to note them here.
License server log reports can't open (or write to) /usr/tmp
It appears that lmgrd expects to be able to write a process file to /usr/tmp. We've seen some Linux installs that don't have a /usr/tmp directory.
Solution
Manually create a /usr/tmp directory (you probably need to be root to do this) and then change the permissions on it so that anyone can read/write/execute the directory.
License Server Won't Start at All
The license server log shows that the lmgrd did not start.
Reason
The hostid supplied by the user does not match the 'true' hostid of the machine. This seems to happen because some users rely on the hostinfo command instead of usling the provided utility lmhostid.
Solution
Run the utility lmhostid and make sure that the value which is returned matches that used to generate the license codes.
License Server reports another instance is already running and Won't Start
Reason
The user already started the license server previously and did not stop it or stopped it in a way that left the lock file present.
Solution
First, check to see if a license server is running using the command: ps -ef | grep lmgrd. If you see an lmgrd and an artwork process running, stop them using the lmdown utility.
If you don't see any lmgrd or artwork process running, then check for the presence of /usr/tmp/.flexid directory to see if there is a process file left (that should have been deleted when the lmgrd was stopped) and delete it. Also check for the existence of /var/tmp/artwork (this is a lock file) and delete it.