-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
I have:
- checked out v1.10.1 for Podman v4.
- Built from source.
It runs if I run the binary straight up, but if I setup a systemctl file or run the binary via another user (sudo -u someusername /usr/local/bin/prometheus-podman-exporter --web.listen-address=:9882 --collector.enable-all) it errors.
ts=2025-10-23T15:15:42.046Z caller=exporter.go:69 level=info msg=metrics enhanced=false
ts=2025-10-23T15:15:42.046Z caller=handler.go:94 level=info msg="enabled collectors"
ts=2025-10-23T15:15:42.046Z caller=handler.go:105 level=info collector=container
ts=2025-10-23T15:15:42.046Z caller=handler.go:105 level=info collector=image
ts=2025-10-23T15:15:42.046Z caller=handler.go:105 level=info collector=network
ts=2025-10-23T15:15:42.046Z caller=handler.go:105 level=info collector=pod
ts=2025-10-23T15:15:42.046Z caller=handler.go:105 level=info collector=system
ts=2025-10-23T15:15:42.046Z caller=handler.go:105 level=info collector=volume
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0xf81d4c]
goroutine 1 [running]:
github.com/containers/common/libimage.(*Runtime).ListImages(0x0, {0x1bac420, 0xc000288ba0}, {0x0?, 0xc000288ba0?, 0xc000533780?}, 0x418de5?)
/home/someusername/prometheus-podman-exporter/vendor/github.com/containers/common/libimage/runtime.go:584 +0x8c
github.com/containers/podman/v4/pkg/domain/infra/abi.(*ImageEngine).List(0xc00002e090, {0x1bac420, 0xc000288ba0}, {0x0?, {0x0?, 0x0?, 0xc0005338b8?}})
/home/someusername/prometheus-podman-exporter/vendor/github.com/containers/podman/v4/pkg/domain/infra/abi/images_list.go:25 +0x15f
github.com/containers/prometheus-podman-exporter/pdcs.updateImages()
/home/someusername/prometheus-podman-exporter/pdcs/image.go:48 +0x7c
github.com/containers/prometheus-podman-exporter/pdcs.StartEventStreamer({0x1b9ee20, 0xc0008140c0}, 0x1)
/home/someusername/prometheus-podman-exporter/pdcs/events.go:21 +0x1e9
github.com/containers/prometheus-podman-exporter/exporter.Start(0x0?, {0x0?, 0x0?, 0x0?})
/home/someusername/prometheus-podman-exporter/exporter/exporter.go:93 +0x5d8
github.com/containers/prometheus-podman-exporter/cmd.run(0x26b3000?, {0xc0001461e0?, 0x4?, 0x18f563c?})
/home/someusername/prometheus-podman-exporter/cmd/root.go:53 +0x1c
github.com/spf13/cobra.(*Command).execute(0x26b3000, {0xc000040400, 0x2, 0x2})
/home/someusername/prometheus-podman-exporter/vendor/github.com/spf13/cobra/command.go:987 +0xab1
github.com/spf13/cobra.(*Command).ExecuteC(0x26b3000)
/home/someusername/prometheus-podman-exporter/vendor/github.com/spf13/cobra/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
/home/someusername/prometheus-podman-exporter/vendor/github.com/spf13/cobra/command.go:1039
github.com/containers/prometheus-podman-exporter/cmd.Execute()
/home/someusername/prometheus-podman-exporter/cmd/root.go:61 +0x1e
main.main()
/home/someusername/prometheus-podman-exporter/main.go:8 +0xf
Could someone help me?
I am having to re-run it on each system boot.
Ubuntu 24.04
Metadata
Metadata
Assignees
Labels
No labels