License server environment variable

   15963   8   2
User Avatar
Member
56 posts
Joined: 4月 2007
Offline
Hey,

I know this topic was covered before but I found so much contradicting information, that I got to ask.

How is one pointing clients to the license server in a scripted environment (on Windows)? I remember using the SESI_LMHOST (or similar, tried SESI_LM_HOST, SESI_LMPATH, SESI_LM_PATH) variable on Linux couple of years ago, worked great. Is there such a variable now?

Also, I've found mentions of hkey.prefs which does get generated but I didn' see a license server in there. Is there a syntax description somewhere? Also, where should it live?

If I specify the license server using the hkey utility manually, i can point the renderfarm nodes to the server but I would rather not do that Also, where is the result of hkey getting stored?

Thanks..and sorry if it's RTFM or RTFForum, please point me to those

cheers
Andras
User Avatar
Member
4271 posts
Joined: 7月 2005
Offline
On Linux it is $HOME/.sesi_licenses.pref

On windows it might be something like \Windows\system32\sesi_licenses.pref
if(coffees<2,round(float),float)
User Avatar
Member
56 posts
Joined: 4月 2007
Offline
Thanks Wolfwood,

Unfortunately I didn't manage to find such file on my computer (or on the Houdini network installation), so I'm a bit clueless

Can you please cat the content here, so that I can try to drop it on various locations, to see if it picks up?

thanks,
Andras
User Avatar
Member
7899 posts
Joined: 7月 2005
Offline
The easiest way is to run the License Administrator on Windows (aka hkey). File > Change License Server. That will work on all platforms. Or on the command line, use “hserver -S”.

On Windows, it differs from Linux in that it uses the registry since hserver is a service and so it doesn't have access to environment variables. You can see that the information is stored there by looking up in the registry, HKEY_LOCAL_MACHINE\SOFTWARE\Side Effects Software\Houdini\LicenseServer
User Avatar
Member
56 posts
Joined: 4月 2007
Offline
edward
The easiest way is to run the License Administrator on Windows (aka hkey). File > Change License Server. That will work on all platforms. Or on the command line, use “hserver -S”.

Thanks Edward, the -S switch was the key. I knew it's RTFM

On Windows, it differs from Linux in that it uses the registry since hserver is a service

Yep..well. I didn't install the service, I'm running it using Hservice (as you might remember the other thread) so I was thinking I could initialize that in the parent shell and the service would inherit.

I'm just glad I don't need to rely on any kind of registry for this

Btw..once Mantra goes multithreaded, do we still need to rely on Hserver? It feels a bit wonky (I know it's necessary now to handle multiple mantra threads..but the framebuffer could do that as well, like in the case of prman).

Thanks again,
Andras
User Avatar
Member
56 posts
Joined: 4月 2007
Offline
Ok, next problem I don't seem to be able to use the -S flag with hservice.
I'm using the following workflow:

All the machines have a drive mapped that stores the applications. When they startup, they run a series of batch files setting up variables then initializing hserver (note the UNC paths that actually turned out to be a path translation problem with hservice.

So first I kill hserver instances left behind:

\\calimero\skynet\applications\houdini\services\hservice -qu HoudiniServer

Then launch a new instance (this is one line of code):


\\calimero\skynet\applications\houdini\services\hservice -i HoudiniServer \\calimero\skynet\applications\houdini\services\hserver.exe -s HoudiniServer


This is where I would have to specify the -S flag, but hservice doesn't take multiple arguments (if i try to pass it as a string it freaks out).

Any ideas? Isn't this possible to store in hserver.ini?

(Also, looks like whatever I set as a license server there is only valid for the given hserver session..is that normal? It's quite strange cause it does change the registry key…i might just overlooked something)

That registry key is probably the last thing I want to rely on.

Thanks,
Andras

ps: I know I'm on unix land, but it's a given
User Avatar
Member
56 posts
Joined: 4月 2007
Offline
Ok, it's fixed..added an additional line calling hserver to set the -S flag thus changing the registry key.

I figured out that initially it was not “remembering” the license server as on the first try there is no running hserver instance, so it can't change the license server.

So the theoretical workflow (just for the log):

1, start hserver as a a service
2, edit the license server once
3, kill hserver
4, startup hserver normally

1-3 only need to happen when license server changes or it's a clean renderbox.

Btw..would it be possible to make an environment variable available? Would result in a cleaner workflow (and I can see others having issues with this)?

Thanks
Andras
User Avatar
Member
299 posts
Joined: 1月 2010
Offline
Bump a bunch of years later. Is there really no easy way of switching license server before launch? We have different license servers for farm jobs and artists working and it's hard to make it switch correctly
Drive, monkey, drive!
User Avatar
スタッフ
178 posts
Joined: 10月 2018
Offline
I would suggest taking a look at license partitioning [www.sidefx.com] instead of using multiple servers.

If you still want to use multiple servers you could use license server chaining.

Cheers,
Matt Warner
Software Developer - Licensing
SideFX
  • Quick Links