Cleaning the Zombie Login Session on a License Manager
#define FEATURE_NAME "Addition" #define FEATURE_VERSION "1" sntl_licensing_attr_t *pZombieAttrAppContext = NULL; sntl_licensing_attr_t *pZombieAttrLogin = NULL; sntl_licensing_app_context_t *pZombieAppContext = NULL; sntl_licensing_login_session_t *pZombieLoginSession = NULL;
To clean Zombie sessions, execute the APIs in the specified sequential order only:
sntl_licensing_attr_new(&pZombieAttrAppContext); sntl_licensing_app_context_new(0, pZombieAttrAppContext, &pZombieAppContext); sntl_licensing_attr_new(&pZombieAttrLogin); sntl_licensing_attr_set(pZombieAttrLogin, SNTL_ATTR_LOGIN_FEATURE_VERSION, FEATURE_VERSION); sntl_licensing_attr_set(pZombieAttrLogin, SNTL_ATTR_LOGIN_ZOMBIE_SESSION, SNTL_ATTR_YES); sntl_licensing_attr_set(pZombieAttrLogin, SNTL_ATTR_LOGIN_ZOMBIE_SESSION_IDENTIFIER_MASK, " 7 "); sntl_licensing_login_attr(pZombieAppContext, FEATURE_NAME, pZombieAttrLogin, &pZombieLoginSession); sntl_licensing_logout(pZombieLoginSession);
>This functionality is only available in network mode.
>If a contact server is not set, then broadcast will be performed and Zombie login will try to find the appropriate contact server for cleanup. If the server is found, only then cleanup will be performed.
>To close zombie sessions for all features from the current machine, the keyword "$" should be used in the feature name defined for the login_attr API.
>For checked out commuter tokens and repository licenses, the cleanup zombie session is not supported.
Use Case Scenario
Consider the following steps that are a part of this use case:
- The licensed application (client) requests a feature from the License Manager.
- The licensed application gets terminated abnormally (due to a hardware failure, segmentation fault or any other unknown reason) without releasing the requested feature. However, The License Manager still reports that this particular feature is in-use. The licensed application session is still active.
- The licensed application is restarted. It sends a request for the same feature, while the previous session is still active. This scenario can cause:
- Feature/license overuse
- Denial of license, when the License Manager considers that all token/seat count is in use.
NOTE To avoid such scenarios, before requesting the same feature, the licensed application should use the above set of API to clean previously issued keys or active sessions.