techblog autodesk licenceserver

Autodesk Network License Manager is used for multi-user licenses for Autodesk products such as Flame, Maya and Arnold.

When installed on macOS X, the default behaviour of the license manager is that it does not start automatically on boot. This is most likely undesirable.

Searching the Autodesk Knowledge Base reveals 2 methods. Method #1 only works for OS X 10.10 (Yosemite) and earlier. Method #2 adds a .profile that is run whenever terminal open. This works, but not very elegant, especially if you use terminal a lot.

The following launchd method works with Sierra and High Sierra.

  1. Download and install the latest version of NLM for OS X from Autodesk Network License Manager for Mac OS X.
  2. Download the attached file adsknlm.tar.gz
  3. Double-click file to extract.
  4. Open terminal and cd to the extracted files.

cd ~/Downloads/adsknlm

  1. Run the install script

sudo ./INSTALL

  1. Copy your license into /usr/local/flexnetserver/adsk_server.lic
  2. Reboot and test

To test, you can use the following command

/usr/local/flexnetserver/lmutil lmstat -a

If it has not started, check /usr/local/flexnetserver/adsk_server.log

Notes on INSTALL script

The /usr/local/flexnetserver directory is installed with the following permissions

drwx------   6 root      wheel   192 17 Sep 16:32 flexnetserver

The script opens up permissions on this directory so that users other than root can r/w, which is required to copy the license file into this directory.

The following launchd plist file is copied to /Library/LaunchDaemons/com.adsknlm.plist


  
	<plist version="1.0">
	    <dict>
	      <key>Label</key>
	      <string>com.adsknlm</string>
	      <key>ProgramArguments</key>
	      <array>
	          <string>/usr/local/flexnetserver/lmgrd</string>
	          <string>-z</string>
	          <string>-c</string>
	          <string>/usr/local/flexnetserver/adsk_server.lic</string>
	          <string>-l</string>
	          <string>/usr/local/flexnetserver/adsk_server.log</string>
	      </array>
	      <key>UserName</key>
	      <string>flexlm</string>
	      <key>GroupName</key>
	      <string>flexlm</string>
	      <key>RunAtLoad</key>
	      <true/>
	    </dict>
  </plist>
  

Looking at this plist, the following command is run -

/usr/local/flexnetserver/lmgrd -z -c /usr/local/flexnetserver/adsk_server.lic -l
/usr/local/flexnetserver/adsk_server.log

The -z is very important for this to work. To work with launchd, lmgrd needs to run in the foreground instead of a background process by default.

The command is run as user flexlm. Without the UserName key, the license server will run as root which is not recommended.

The INSTALL script automatically creates the flexlm user and group (if they don’t already exist).

How To Revert Changes


	
sudo launchctl unload -w /Library/LaunchDaemon/com.adsknlm.plist
sudo rm /Library/LaunchDaemon/com.adsknlm.plist
sudo dscl . delete /Users/flexlm
sudo dscl . delete /Groups/flexlm
	 

If you need more help in installing and configuring your Autodesk applications Digistor's Tech Services Team can help. Contact us to find out more.