Auto restart License Server on OSX


#1

On OSX computers, each time the computer sleeps and wakes up, the license stops working. The procedure is to restart it via the following terminal command:

sudo launchctl unload /System/Library/LaunchDaemons/com.lumerical.flexlm.plist; sudo launchctl load /System/Library/LaunchDaemons/com.lumerical.flexlm.plist

I usually keep a Terminal window open for this purpose.

I was curious whether I could automate this process. I found a utility that does this. Now, when my computer wakes up, it speaks to me “Restarting Lumerical license server … done”. Here is the procedure (requires familiarity with the command line):

  1. Install SleepWatcher, following the instructions in the ReadMe.rtf file - http://www.bernhard-baehr.de

  2. I installed it in the system-wide configuration, so that it runs as root. Modify /etc/rc.wakeup to execute the .wakeup script as user root (since Lumerical’s license sever requires this):

source “$home/.wakeup”

su - $user -c “$home/.wakeup”

  1. create a .wakeup script in your home directory, and make sure it is executable (chmod a+x .wakeup):

say restarting lumerical license server.
sudo launchctl unload /System/Library/LaunchDaemons/com.lumerical.flexlm.plist;
sudo launchctl load /System/Library/LaunchDaemons/com.lumerical.flexlm.plist
say done


#2

That’s a clever trick! :grinning:

For anyone running the Flex License Manager version 1.6.700 or newer, the path to stop/start the license manager has changed. This change was required to support the El Capitan version of OSX. The new path is
/Library/LaunchDaemons/com.lumerical.flexlm.plist

Therefore, the wake up script provided by Lukas in step 3 above should now be:
say restarting lumerical license server.
sudo launchctl kickstart -k system/com.lumerical.flexlm
say done


#3

Hi Chris,

This doesn’t seem to work for me anymore. I’m running the May 23rd release of the Lumerical tools and the updated FlexLM, on 10.11.3.

After restarting the license server, it shows up as having 0 licenses.


Zero licenses after restarting the license server
#5

An alternate solution to this problem (the need to restart the Flex license manager each time the computer sleeps) is to switch from a Floating license to a Node-locked license. Node-locked licenses will work properly with the sleep function of a laptop.

Node locked licenses were first introduced about 6 months ago, in the 2015b product release. For customers experiencing this problem, we can convert your license from Floating to Node-locked. Contact us at install@lumerical.com to request the change.

Notes:

  • Node-locked licenses can not be accessed from other computers.
  • Switching to a node-locked license only makes sense if you have a single license (per product).
  • See the license models page for more details. In particular, compare the Trusted Storage version of the Node-locked and Floating license models.