categraf-v0.2.35-linux-amd64-with-cgo-plugin无法启动

Viewed 58

启动报错panic: runtime error: invalid memory address or nil pointer dereference

3 Answers

配置贴一下,log贴全

抱歉,起来了,是我粗心了

找到问题就好

抱歉,是配置了inputs.oracle监控,启动报错
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.conntrack started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.cpu started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.disk started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.diskio started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.greenplum started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.ipvs started
2023/03/31 17:12:58 metrics_agent.go:154: E! input: local.jolokia_agent_kafka not supported
2023/03/31 17:12:58 metrics_agent.go:154: E! input: local.jolokia_agent_misc not supported
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.kernel started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.kernel_vmstat started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.linux_sysctl_fs started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.mem started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.net started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.netstat started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.nfsclient started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.oracle started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.processes started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.sockstat started
2023/03/31 17:12:58 metrics_agent.go:208: I! input: local.system started
2023/03/31 17:12:58 agent.go:47: I! [*agent.MetricsAgent] started
2023/03/31 17:12:58 agent.go:50: I! agent started
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1b1e969]

goroutine 29 [running]:
flashcat.cloud/categraf/inputs/oracle.(*Instance).Gather(0xc0011dd600, 0xc001359260)
/home/runner/work/categraf/categraf/inputs/oracle/oracle_linux_amd64.go:113 +0x189
flashcat.cloud/categraf/inputs.MayGather(...)
/home/runner/work/categraf/categraf/inputs/inputs.go:33
flashcat.cloud/categraf/agent.(*InputReader).gatherOnce.func2({0x5276d40, 0xc0011dd600})
/home/runner/work/categraf/categraf/agent/metrics_reader.go:99 +0x184
created by flashcat.cloud/categraf/agent.(*InputReader).gatherOnce
/home/runner/work/categraf/categraf/agent/metrics_reader.go:87 +0x205

如果用不到oracle插件的话,可以下载不带with-cgo字样的categraf