flexlm_exporter
flexlm_exporter copied to clipboard
lmgrd is not running: License server machine is down or not responding.
I am using your latest Docker image ...
docker run -p 9319:9319 --volume c:\\workspace\\monitoring\\flexlm-exporter:/usr/bin/flexlm/ --volume c:\workspace\monitoring\flexlm-exporter/licenses.yml:/home/exporter/config/licenses.yml mjtrangoni/flexlm_exporter:master --path.lmutil="/usr/bin/flexlm/lmutil" --path.config="/home/exporter/config/licenses.yml"
... and it seems to be starting fine:
level=info ts=2022-07-01T14:52:52.754Z caller=flexlm_exporter.go:200 msg="Starting flexlm_exporter" version="(version=0.0.7-9-g54d57fb, branch=master, revision=54d57fb163d71e1f4e3283f08386c300f940ee49)" level=info ts=2022-07-01T14:52:52.754Z caller=flexlm_exporter.go:201 msg="Build context" build_context="(go=go1.18.3, user=circleci@657873b278db, date=20220626-16:06:14)" level=info ts=2022-07-01T14:52:52.754Z caller=flexlm_exporter.go:117 msg="Enabled collectors" level=info ts=2022-07-01T14:52:52.754Z caller=flexlm_exporter.go:128 collector=lmstat level=info ts=2022-07-01T14:52:52.754Z caller=flexlm_exporter.go:128 collector=lmstat_feature_exp level=info ts=2022-07-01T14:52:52.754Z caller=config.go:48 msg="Loading license config file:" level=info ts=2022-07-01T14:52:52.754Z caller=config.go:49 -=/home/exporter/config/licenses.yml level=info ts=2022-07-01T14:52:52.760Z caller=flexlm_exporter.go:218 msg="Listening on" address=:9319 level=info ts=2022-07-01T14:52:52.760Z caller=tls_config.go:191 msg="TLS is disabled." http2=false
Unfortunately I cannot see any metrics and the /metrics endpoint
flexlm_exporter version: output of flexlm_exporter --version
flexlm_exporter, version 0.0.7-9-g54d57fb (branch: master, revision: 54d57fb163d71e1f4e3283f08386c300f940ee49)
build user: circleci@657873b278db
build date: 20220626-16:06:14
go version: go1.18.3
platform: linux/amd64
flexlm_exporter command line flags and relevant YAML configuration file information
--path.lmutil="/usr/bin/flexlm/lmutil" --path.config="/home/exporter/config/licenses.yml"
cat /home/exporter/config/licenses.yml
# FlexLM Licenses to be monitored.
---
licenses:
- name: Arm_Compiler
license_server: 8224@sdet2225
monitor_users: True
monitor_reservations: True
monitor_versions: False
Are you running flexlm_exporter in Docker?
yes
What did you do that produced an error?
Start the service.
What did you expect to see?
At least one metric.
What did you see instead?
# HELP flexlm_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which flexlm_exporter was built.
# TYPE flexlm_exporter_build_info gauge
flexlm_exporter_build_info{branch="master",goversion="go1.18.3",revision="54d57fb163d71e1f4e3283f08386c300f940ee49",version="0.0.7-9-g54d57fb"} 1
# HELP flexlm_lmstat_info A metric with a constant '1' value labeled by arch, build and version of the lmstat tool.
# TYPE flexlm_lmstat_info gauge
flexlm_lmstat_info{arch="x64_lsb",build="272614",version="v11.17.2.0"} 1
# HELP flexlm_scrape_collector_duration_seconds flexlm_exporter: Duration of a collector scrape.
# TYPE flexlm_scrape_collector_duration_seconds gauge
flexlm_scrape_collector_duration_seconds{collector="lmstat"} 0.061662
flexlm_scrape_collector_duration_seconds{collector="lmstat_feature_exp"} 1.6e-06
# HELP flexlm_scrape_collector_success flexlm_exporter: Whether a collector succeeded.
# TYPE flexlm_scrape_collector_success gauge
flexlm_scrape_collector_success{collector="lmstat"} 1
flexlm_scrape_collector_success{collector="lmstat_feature_exp"} 1
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 7
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.18.3"} 1
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 1.238024e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 1.238024e+06
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.445592e+06
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 410
# HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.
# TYPE go_memstats_gc_cpu_fraction gauge
go_memstats_gc_cpu_fraction 0
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 4.122512e+06
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 1.238024e+06
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 1.51552e+06
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 2.318336e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 6185
# HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes gauge
go_memstats_heap_released_bytes 1.51552e+06
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 3.833856e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 0
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 6595
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 19200
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 31200
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 45424
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 48960
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 857472
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 360448
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 360448
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.070004e+07
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 6
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.04
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.048576e+06
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 9
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 1.1214848e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.65667734076e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 7.31942912e+08
# HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.
# TYPE process_virtual_memory_max_bytes gauge
process_virtual_memory_max_bytes 1.8446744073709552e+19
# HELP promhttp_metric_handler_errors_total Total number of internal errors encountered by the promhttp metric handler.
# TYPE promhttp_metric_handler_errors_total counter
promhttp_metric_handler_errors_total{cause="encoding"} 0
promhttp_metric_handler_errors_total{cause="gathering"} 0
# HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.
# TYPE promhttp_metric_handler_requests_in_flight gauge
promhttp_metric_handler_requests_in_flight 1
# HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.
# TYPE promhttp_metric_handler_requests_total counter
promhttp_metric_handler_requests_total{code="200"} 0
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
Additional Info
I tried to use the lmutil directly within the container but get
[exporter@08bf7634c36b flexlm]$ ./lmutil lmstat -c 8224@sdet2225 -a
lmutil - Copyright (c) 1989-2020 Flexera. All Rights Reserved.
Flexible License Manager status on Fri 7/1/2022 15:00
Error getting status: License server machine is down or not responding. (-96,7:2 "No such file or directory")
Running lmutil outside of the container is working though. A ping at sdet2225 is receiving a response.
Any idea what is going wrong here?
is 8224 the correct port? have you tried: ./lmutil lmstat -c @sdet2225
Same result:
[exporter@5d33b353db6a flexlm]$ ./lmutil lmstat -c @sdet2225
lmutil - Copyright (c) 1989-2020 Flexera. All Rights Reserved.
Flexible License Manager status on Fri 9/9/2022 07:49
Error getting status: License server machine is down or not responding. (-96,7:2 "No such file or directory")
Can you check if you can resolve that DNS inside the container?
Yes.
[exporter@65de44a09c32 ~]$ curl sdet2225:8224 --output x
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 88 0 88 0 0 539 0 --:--:-- --:--:-- --:--:-- 539
[exporter@65de44a09c32 ~]$ cat x
W�-60[exporter@65de44a09c32 ~]$ curl sdet2225
curl: (7) Failed to connect to sdet2225 port 80: Connection refused
Interesting! Can you check what the server logs says about your call?
On Fri, 9 Sept 2022 at 12:05, Christian Schyma @.***> wrote:
Yes.
@.*** ~]$ curl sdet2225:8224 --output x
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 88 0 88 0 0 539 0 --:--:-- --:--:-- --:--:-- 539
@.*** ~]$ cat x
@.*** ~]$ curl sdet2225
curl: (7) Failed to connect to sdet2225 port 80: Connection refused
— Reply to this email directly, view it on GitHub https://github.com/mjtrangoni/flexlm_exporter/issues/59#issuecomment-1241771905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAB727WBI7ILVIPJIHUR7W3V5MDWFANCNFSM52NAGWIA . You are receiving this because you commented.Message ID: @.***>
I have seen similar results to this if the lmgrd(or vendor deamon) port is blocked too. flexlm tends to use 2 ports. I found an example of how to specify both ports here: How do I choose specific ports for my license server?
I cannot see the server logs but as running outside of a container - using lmutil.exe (Windows) - is working I suspect Docker or at least a Docker specific issue.
PS C:\workspace\monitoring\flexlm-exporter> ./lmutil.exe lmstat -c 8224@sdet2225 -a
lmutil - Copyright (c) 1989-2020 Flexera. All Rights Reserved.
Flexible License Manager status on Wed 9/21/2022 16:39
[Detecting lmgrd processes...]
License server status: 8224@sdet2225
License file(s) on sdet2225: D:\licensemanagers\ARM-Keil\license.dat:
sdet2225: license server UP (MASTER) v11.17.2
Vendor daemon status (on sdet2225):
armlmd: UP v11.17.2
Feature usage info:
Users of mdk_pro: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std_uvision: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std_armasm5: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std_compiler5: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std_armlink5: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std_fromelf5: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_cm_std_arm_lcf5: (Total of 5 licenses issued; Total of 0 licenses in use)
Users of mdk_pro_uvision: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of mdk_pro_armasm5: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of mdk_pro_compiler5: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of mdk_pro_armlink5: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of mdk_pro_fromelf5: (Total of 2 licenses issued; Total of 0 licenses in use)
Users of mdk_pro_arm_lcf5: (Total of 2 licenses issued; Total of 0 licenses in use)
Finally some feedback from me. It's working now, but the actual problem is not yet known.
We had to change the license.dat file at the license server. Replace the hostname of the server by the IP address of the server:
SERVER myserver 0000123abcd 1700
to
SERVER 127.0.0.1 0000123abcd 1700
Proposed solution found here.