- Revenera Community
- :
- FlexNet Publisher
- :
- FlexNet Publisher Forum
- :
- Re: lc_get_server_version returns zero version
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
To get the NLM version we do the following but we get zero version. To make it work, we append "@" at the beginning of license_path. Is this the expected behavior? Note that even if an unreachable server is put into as license_path, it will return version as 0.0.0.0 <major>.<minor>.<build>.<patch>.
const char *license_path = "<IP/hostname>"
lc_new_job((LM_HANDLE *)0, lc_new_job_arg2, &vendorCode, &job);
lc_set_attr(job, LM_A_APP_DISABLE_CACHE_READ, (LM_A_VAL_TYPE) 1);
lc_set_attr(job, LM_A_LICENSE_DEFAULT, (LM_A_VAL_TYPE) license_path);
lc_get_server_version(job, FNP_SERVER_TYPE_LIC_MANAGER, &lm_flexnet_ver);
lc_get_server_version(job, FNP_SERVER_TYPE_VENDOR_DAEMON, &vd_flexnet_ver);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
If you are using localhost, IP, or just hostname it needs to be appended with "@" at the beginning.
Also, unfortunately the API does not return an error like you expect it just returns 0's when it is not able to connect.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Hi,
If the server is not reachable or if the path set is wrong "0.0.0.0" is an expected output.
Please try to run lmstat on the client system and check if the client is able to communicate with the server and then check once if lc_get_server_version returns the correct value.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
As I was saying using an active NLM server, appending "@" at the beginning would return the correct version but without it it will just be "0.0.0.0".
For unreachable server, we expect the lc_get_server_version to return an error like this:
Cannot connect to license server system.\n The license server manager (lmgrd) has not been started yet,\n the wrong port@host or license file is being used, or the\n port or hostname in the license file has been changed.\nServer name: x.x.x.x\nLicense path: @x.x.x.x;\nFlexNet Licensing error:-15,570 (error code -15)'"
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
If you are using localhost, IP, or just hostname it needs to be appended with "@" at the beginning.
Also, unfortunately the API does not return an error like you expect it just returns 0's when it is not able to connect.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Actually, lc_get_server_version does return that error when appended with "@". I've tested this.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
As per my knowledge, lc_get_server_version returns 0 if Success or any other value is it is a Non-success.