Wednesday, October 10, 2012

All about FlexNet License Borrowing

Some FlexNet/FLEXlm enabled products support license borrowing. Some of the below apply only to Autodesk products but most applies to other FlexEnabled applications too.

What is License Borrowing?

License Borrowing allows users to borrow a product license from the network license server to use the product for a specified time even if the computer is not connected to the network. When a license is borrowed, one license less is available for other users. The license is automatically returned to the license server at the end of the day on the return date set when the license was borrowed. The user can return a license early but that must be done when connected to the network license server and be done from the same user and computer that initially borrowed the license. A borrowed license cannot be returned earlier from the license server. The maximum borrowing period can be different from software to software but can be limited by editing the options file.

Most network licensed Autodesk products allow you to use the software while temporarily disconnected from your company's network, such as when you are on business trip or working at a remote location. Unless 6 months are needed set as low limit as possible to avoid licenses from being orphaned, something that can happen if a laptop is stolen during a trip.

Because network licenses are more expensive than single licenses make sure users don’t borrow licenses just to be sure they have a license all the time. Make sure users return the borrowed license as soon as they don’t need it any more. JTB FlexReport has reports that helps to identify users that are borrowing licenses while still connected to the network.

Autodesk product licenses do not support the Borrowing tab in LMTOOLS. This tab exists to support other products that use FlexNet.

You can upgrade FlexNet even if licenses are borrowed. It is possible to release licenses early to the updated FlexNet server.

How to can I Borrow a License?

In AutoCAD it is found in the Tools menu > License Borrowing > Borrow License but for some other products it is hidden in Help>About>Product Information dialog box and then you can select License borrow.

BORROWLICENSE command is another option that can be used in for example AutoCAD.

For non-Autodesk products to initiate borrowing, the end user of the FlexEnabled application sets the borrow period by running lmborrow from the command line or through lmtools on the FlexEnabled client machine. It is also possible to set the LM_BORROW environment variable directly.

When does the Borrowed License Expire?

If you don't remember when a license expires, you can check the date by placing your cursor over the Borrowing icon in your Autodesk product's status tray (does not work in all products) or by clicking Help > About and consulting the Product License Information dialog box. When the borrowing period expires, the borrowed license is automatically returned to the license server at the end of the day on the return date you set when you borrow the license. When your computer is reconnected to the network, you can run your Autodesk product from the network or borrow a license again. See also below under “How to Find out what Users are Borrowing a License?”.

For non-Autodesk products end users can issue the following commands to display the status of licenses (vendor, feature name, and expiration date) currently borrowed by their FlexEnabled application. From the FlexEnabled client machine, enter the following command: lmborrow -status

How can a License be Returned Early?

Borrowed licenses can only be returned early from within the application that they were borrowed and when connected to the network license server. Borrowed licenses cannot be returned early from LMTOOLS for Autodesk licenses.

Access to the command varies by product, and includes one or more of the following options:
■ Click Tools menu ➤ License Borrowing ➤ Return License Early.
■ Click Help menu ➤ About ➤ Product Information or Product License Information. In the Product License Information dialog box, click Return License, and then click Yes.
■ In the status tray, right-click the License Borrowing icon. Click Return License Early.

RETURNLICENSE command is another option that can be used in for example AutoCAD.

For non-Autodesk products end users of the FlexEnabled application return a borrowed license early this way:
1. Reconnect the FlexEnabled client to the network.
2. From the FlexEnabled client machine, issue the following command:
lmborrow -return [-fqdn][-c license_file_list] [-d display] feature

argument -fqdn: Directs lmborrow to access the borrowing system using its fully qualified host name.Use this option if the license was borrowed based on the fully qualified host name,rather than the relative distinguished name. Use lmstat to determine the format of the host name used when the license was borrowed.

argument -c license_file_list: Use the specified license files. In some configurations, the license file needs to be specified in order to return the license file early.

argument -d display: Used to specify the display from which the borrow was initiated. Required if your current display is different than what was used to initiate the borrow.
On Windows, it is the system name or, in the case of a terminal server environment, the
terminal server client name. On UNIX, it is in the form /dev/ttyxx or the X-Display name.

argument feature: The name of the borrowed feature to be returned early. Use lmborrow -status to get a list of borrowed feature names.

End users can clear the LM_BORROW setting to stop licenses from being borrowed until borrowing is initiated again. For example, users might run lmborrow -clear after they have borrowed licenses for features that are used offline if—before disconnecting from the network—they want to run an application that checks out additional features, served by that vendor name, that are not meant to be borrowed. Clearing LM_BORROW does not change the status for already borrowed licenses. End users can remove expired borrowed licenses from their FlexEnabled client machine using lmborrow -purge.

How is Borrowing Defined in the License File?

In the license file below the INCREMENT line there can be a BORROW parameter. If it says BORROW=4320, the maximum period that licenses can be borrowed is 4320 hours (180 days), unless otherwise noted. The default borrow period is 168 hours, or one
week.License borrowing is disabled when this parameter is absent in the license file. Example:
INCREMENT 57600ACD_2009_0F adskflex 1.000 permanent 5 \
    VENDOR_STRING=commercial:permanent BORROW=4320 SUPERSEDE \

How to Find out what Users are Borrowing a License?

LMTOOLS>Server Status or the LMSTAT argument of LMUTIL can be used to perform a status enquiry that will show if a license is borrowed. Linger is a value that indicates the original borrow period in seconds. To convert value to days, divide the linger value by 86400.

Row showing a borrowed license:
    jtb PC-HP PC-HP (v1.0) (PC-HP/27000 101), start Sat 11/5 12:36 (linger: 40980)

Normally it can be calculated when the borrowed license expires by using the start date (checked out date and time) and the linger value but if the license server or service is restarted the start date will change and thus give an incorrect expire date.

In newer versions of FlexNet the row can show like this with two linger values:
    jtb PC-HP PC-HP (v1.0) (PC-HP/27000 101), start Sat 11/5 12:36 (linger: 3057 / 40980)
The first linger value is the seconds remaining and the second linger value is the total borrowing time in seconds. The bug or problem with stopping and starting the license service remains though.

JTB FlexReport and the freeware JTB FlexReport LT comes with a HTML report that will show the information like this:
License server status: 27000@server1
AutoCAD 2013: 21 licenses  16 in use.
user6@c1547 Checked out license at 2012-04-26 21:24 Hours used: 36:01 * (Borrowed until 2012-10-27 06:25)

Configure License Borrowing with the Options File

AutoCAD 2004 and AutoCAD 2005 maximum borrowing period is 720 hours (30 days).

AutoCAD 2006 up to AutoCAD 2012 maximum borrowing period is 4320 hours (180 days).

The absolute maximum borrowing period is determined by the BORROW=statement in the license file increment for the product. This cannot be amended.

If the license file has a package increment use both Product and Package feature codes.

Limiting borrowing

You can specify a number of specific licenses that cannot be borrowed.

BORROW_LOWWATER [productfeature] [count]

The following example blocks license borrowing for 5 AutoCAD 2012 licenses:
BORROW_LOWWATER 85730ACD_2012_0F 5

Limit borrow period

You can specify the maximum duration of time that a specific license can be borrowed for in hours. This value cannot be above the maximum borrow period specified by Autodesk in the product license file. Note! Licenses are borrowed in increments of 24 hours only. Any number that is more than a 24-hour increment is not used. For example, the number 365 would be rounded down to 360 hours, or 15 days.

MAX_BORROW_HOURS [productfeature] [hours]

The following example limits license borrowing of AutoCAD 2012 licenses to 3 days:
MAX_BORROW_HOURS 85730ACD_2012_0F 72

Excluding license borrowing

You can block the ability to borrow specific licenses for a user, computer, group of users or computers, IP address, IP address range or by LM_PROJECT variable association (computer names and user names are case sensitive). Any users, hosts or IP addresses not explicitly excluded will continue to have the ability to borrow licenses.

EXCLUDE_BORROW [productfeature] [type] [name]

The following examples block borrowing of AutoCAD 2012 licenses for a variety of types:
EXCLUDE_BORROW 85730ACD_2012_0F USER smithj
EXCLUDE_BORROW 85730ACD_2012_0F HOST computer1
EXCLUDE_BORROW 85730ACD_2012_0F GROUP EngineeringGroup
EXCLUDE_BORROW 85730ACD_2012_0F HOST_GROUP DraftingDept
EXCLUDE_BORROW 85730ACD_2012_0F INTERNET 192.168.0.100
EXCLUDE_BORROW 85730ACD_2012_0F INTERNET 192.168.0.*
EXCLUDE_BORROW 85730ACD_2012_0F PROJECT CivilProject

Including license borrowing

You can provide the ability to borrow specific licenses for a user, computer, group of users or computers, IP address, IP address range or by LM_PROJECT variable association (computer names and user names are case sensitive).

Note: Any users, hosts or IP addresses not explicitly included will not have the ability to borrow the specified licenses. If you want to block license borrowing for only a few users, you should consider using the EXCLUDE_BORROW syntax above.

INCLUDE_BORROW [productfeature] [type] [name]

The following examples allow borrowing of AutoCAD 2012 licenses for the specified type only:
INCLUDE_BORROW 85730ACD_2012_0F USER smithj
INCLUDE_BORROW 85730ACD_2012_0F HOST computer1
INCLUDE_BORROW 85730ACD_2012_0F GROUP EngineeringGroup
INCLUDE_BORROW 85730ACD_2012_0F HOST_GROUP DraftingDept
INCLUDE_BORROW 85730ACD_2012_0F INTERNET 192.168.0.100
INCLUDE_BORROW 85730ACD_2012_0F INTERNET 192.168.0.*
INCLUDE_BORROW 85730ACD_2012_0F PROJECT CivilProject

What Autodesk says about Interaction with Other License-Borrowing Tools

Using the license-borrowing feature in your Autodesk product is the recommended way to borrow a license. Some third-party borrowing tools may also be available to you, but these tools are not supported or compatible with the license-borrowing feature in your Autodesk product. Other third-party or legacy license-borrowing tools that may be available to you are the Autodesk License-Borrowing utility (shipped with Autodesk products) and the borrowing feature in LMTOOLS utility, a component of the Autodesk Network License Manager on Windows servers. If another license-borrowing tool is active when you attempt to use the license borrowing feature, you should proceed as follows to borrow a license for your Autodesk product:
■ If you run the Autodesk License-Borrowing utility that shipped with your Autodesk product and then turn on the borrowing flag for the Adskflex option or the All option, a license can be borrowed when you start your Autodesk product. However, you cannot return a license until you exit and then restart your Autodesk product.
■ On a Windows server, if borrowing is set in the LMTOOLS utility for all products, you can either use the other tool to borrow licenses for your Autodesk product, or stop the borrowing process in LMTOOLS utility, and then use the license-borrowing feature in your Autodesk product.
■ If borrowing is set in LMTOOLS utility for non-Autodesk products only, you must stop the borrowing process in LMTOOLS utility. You can then use the license-borrowing feature to borrow licenses for your Autodesk product. If you do not stop the borrowing process in LMTOOLS utility, the license borrowing feature will not function.

lmborrow

For non-Autodesk products the lmborrow utility supports the borrowing of those licenses that contain the BORROW attribute. This utility runs on the FlexEnabled client machine that borrows the licenses. The FlexEnabled application end users can use the utility to do the following:
• Initiate borrowing by setting the borrow period
• Clear the borrow period
• Purge expired licenses
• Determine borrow status
• Return a borrowed license early

Running lmborrow -status can look like below

========
List All Currently Borrowed Features
========
Vendor     Feature                             Expiration
______     ________                            __________

adskflex   85730ACD_2012_0F                    28-Nov-12 23:58

FlexNet debug log

Starting AutoCAD at 13:02:06, borrowing the license at 13:02:15, returning it at 13:02:34 and then closing AutoCAD at 13:02:46 could look like this in the log.

13:02:06 (adskflex) OUT: "85730ACD_2012_0F" jtb@pc 
13:02:15 (adskflex) IN: "85730ACD_2012_0F" jtb@pc
13:02:15 (adskflex) OUT: "85730ACD_2012_0F" jtb@pc
13:02:34 (adskflex) REMOVING jtb@pc:pc from 85730ACD_2012_0F by administrator request.
13:02:34 (adskflex) IN: "85730ACD_2012_0F" jtb@pc  (USER_REMOVED)
13:02:36 (adskflex) OUT: "85730ACD_2012_0F" jtb@pc 
13:02:46 (adskflex) IN: "85730ACD_2012_0F" jtb@pc

While shutting down the license server a row like this can be seen:

14:00:57 (adskflex) BORROWED: 85730ACD_2012_0F jtb/pc/pc exp: 4257 minutes

Problems with network licensing borrowing

You are looking for information about license borrowing or you are experiencing problems with network license borrowing.

Common problems with network license borrowing for AutoCAD-based software are listed below. Try applying these solutions first, and then review further instructions if the problem persists.

  • Unable to run the product after borrowing a license

    You borrowed a license for your Autodesk product. However, when you tried to start the program, you received an error indicating that the license manager could not be found.

    Borrowed network licenses are locked to the workstation machine in a number of ways.

    A borrowed license is stored in the local user profile and is only available to the exact same user that originally borrowed it. Make that your login credentials match those used at the time the license was borrowed. Pay careful attention to the username and login domain to ensure that you are logging in as the same user.

    Note: If the user profile is removed or significantly altered while a license is borrowed, you may lose access to the license for the duration of the borrow period.

    A borrowed license is locked to the network card that was active when the license was borrowed. For example, if a removable (PCMCIA, USB etc) network adapter is used to borrow the license, this device must be present when you run the Autodesk application with that license.

    Note: Some network adapters are disabled by default as part of the power management profile. You should refer to the documentation for your machine and network card for additional information about disabling this feature.

  • Error 1.5.-124 when attempting to return a borrowed license

    When you tried to return a borrowed license from a client workstation, the following error message was displayed:

    License Return Error - Your license cannot be returned. For more information, contact your system administrator. Note: you can still use your borrowed license until (midnight): <Date>. Error: [1.5.-124]

    This error usually indicates that the client and/or license manager have changed in some way since the license was originally borrowed. There is no way to force the early return of a borrowed license. However, the following procedures will often resolve the error.

    Method 1 - Wait out the borrow period

    Depending on how long your license is borrowed and how urgently you need to return it to the network pool, it may be easiest to simply wait out the remainder of the borrow period when the license will be automatically returned. Network administrators might consider implementing an Options file to restrict the maximum borrow period or limit who can borrow licenses so the impact of future borrowing problems can be reduced. Refer to the following solution for details about configuring an Options file. Controlling network license access using an options file.

    Method 2 - Reborrow the license and then return it

    Erase the knowledge of the borrowed license from the client machine, borrow it again, and then try to return it using the procedure below. Note: This procedure resets all borrowed licenses for this user/computer.

    On the client computer, log in as the user who borrowed the license.
    On the Start menu (Windows), click Run (Windows 2000/XP) or Start>Search (Windows Vista).
    Enter regedit, and then click OK.
    In the Registry Editor, navigate to the following registry key:
    HKEY_CURRENT_USER\Software\FLEXlm License Manager\Borrow
    In the Registry Editor, on the File menu, click Export to create a back up of this key.
    Delete this registry key.
    Close the Registry Editor.
    Borrow the license again for the product(s) and version(s) that you could not return.
    Return the license(s) for each product.

  • Forcing the return of a borrowed license

    You borrowed a license and you now want to return it to the server. You were unable to return the license from the client machine. Possible reasons can include:

    Errors when trying to return a borrowed license early
    Deletion or corruption of the user's profile who borrowed the license
    Hard drive failure which renders the operating system inaccessable

    There is no way to force the return of a borrowed license from the FlexLM license manager. Once the borrow period expires the license will be automatically returned to the license server pool.

    Notes: It is strongly recommended that network administrators limit network license borrowing to those users who specifically need to take licenses on the road. It is strongly recommended that administrators set the maximum borrow period to an amount of time that corresponds with how long these users will be away from the license manager. These settings are controlled using an options file. For more information about configuring an options file see the following solution: Controlling network license access using an options file.
    Do not use the Borrowing tab in LMTOOLS with Autodesk product licenses. Doing so can cause additional borrowed licenses to become orphaned from the license manager.

  • Using the Borrowing tab in LMTOOLS
    The Borrowing tab in LMTOOLS is not used with Autodesk products. Using this tab may cause unexpected results (including the potential for lost licenses). The Borrowing tab exists in LMTOOLS to support other vendor's products. While some users have been successful using the Borrow tab in LMTOOLS with Autodesk products, it is not tested or supported and has caused issues for users in the past.
    Borrowed licenses cannot be returned early from LMTOOLS.

If these solutions do not resolve the installation error, the additional tests listed below will help you determine the cause of the problem:

  • If you are experiencing problems returning a license from a client machine, you should make sure that the client machine is still pointing to the correct license manager by setting the ADSKFLEX_LICENSE_FILE environment variable.
  • As a network administrator, consider restricting the maximum borrowing period and/or limiting who in your organization can borrow licenses. These tasks can be performed by implementing an options file on your license manager.

If you worked through the standard troubleshooting steps and were not able to resolve the issue, follow this link for additional technical assistance.

Please collect the following information from your system before requesting technical assistance:

  • Screenshots of any error messages encountered
  • License file currently in use at each license manager
  • Options file in use at each license manager (if applicable)
  • Debug log file in use at each license manager
  • Copy and paste from LMTOOLS > Server Status tab > Perform Status Enquiry

Borrow Errors produced by FlexEnabled applications:
-67 No licenses available to borrow.
-68 License BORROW support not enabled.
-102 A FLEXid borrow error occurred.
-104 Cannot borrow that long.
-117 BORROW failed.
-118 BORROW period expired.
-120 Cannot lmdown the server when licenses are borrowed.
-122 Unable to delete local borrow info.
-123 Returning a borrowed license early is not supported. Contact the publisher for further details.
-124 Error returning borrowed license.
-128 Error, borrowed license doesn't match any known server license.

lmremove

If license lingering is set and lmremove is used to reclaim the license, lmremove starts, but does not override, the license’s linger time.

Suites

Borrowing of Autodesk Suite product licenses: Because of how cascading works, one machine will end up taking multiple different features when the suite is borrowed.

I don’t want to get the License Borrowed dialog box

Do you use a borrowed license and want to prevent the "License Borrowed" message from showing up every single time i start your AutoCAD? If so, look at Close License Borrowed Dialog boxes automatically freeware.

License Borrowed

More

For more information about Autodesk Network License Manager.

JTB World’s JTB FlexReport will show borrowed usage and information in several different reports for both current and historic borrowed licenses.

No comments:

Post a Comment