[RLM] [Windows] Putting the SolidAngle debug log into append mode


I like the log to be in append mode so it isn’t overwritten every time the license server restarts. This is especially handy for troubleshooting license server problems (otherwise, you lose information that might explain the problem when you restart the server).

You’ll need to Run as administrator when you open a command prompt for this.

First, add a plus sign (+) to the log file name (you can use sc qc to query the config and get the current binPath, or you could just look it up in the Services console).

sc config "RLM SolidAngle" binPath= "C:\Program Files\RLM\rlm.exe -dlog \"+C:\Program Files\RLM\solidangle.log\" -service"
[SC] ChangeServiceConfig SUCCESS

Then restart the service. You could also do this in the Services console.

C:\Windows\system32>sc stop "RLM SolidAngle"

SERVICE_NAME: RLM SolidAngle
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

C:\Windows\system32>sc start "RLM SolidAngle"

SERVICE_NAME: RLM SolidAngle
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 2  START_PENDING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x1388
        PID                : 9008
        FLAGS              :

And finally, check that it really started:

C:\Windows\system32>sc query “RLM SolidAngle”

SERVICE_NAME: RLM SolidAngle
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

[rlm] The curious case of the missing log entries


In this case, I got a debug log from a customer, but there weren’t any rlm entries in the log. As I’ve mentioned before, the Arnold log can include entries for licensing. At the Warning + Info level, you’ll get [rlm] log entries like these, if something goes wrong:

00:00:10   444MB WARNING | [rlm] could not connect to any license server

or

00:00:00   444MB WARNING | [rlm] wrong license version for arnold 20140305, found licenses for:
00:00:00   444MB WARNING | [rlm] arnold 20140206 (20 licenses)
00:00:00   444MB WARNING | [rlm] arnold 20140206 (20 licenses)
00:00:00   444MB WARNING | [rlm] please contact licensing@solidangle.com

or

00:00:03   749MB WARNING | [rlm] error checking out license for arnold (version 20140113):
00:00:03   749MB WARNING | [rlm]  * Communications error with license server (-17)
00:00:03   749MB WARNING | [rlm]  * Connection refused at server (-111)

And if you move the verbosity level up to Debug, then you’ll get some information about where Arnold is trying to get a license:

00:00:00   444MB         | [rlm] checking connection to license servers ...
00:00:05   444MB         | [rlm]  5055@LICSERVER1 ... DOWN
00:00:10   444MB         | [rlm]  5053@localhost ... DOWN

So why didn’t the customer’s log show any rlm entries? He was getting watermarks, so something must be wrong, right? Well, something was wrong: Skip License Check was enabled in the Render Settings.

No rlm log entries = Skip License Check

[MacOSX] Setting up RLM to always start automatically


If you want the RLM license server to automatically start everytime you restart or turn on your Mac, you need to create a launch daemon. Don’t worry, it’s not as scary as it sounds 🙂

First, you need create a launchd property list (.plist) for RLM. It will look something like this:

<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
        <key>Label</key>
        <string>com.solidangle.rlm</string>
        <key>ProgramArguments</key>
        <array>
        <string>/PATH/TO/RLM/rlm</string>
        <string>-c</string> <string>/PATH/TO/RLM/arnold.lic</string>
        <string>-dlog</string> <string>/PATH/TO/RLM/solidangle.dlog</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
 </dict>
 </plist>

This plist file basically tells the system to start rlm with the -c and -dlog flags, like this:

/Users/stblair/solidangle/RLM/rlm -c /Users/stblair/solidangle/RLM/rlm/arnold.lic -dlog /Users/stblair/solidangle/RLM/rlm/solidangle.dlog

The -c flag isn’t necessary if the license file is in the same folder as the RLM binary executable.

Here’s an example com.solidangle.rlm.plist. Download it, and use TextEdit to change the paths to match the RLM location on your computer, and then save the RLM plist file in /Library/LaunchDaemons/. Note that this download plist assumes that the license file is in the same folder, and therefore omits the -c flag.

For example:

sudo cp com.solidangle.rlm.plist /Library/LaunchDaemons

Note: The plist file needs to be owned by root, otherwise you won’t be able to load the plist. If necessary, you can change the owner like this:
sudo chown root /Library/LaunchDaemon/com.solidangle.rlm.plist

Finally, you need to load the plist:

sudo launchctl load -w /Library/LaunchDaemon/com.solidangle.rlm.plist

The license server will now automatically start, even after a restart or power down of the machine.

You can check the license server by opening a Web browser and going to localhost:5054.

[SItoA] Doing a license check in Softimage


Setting up the environment right is what often goes wrong. Running kick -licensecheck from inside Softimage is a quick way to check that you set up the environment variables correctly.

Here’s two lines of Python that will open a command prompt and run kick -licensecheck (on Windows).

#Python
from subprocess import Popen
Popen(["cmd", "/K", XSIUtils.BuildPath( Application.Plugins('Arnold Render').OriginPath, 'kick.exe' ), "-licensecheck"])

Here’s the same thing, but broken down a bit for legibility:

#Python
si = Application

p = si.Plugins('Arnold Render')
sKick = XSIUtils.BuildPath( p.OriginPath, 'kick.exe' )

from subprocess import Popen
Popen(["cmd", "/K", sKick, "-licensecheck"])

[MtoA] Doing a license check in Maya


If you’re doing technical support like me, you gotta love things like kick -licensecheck. I wish we’d had something like this at Softimage. This license check will tell you:

  • Whether you can connect to a license server
  • What licenses are available
  • What are the licensing environment variable settings

licensecheck

In this example, I’m running Maya and the license server on the same computer. That’s why none of the environment variables are set, but the licensecheck still shows that there’s a license available. By default, Arnold will connect to 5053@localhost to get a license.

The case of the license server that wasn’t releasing licenses


In this case, a customer reported that the license server wasn’t releasing licenses when a render node crashed.

Why did this happen? Because the customer had an older version of the license server that didn’t have a license TIMEOUT.

Since early 2012, the Solid Angle license server ships with a default TIMEOUT of 120 seconds. That means if a workstation stops sending heartbeats to the license server, then after two minutes the license server takes back the license. So, for example, if a workstation crashes or disconnects from the network, then the license server will take back the license after a couple of minutes.

The TIMEOUT is specified in a solidangle.opt file located in the RLM folder, along with rlm.exe and solidangle.set. Newer versions of the Solid Angle license server ship with this options file, but if you don’t have it, you can either upgrade your RLM or create the file yourself. Here’s what it should look like:

TIMEOUT 120 arnold

You’ll need to restart the server to read the new options.

What are heartbeats? Heartbeats are messages sent from a licensed application to the license server while the application has one or more licenses checked out from the server. You can see them with Process Monitor. In this screenshot, you can see that XSI.exe is sending a heartbeat every one minute to the license server.
heartbeats

If you need to free a checked out license, you can “remove” it (that’s RLM-speak for taking back a checked out license).

To remove a license in rlm admin (localhost:5054):

  • Click Status.
    Status
  • Under Server Status, click solidangle.
    ServerStatus
  • Under Show License Usage, click Usage.
    ShowLicenseUsage
  • Click Remove.
    LicenseUsage-Remove