The case of the hrender that failed to start AdskLicensingAgent


Or, “things that happen when you use single-user licensing on a render node” 😉

In this case, a Houdini command-line render with Arnold (HtoA) failed because the AdskLicensingAgent failed to start.

---------------------------
AdskLicensingAgent
---------------------------
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: minimal, offscreen, webgl, windows.

---------------------------
OK  
---------------------------

After AdskLicensingAgent crashed, the render would continue, but license authorization would fail:

00:00:00   148MB         | authorizing with license manager: user ...
00:00:31   153MB WARNING | rendering with watermarks because of failed authorization:
00:00:31   153MB         |  [clm.v2] timeout before callback was called

Using Process Monitor, I saw (as expected) that the problem was that the AdskLicensingAgent was loading Qt platform plugins from Houdini:

The solution? Set QT_QPA_PLATFORM_PLUGIN_PATH to point to the AdskLicensingAgent\platforms folder.

set QT_QPA_PLATFORM_PLUGIN_PATH=C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\AdskLicensingAgent\platforms

error: (44) Product key not found


If you get this error, it means that Arnold is not registered in the Autodesk product information file.

With Arnold 5.3 and later, you use the AdskLicensingInstHelper tool (all Autodesk software now uses AdskLicensingInstHelper). The pitreg utility was removed in Arnold 5.3

Note AdskLicensingInstHelper requires that the Autodesk Licensing Service is installed and running on the machine.

For example:

sudo /opt/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper register --pk C0PL1 --pv 2020.0.0.F --lm NETWORK -cf /opt/Autodesk/arnold/maya2019-4.2.0/license/ArnoldConfig.pit

or

"C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe" register --pk C0PN1 --pv 2022.0.0.F --lm NETWORK --cf "C:\Program Files\Autodesk\Arnold\maya2022-5.0.0.2\license\ArnoldConfig.pit"

In addition to registering Arnold in the global ProductInformation.pit file used by all Autodesk products, AdskLicensingInstHelper also registers Arnold with the Autodesk licensing service (that’s for single-user licensing).

The ProductInformation.pit file is located here:

  • /var/opt/Autodesk/Adlm/.config/ProductInformation.pit
  • C:\ProgramData\Autodesk\Adlm\ProductInformation.pit
  • /Library/Application Support/Autodesk/Adlm/.config/ProductInformation.pit

Here’s the help for the register command:

C:\Users\blairs>"C:\Program Files (x86)\Common Files\Autodesk Shared\AdskLicensing\Current\helper\AdskLicensingInstHelper.exe" -help register
NAME:
   AdskLicensingInstHelper - Manage products registration with Autodesk Licensing

USAGE:
   AdskLicensingInstHelper.exe [global options] command [command options] [arguments...]

VERSION:
   2.11.0.666

COMMANDS:
     register    Register product with the licensing components. Requires admin rights
     deregister  Deregister product from the licensing components. Requires admin rights
     list        List all products registered with licensing components
     change      Change registered product
     help, h     Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --verbose, -d  [O] Output verbose log
   --help, -h     show help
   --version, -v  print the version

Failed to register Arnold product


When you click Register in the Arnold License Manager, it runs the Autodesk tool AdskLicensingInstHelper. All Autodesk products use this tool to register themselves with Autodesk licensing.

Check the License Manager log

If you get Failed to register Arnold product, check the Arnold License Manager log.

On macOS:

  1. Open the Arnold License Manager.
  2. In the menu bar, click Arnold License Manager > About Arnold License Manager.
  3. In the About dialog box, click Show Log.
  4. Click Copy to copy the log, and send it to Autodesk licensing support.

On Windows:

  1. In the Arnold License Manager, click Help > About.
  2. Click Copy to copy the log.

If you want to try and troubleshoot the problem yourself, find the line that runs the AdskLicensingInstHelper register command. It will look something like this:

2021-11-08 11:13:10 DEBUG | [clmv2] run: "/Library/Application Support/Autodesk/AdskLicensing/Current/helper/AdskLicensingInstHelper" register --prod_key C0PL1 --prod_ver 2020.0.0.F --config_file /Applications/Autodesk/Arnold/mtoa/2022/license/pit/ArnoldConfig.pit --lic_method USER --eula_locale en_US

Under that line, there will be some log messages describing why the command failed.

Reinstall the licensing

In some cases, a complete uninstall and then re-install of “single-user licensing” can fix the problem.

In a Terminal, run these commands:

   cd ~/Autodesk/LicensingInstaller
   sudo ./uninstall.sh

sudo will ask you to type your password. Press ENTER after you finish typing.

Then start the Arnold License Manager and switch to Single-user licensing. The license manager will ask if you want to install single-user licensing.

Arnold 7 uses Arnold 2022 licensing


Arnold 7 is a new licensing version: Arnold 2022

(Arnold 6 was Arnold 2020, and Arnold 5 was Arnold 2018)

What does this mean for you?

  • If you have network licenses, the contract manager has to go to manage.autodesk.com and generate a new network license.
  • If you have single-user licenses, open the Arnold License Manager and check that Arnold 2022 is registered on your machine. Most, but not all, of the plugin installers will register Arnold.

The case of Maya and the missing ProductInformation.pit file


One of the strange thing about supporting Arnold at Autodesk is that you have to be a guru-level licensing expert on Autodesk licensing (not RLM, but Autodesk licensing).

In this case, Maya 2019 would silently fail at startup. Sometimes you’d see the splash screen, but then that would just disappear.

  • There was nothing in the Adlm.log
  • No MayaAdlm log was created
  • The MayaCLM log had only this:
    ERROR: checkoutLicense: Failed to authorize license
  • The clm log did have this:
    JsProductLicenseFact.loadSelectedProductInfoKey - Unable to get selected product key due to unknown problem.

TIP All these log files are in the Temp folder.

  • On Windows, look in %LOCALAPPDATA%\Autodesk\Logs
  • On OSX, look in $TMPDIR
  • On Linux, look in /var/tmp

Process Monitor confirmed that the ProductInformation.pit file was missing:

ProductInformation.pit is an all-important file used by the licensing infrastructure. Every Autodesk product must be registered in that pit file.

If ProductInformation.pit is missing, or corrupted, then everything stops working.

Tracking down the “error initialzing CLM (9)”


It’s not rocket science, but here’s a little application of the scientific method to technical support.

Observation

The Autodesk licensing system loads AdlmIntRes.xml

I used dtruss on macOS and Process Monitor on Windows to see what files are accessed by the licensing system. (On Linux, I would use strace)

On Windows, the file %LOCALAPPDATA%\Autodesk\Logs\AdlmIntRes.xml is loaded.

procmon_adlmintres

On macOS: $TMPVAR/AdlmIntRes.xml:

56944/0x16208b8:  stat64("/var/folders/vb/1d7zhsx97q7_ddz43nccbyj00000gn/T//AdlmIntRes.xml\0", 0x7FFF55D22F00, 0x0) = 0 0
56944/0x16208b8:  stat64("/var/folders/vb/1d7zhsx97q7_ddz43nccbyj00000gn/T//AdlmIntRes.xml\0", 0x7FFF55D22F30, 0x0) = 0 0
56944/0x16208b8:  open_nocancel("/var/folders/vb/1d7zhsx97q7_ddz43nccbyj00000gn/T//AdlmIntRes.xml\0", 0x0, 0x1B6) = 37 0

On Linux: /var/tmp/AdlmIntRes.xml

Hypothesis

Autodesk licensing will fail if there’s a problem with AdlmIntRes.xml

Testing

  • Delete AdlmIntRes.xml
    No problem. The file is recreated
  • Delete the contents of AdlmIntRes.xml and save the file.
    License authorization fails with the error [clm] error initialzing CLM (9)

[clm] product key not found (44)


The Problem

To use Autodesk licenses for Arnold when you batch render with Maya, Arnold must be registered in the Product Information file (aka the PIT file).

Normally the MtoA installer does this for you. But if you’re running Maya and MtoA from a network install, then Arnold won’t be registered in the PIT file, and you’ll see this in the Arnold log:

00:00:00 381MB WARNING | rendering with watermarks because of failed authorization:
00:00:00 381MB | [rlm] error initializing license system:
00:00:00 381MB | [rlm] * Can't read license data (-102)
00:00:00 381MB | [clm] product key not found (44)

and you’d see something like this in the Adlm.log:

337296 2017/11/03 12:29:54 Reason=Fatal error
337296 2017/11/03 12:29:54 ComputerName=WORKSTATION
337296 2017/11/03 12:29:54 OS=6.1.7601.Service Pack 1
337296 2017/11/03 12:29:54 File=AdlmIntLicense.cpp,Line=594
337296 2017/11/03 12:29:54 VendorID=6 [ADLMPIT]
337296 2017/11/03 12:29:54 VendorError=12 [The root information in Product Information Table XML file is missing]
337296 2017/11/03 12:29:54 Reason=Fatal error
337296 2017/11/03 12:29:54 ComputerName=WORKSTATION
337296 2017/11/03 12:29:54 OS=6.1.7601.Service Pack 1
337296 2017/11/03 12:29:54 File=AdlmIntLicense.cpp,Line=595
337296 2017/11/03 12:29:54 AdlmIntError=25 [The product key was not found]

Solution

MtoA includes pit/pitreg for registering Arnold in the PIT file, so you just need to run pitreg on the local machine, like this:

C:\solidangle\mtoadeploy\2017\pit\pitreg.exe
Succesfully added Arnold information to PIT file

Don’t do this:

cd C:\solidangle\mtoadeploy\2017\pit\
pitreg.exe

because you’ll get this error:

Failed to add Arnold information to PIT file (Error 26)

 

[RLM] Communications error with license server (­17)


These warnings mean that Arnold can connect to the RLM license server, but Arnold cannot connect to the solidangle ISV server:

00:00:12 14MB WARNING | [rlm] * Communications error with license server (­17)
00:00:12 14MB WARNING | [rlm] * Connection refused at server (­111)

Usually the problem is that the solidangle ISV server is not running.

You can check the status of the solidangle ISV server with RLM Web Admin. I like the get the RLM diagnostics (Diagnostics > Run Diagnostics) from RLM Web Admin and review that.

In rare cases, the problem is something else, such as:

  • Some sort of network connection problem. For example, I recently had a case where we would get these warnings when we used the IP address of the license server in solidangle_LICENSE. But as soon as we switched to using the hostname, everything worked.
  • Another RLM instance is running and listening to port 5053, and that instance doesn’t have a solidangle ISV running. I heard about this second-hand, from a customer; I didn’t see it with my own eyes and I don’t know how it’s possible. You can have multiple RLM instances running, but each instance has to have a different port otherwise you get ” “Port 5053 in use, waiting…” messages and the second RLM won’t start.

[RLM] Reserving licenses


Reserving licenses is an RLM feature and is documented in the RLM User Guide (see “The ISV Options File” section).

You use the RESERVE keyword in the ISV options file (solidangle.opt) to reserve licenses for specific users, machine names, or IP addresses.

For example, this reserves 2 licenses for machines with the specified IP addresses:

INTERNET_GROUP renderfarm 192.168.221.1 192.168.223.1 
RESERVE 2 arnold group renderfarm 

This reserves five licenses for named users:

GROUP myusergroup steve stephen steven stevie stevo
RESERVE 5 arnold group myusergroup 

You can edit the ISV options in the RLM Web Admin page. You need to restart the ISV server after you change the options. Here’s a short video walkthrough (no audio).