Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start node_exporter err="could not get power_supply class info: error obtaining power_supply class info: failed to read file \"/sys/class/power_supply/BAT0/current_now\": no such device" #3108

Closed
Kisaragi-ng opened this issue Sep 3, 2024 · 2 comments · Fixed by #3134

Comments

@Kisaragi-ng
Copy link

Host operating system: output of uname -a

Linux hostname 6.8.0-40-generic #40~22.04.3-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 30 17:30:19 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

node_exporter version: output of node_exporter --version

node_exporter, version 1.8.2 (branch: HEAD, revision: f1e0e8360aa60b6cb5e5cc1560bed348fc2c1895)
  build user:       root@03d440803209
  build date:       20240714-11:53:45
  go version:       go1.22.5
  platform:         linux/amd64
  tags:             unknown

node_exporter command line flags

without flags, in systemd service file:

[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter

node_exporter log output

ts=2024-09-03T09:02:53.463Z caller=node_exporter.go:193 level=info msg="Starting node_exporter" version="(version=1.8.2, branch=HEAD, revision=f1e0e8360aa60b6cb5e5cc1560bed348fc2c1895)"
ts=2024-09-03T09:02:53.463Z caller=node_exporter.go:194 level=info msg="Build context" build_context="(go=go1.22.5, platform=linux/amd64, user=root@03d440803209, date=20240714-11:53:45, tags=unknown)"
ts=2024-09-03T09:02:53.464Z caller=node_exporter.go:196 level=warn msg="Node Exporter is running as root user. This exporter is designed to run as unprivileged user, root is not required."
ts=2024-09-03T09:02:53.464Z caller=filesystem_common.go:111 level=info collector=filesystem msg="Parsed flag --collector.filesystem.mount-points-exclude" flag=^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)
ts=2024-09-03T09:02:53.464Z caller=filesystem_common.go:113 level=info collector=filesystem msg="Parsed flag --collector.filesystem.fs-types-exclude" flag=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
ts=2024-09-03T09:02:53.464Z caller=diskstats_common.go:111 level=info collector=diskstats msg="Parsed flag --collector.diskstats.device-exclude" flag=^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\d+n\d+p)\d+$
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:111 level=info msg="Enabled collectors"
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=arp
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=bcache
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=bonding
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=btrfs
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=conntrack
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=cpu
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=cpufreq
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=diskstats
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=dmi
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=edac
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=entropy
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=fibrechannel
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=filefd
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=filesystem
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=hwmon
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=infiniband
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=ipvs
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=loadavg
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=mdadm
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=meminfo
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=netclass
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=netdev
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=netstat
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=nfs
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=nfsd
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=nvme
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=os
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=powersupplyclass
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=pressure
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=rapl
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=schedstat
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=selinux
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=sockstat
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=softnet
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=stat
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=tapestats
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=textfile
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=thermal_zone
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=time
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=timex
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=udp_queues
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=uname
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=vmstat
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=watchdog
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=xfs
ts=2024-09-03T09:02:53.465Z caller=node_exporter.go:118 level=info collector=zfs
ts=2024-09-03T09:02:53.465Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9100
ts=2024-09-03T09:02:53.465Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9100
ts=2024-09-03T09:03:28.987Z caller=collector.go:169 level=error msg="collector failed" name=powersupplyclass duration_seconds=0.009142353 err="could not get power_supply class info: error obtaining power_supply class info: failed to read file \"/sys/class/power_supply/BAT0/current_now\": no such device"
panic: runtime error: slice bounds out of range [:-1520805024]

goroutine 86 [running]:
github.com/prometheus/node_exporter/collector.sysReadFile({0xc00003fd10?, 0x2?})
        /app/collector/hwmon_linux.go:108 +0x1cb
github.com/prometheus/node_exporter/collector.addValueFile(0xc00016fbd0, {0xc0004636e8, 0x6}, {0xc000463647, 0x5}, {0xc00003fd10?, 0xc00016f788?})
        /app/collector/hwmon_linux.go:76 +0x3b
github.com/prometheus/node_exporter/collector.collectSensorData({0xc0003f26d8, 0x17}, 0xc00016fbd0)
        /app/collector/hwmon_linux.go:152 +0x21a
github.com/prometheus/node_exporter/collector.(*hwMonCollector).updateHwmon(0xc000208320, 0xc00022a840, {0xc0003f26d8, 0x17})
        /app/collector/hwmon_linux.go:172 +0x231
github.com/prometheus/node_exporter/collector.(*hwMonCollector).Update(0xc000208320, 0xc00022a840)
        /app/collector/hwmon_linux.go:466 +0x374
github.com/prometheus/node_exporter/collector.execute({0xbc6c13, 0x5}, {0xcf0120, 0xc000208320}, 0xc00022a840, {0xcef880, 0xc00004e4c0})
        /app/collector/collector.go:161 +0x90
github.com/prometheus/node_exporter/collector.NodeCollector.Collect.func1({0xbc6c13?, 0x0?}, {0xcf0120?, 0xc000208320?})
        /app/collector/collector.go:152 +0x37
created by github.com/prometheus/node_exporter/collector.NodeCollector.Collect in goroutine 59
        /app/collector/collector.go:151 +0xce

Are you running node_exporter in Docker?

No

What did you do that produced an error?

after node_exporter started, send a curl or open using web browser to http://localhost:9100/metrics

What did you expect to see?

metrics are shown

What did you see instead?

curl return curl: (52) Empty reply from server while node_exporter process is crashed

@Kisaragi-ng
Copy link
Author

when i tried to exclude powersupplyclass, i got a new error:
command+flag

root@localhost:~# node_exporter --log.level=debug --no-collector.powersupplyclass

output:

ts=2024-09-03T09:35:50.517Z caller=node_exporter.go:193 level=info msg="Starting node_exporter" version="(version=1.8.2, branch=HEAD, revision=f1e0e8360aa60b6cb5e5cc1560bed348fc2c1895)"
ts=2024-09-03T09:35:50.517Z caller=node_exporter.go:194 level=info msg="Build context" build_context="(go=go1.22.5, platform=linux/amd64, user=root@03d440803209, date=20240714-11:53:45, tags=unknown)"
ts=2024-09-03T09:35:50.517Z caller=node_exporter.go:196 level=warn msg="Node Exporter is running as root user. This exporter is designed to run as unprivileged user, root is not required."
ts=2024-09-03T09:35:50.518Z caller=node_exporter.go:199 level=debug msg="Go MAXPROCS" procs=1
ts=2024-09-03T09:35:50.518Z caller=diskstats_common.go:111 level=info collector=diskstats msg="Parsed flag --collector.diskstats.device-exclude" flag=^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\d+n\d+p)\d+$
ts=2024-09-03T09:35:50.518Z caller=filesystem_common.go:111 level=info collector=filesystem msg="Parsed flag --collector.filesystem.mount-points-exclude" flag=^/(dev|proc|run/credentials/.+|sys|var/lib/docker/.+|var/lib/containers/storage/.+)($|/)
ts=2024-09-03T09:35:50.519Z caller=filesystem_common.go:113 level=info collector=filesystem msg="Parsed flag --collector.filesystem.fs-types-exclude" flag=^(autofs|binfmt_misc|bpf|cgroup2?|configfs|debugfs|devpts|devtmpfs|fusectl|hugetlbfs|iso9660|mqueue|nsfs|overlay|proc|procfs|pstore|rpc_pipefs|securityfs|selinuxfs|squashfs|sysfs|tracefs)$
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:111 level=info msg="Enabled collectors"
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=arp
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=bcache
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=bonding
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=btrfs
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=conntrack
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=cpu
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=cpufreq
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=diskstats
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=dmi
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=edac
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=entropy
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=fibrechannel
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=filefd
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=filesystem
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=hwmon
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=infiniband
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=ipvs
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=loadavg
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=mdadm
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=meminfo
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=netclass
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=netdev
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=netstat
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=nfs
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=nfsd
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=nvme
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=os
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=pressure
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=rapl
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=schedstat
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=selinux
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=sockstat
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=softnet
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=stat
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=tapestats
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=textfile
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=thermal_zone
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=time
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=timex
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=udp_queues
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=uname
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=vmstat
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=watchdog
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=xfs
ts=2024-09-03T09:35:50.519Z caller=node_exporter.go:118 level=info collector=zfs
ts=2024-09-03T09:35:50.519Z caller=tls_config.go:313 level=info msg="Listening on" address=[::]:9100
ts=2024-09-03T09:35:50.519Z caller=tls_config.go:316 level=info msg="TLS is disabled." http2=false address=[::]:9100
ts=2024-09-03T09:36:05.046Z caller=node_exporter.go:79 level=debug msg="collect query:" filters="unsupported value type"
ts=2024-09-03T09:36:05.048Z caller=collector.go:173 level=debug msg="collector succeeded" name=os duration_seconds=0.000168773
ts=2024-09-03T09:36:05.049Z caller=collector.go:173 level=debug msg="collector succeeded" name=watchdog duration_seconds=0.000142234
ts=2024-09-03T09:36:05.049Z caller=collector.go:173 level=debug msg="collector succeeded" name=mdadm duration_seconds=9.3958e-05
ts=2024-09-03T09:36:05.049Z caller=ipvs_linux.go:146 level=debug collector=ipvs msg="ipvs collector metrics are not available for this system"
ts=2024-09-03T09:36:05.049Z caller=collector.go:167 level=debug msg="collector returned no data" name=ipvs duration_seconds=0.00012331 err="collector returned no data"
ts=2024-09-03T09:36:05.050Z caller=time.go:73 level=debug collector=time msg="Return time" now=1.7253561650500944e+09
ts=2024-09-03T09:36:05.050Z caller=time.go:75 level=debug collector=time msg="Zone offset" offset=25200 time_zone=WIB
ts=2024-09-03T09:36:05.050Z caller=time_linux.go:38 level=debug collector=time msg="in Update" clocksources="[{0 [tsc acpi_pm] tsc}]"
ts=2024-09-03T09:36:05.050Z caller=collector.go:173 level=debug msg="collector succeeded" name=time duration_seconds=0.000276769
ts=2024-09-03T09:36:05.050Z caller=collector.go:173 level=debug msg="collector succeeded" name=entropy duration_seconds=0.000133312
ts=2024-09-03T09:36:05.050Z caller=loadavg.go:55 level=debug collector=loadavg msg="return load" index=0 load=1.36
ts=2024-09-03T09:36:05.050Z caller=loadavg.go:55 level=debug collector=loadavg msg="return load" index=1 load=0.91
ts=2024-09-03T09:36:05.050Z caller=loadavg.go:55 level=debug collector=loadavg msg="return load" index=2 load=0.75
ts=2024-09-03T09:36:05.050Z caller=collector.go:173 level=debug msg="collector succeeded" name=loadavg duration_seconds=0.000115815
ts=2024-09-03T09:36:05.052Z caller=collector.go:173 level=debug msg="collector succeeded" name=netclass duration_seconds=0.002159877
ts=2024-09-03T09:36:05.052Z caller=collector.go:173 level=debug msg="collector succeeded" name=selinux duration_seconds=5.5381e-05
ts=2024-09-03T09:36:05.052Z caller=zfs_linux.go:53 level=debug collector=zfs msg="Cannot open file for reading" path=/proc/spl/kstat/zfs
ts=2024-09-03T09:36:05.052Z caller=zfs.go:73 level=debug collector=zfs err="ZFS / ZFS statistics are not available"
ts=2024-09-03T09:36:05.053Z caller=collector.go:167 level=debug msg="collector returned no data" name=zfs duration_seconds=4.1575e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.053Z caller=collector.go:173 level=debug msg="collector succeeded" name=xfs duration_seconds=2.139e-05
ts=2024-09-03T09:36:05.053Z caller=collector.go:173 level=debug msg="collector succeeded" name=softnet duration_seconds=0.000128152
ts=2024-09-03T09:36:05.053Z caller=collector.go:173 level=debug msg="collector succeeded" name=nvme duration_seconds=0.000104101
ts=2024-09-03T09:36:05.053Z caller=nfs_linux.go:103 level=debug collector=nfs msg="Not collecting NFS metrics" err="open /proc/net/rpc/nfs: no such file or directory"
ts=2024-09-03T09:36:05.053Z caller=collector.go:167 level=debug msg="collector returned no data" name=nfs duration_seconds=6.1842e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.053Z caller=collector.go:173 level=debug msg="collector succeeded" name=schedstat duration_seconds=0.000122473
ts=2024-09-03T09:36:05.054Z caller=collector.go:173 level=debug msg="collector succeeded" name=arp duration_seconds=0.000565322
ts=2024-09-03T09:36:05.054Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys
ts=2024-09-03T09:36:05.054Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/proc
ts=2024-09-03T09:36:05.054Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/dev
ts=2024-09-03T09:36:05.054Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/dev/pts
ts=2024-09-03T09:36:05.054Z caller=collector.go:173 level=debug msg="collector succeeded" name=filefd duration_seconds=4.2558e-05
ts=2024-09-03T09:36:05.054Z caller=collector.go:173 level=debug msg="collector succeeded" name=netdev duration_seconds=0.000280832
ts=2024-09-03T09:36:05.055Z caller=collector.go:173 level=debug msg="collector succeeded" name=stat duration_seconds=0.000195157
ts=2024-09-03T09:36:05.055Z caller=collector.go:173 level=debug msg="collector succeeded" name=thermal_zone duration_seconds=0.000757256
ts=2024-09-03T09:36:05.056Z caller=collector.go:173 level=debug msg="collector succeeded" name=edac duration_seconds=1.949e-05
ts=2024-09-03T09:36:05.056Z caller=collector.go:173 level=debug msg="collector succeeded" name=sockstat duration_seconds=9.0342e-05
ts=2024-09-03T09:36:05.056Z caller=pressure_linux.go:92 level=debug collector=pressure msg="collecting statistics for resource" resource=cpu
ts=2024-09-03T09:36:05.056Z caller=pressure_linux.go:92 level=debug collector=pressure msg="collecting statistics for resource" resource=io
ts=2024-09-03T09:36:05.056Z caller=pressure_linux.go:92 level=debug collector=pressure msg="collecting statistics for resource" resource=memory
ts=2024-09-03T09:36:05.056Z caller=collector.go:173 level=debug msg="collector succeeded" name=pressure duration_seconds=0.000121547
ts=2024-09-03T09:36:05.056Z caller=collector.go:173 level=debug msg="collector succeeded" name=vmstat duration_seconds=0.000107765
ts=2024-09-03T09:36:05.056Z caller=collector.go:173 level=debug msg="collector succeeded" name=timex duration_seconds=1.0006e-05
ts=2024-09-03T09:36:05.056Z caller=collector.go:173 level=debug msg="collector succeeded" name=diskstats duration_seconds=0.000341781
ts=2024-09-03T09:36:05.057Z caller=collector.go:173 level=debug msg="collector succeeded" name=netstat duration_seconds=0.000528595
ts=2024-09-03T09:36:05.057Z caller=collector.go:173 level=debug msg="collector succeeded" name=cpu duration_seconds=0.000460458
ts=2024-09-03T09:36:05.057Z caller=tapestats_linux.go:129 level=debug collector=tapestats msg="scsi_tape stats not found, skipping"
ts=2024-09-03T09:36:05.057Z caller=collector.go:167 level=debug msg="collector returned no data" name=tapestats duration_seconds=1.7117e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.057Z caller=bonding_linux.go:64 level=debug collector=bonding msg="Not collecting bonding, file does not exist" file=/sys/class/net
ts=2024-09-03T09:36:05.057Z caller=collector.go:167 level=debug msg="collector returned no data" name=bonding duration_seconds=2.6086e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.057Z caller=meminfo.go:54 level=debug collector=meminfo msg="Set node_mem" memInfo="unsupported value type"
ts=2024-09-03T09:36:05.057Z caller=collector.go:173 level=debug msg="collector succeeded" name=meminfo duration_seconds=0.000131604
ts=2024-09-03T09:36:05.057Z caller=infiniband_linux.go:119 level=debug collector=infiniband msg="infiniband statistics not found, skipping"
ts=2024-09-03T09:36:05.058Z caller=collector.go:167 level=debug msg="collector returned no data" name=infiniband duration_seconds=2.2728e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.058Z caller=collector.go:173 level=debug msg="collector succeeded" name=textfile duration_seconds=1.0898e-05
ts=2024-09-03T09:36:05.058Z caller=nfsd_linux.go:69 level=debug collector=nfsd msg="Not collecting NFSd metrics" err="open /proc/net/rpc/nfsd: no such file or directory"
ts=2024-09-03T09:36:05.058Z caller=collector.go:167 level=debug msg="collector returned no data" name=nfsd duration_seconds=1.8299e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.058Z caller=conntrack_linux.go:157 level=debug collector=conntrack msg="conntrack probably not loaded"
ts=2024-09-03T09:36:05.058Z caller=collector.go:167 level=debug msg="collector returned no data" name=conntrack duration_seconds=1.6158e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.058Z caller=fibrechannel_linux.go:101 level=debug collector=fibrechannel msg="fibrechannel statistics not found, skipping"
ts=2024-09-03T09:36:05.058Z caller=collector.go:167 level=debug msg="collector returned no data" name=fibrechannel duration_seconds=1.7917e-05 err="collector returned no data"
ts=2024-09-03T09:36:05.058Z caller=collector.go:173 level=debug msg="collector succeeded" name=rapl duration_seconds=0.000237111
ts=2024-09-03T09:36:05.058Z caller=collector.go:173 level=debug msg="collector succeeded" name=dmi duration_seconds=9.604e-06
ts=2024-09-03T09:36:05.058Z caller=collector.go:173 level=debug msg="collector succeeded" name=uname duration_seconds=6.59e-06
ts=2024-09-03T09:36:05.058Z caller=collector.go:173 level=debug msg="collector succeeded" name=bcache duration_seconds=8.301e-06
ts=2024-09-03T09:36:05.059Z caller=collector.go:173 level=debug msg="collector succeeded" name=cpufreq duration_seconds=0.001690167
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/kernel/security
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/dev/shm
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/fs/cgroup
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/fs/pstore
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/firmware/efi/efivars
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/fs/bpf
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/proc/sys/fs/binfmt_misc
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/dev/hugepages
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/dev/mqueue
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/kernel/debug
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/kernel/tracing
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/fs/fuse/connections
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/sys/kernel/config
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/run/credentials/systemd-sysusers.service
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.059Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:78 level=debug collector=filesystem msg="Ignoring mount point" mountpoint=/proc/sys/fs/binfmt_misc
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=nsfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=squashfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=nsfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:82 level=debug collector=filesystem msg="Ignoring fs" type=nsfs
ts=2024-09-03T09:36:05.060Z caller=filesystem_linux.go:138 level=debug collector=filesystem msg="Error on statfs() system call" rootfs=/run/user/0/doc err="operation not permitted"
ts=2024-09-03T09:36:05.060Z caller=collector.go:173 level=debug msg="collector succeeded" name=filesystem duration_seconds=0.006557421
ts=2024-09-03T09:36:05.061Z caller=collector.go:173 level=debug msg="collector succeeded" name=udp_queues duration_seconds=0.012559596
ts=2024-09-03T09:36:05.079Z caller=collector.go:173 level=debug msg="collector succeeded" name=btrfs duration_seconds=0.025623522
panic: runtime error: slice bounds out of range [:-1520805024]

goroutine 61 [running]:
github.com/prometheus/node_exporter/collector.sysReadFile({0xc000475c80?, 0x2?})
        /app/collector/hwmon_linux.go:108 +0x1cb
github.com/prometheus/node_exporter/collector.addValueFile(0xc000257bd0, {0xc0004a42d8, 0x6}, {0xc0004a4237, 0x5}, {0xc000475c80?, 0xc000257788?})
        /app/collector/hwmon_linux.go:76 +0x3b
github.com/prometheus/node_exporter/collector.collectSensorData({0xc00037d9b0, 0x17}, 0xc000257bd0)
        /app/collector/hwmon_linux.go:152 +0x21a
github.com/prometheus/node_exporter/collector.(*hwMonCollector).updateHwmon(0xc00007b560, 0xc00029e8a0, {0xc00037d9b0, 0x17})
        /app/collector/hwmon_linux.go:172 +0x231
github.com/prometheus/node_exporter/collector.(*hwMonCollector).Update(0xc00007b560, 0xc00029e8a0)
        /app/collector/hwmon_linux.go:466 +0x374
github.com/prometheus/node_exporter/collector.execute({0xbc6c13, 0x5}, {0xcf0120, 0xc00007b560}, 0xc00029e8a0, {0xcef880, 0xc0000f7e80})
        /app/collector/collector.go:161 +0x90
github.com/prometheus/node_exporter/collector.NodeCollector.Collect.func1({0xbc6c13?, 0x0?}, {0xcf0120?, 0xc00007b560?})
        /app/collector/collector.go:152 +0x37
created by github.com/prometheus/node_exporter/collector.NodeCollector.Collect in goroutine 56
        /app/collector/collector.go:151 +0xce

chengjoey added a commit to chengjoey/node_exporter that referenced this issue Sep 6, 2024
Signed-off-by: joey <zchengjoey@gmail.com>
chengjoey added a commit to chengjoey/node_exporter that referenced this issue Sep 22, 2024
Signed-off-by: joey <zchengjoey@gmail.com>
chengjoey added a commit to chengjoey/node_exporter that referenced this issue Sep 22, 2024
Signed-off-by: joey <zchengjoey@gmail.com>
SuperQ added a commit that referenced this issue Sep 25, 2024
Avoid panic for accessing slice out of range in hwmon.

Fixes: #3108

Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ added a commit that referenced this issue Sep 27, 2024
Avoid panic for accessing slice out of range in hwmon.

Fixes: #3108

Signed-off-by: Ben Kochie <superq@gmail.com>
SuperQ added a commit that referenced this issue Sep 28, 2024
Avoid panic for accessing slice out of range in hwmon.

Fixes: #3108

Signed-off-by: Ben Kochie <superq@gmail.com>
discordianfish pushed a commit that referenced this issue Sep 30, 2024
Avoid panic for accessing slice out of range in hwmon.

Fixes: #3108

Signed-off-by: Ben Kochie <superq@gmail.com>
@Kisaragi-ng
Copy link
Author

thank you for #3134 patch, can confirm it works properly now

rongyi pushed a commit to ontology-tech/node_exporter that referenced this issue Oct 17, 2024
Avoid panic for accessing slice out of range in hwmon.

Fixes: prometheus#3108

Signed-off-by: Ben Kochie <superq@gmail.com>
v-zhuravlev pushed a commit to grafana/node_exporter that referenced this issue Nov 1, 2024
Avoid panic for accessing slice out of range in hwmon.

Fixes: prometheus#3108

Signed-off-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant