我在设置hawkular-agent.时遇到问题 我在OpenShift pod中设置了代理,当代理尝试调用另一个在不同pod中运行的应用程序的jolokia端点时,我收到此错误日志:
I0130 13:07:05.161073 1 metrics_collector_manager.go:94] START collecting metrics from [https://x.x.x.x:8778/jolokia/] every [10]s
panic: runtime error: index out of range
goroutine 11 [running]:
panic(0x11c3ac0, 0xc420016060)
/home/mazz/bin/go-install/go/src/runtime/panic.go:500 +0x1a1
github.com/hawkular/hawkular-openshift-agent/k8s.K8SEndpoint.GetUrl(0xc4202a9cb8, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/mazz/source/go/hawkular-openshift-agent/src/github.com/hawkular/hawkular-openshift-agent/k8s/configmap_entry.go:68 +0x26b
github.com/hawkular/hawkular-openshift-agent/k8s.(*NodeEventConsumer).startCollecting(0xc42045d2c0, 0xc42016c500)
/home/mazz/source/go/hawkular-openshift-agent/src/github.com/hawkular/hawkular-openshift-agent/k8s/node_event_consumer.go:163 +0x10c
github.com/hawkular/hawkular-openshift-agent/k8s.(*NodeEventConsumer).consumeNodeEvents(0xc42045d2c0)
/home/mazz/source/go/hawkular-openshift-agent/src/github.com/hawkular/hawkular-openshift-agent/k8s/node_event_consumer.go:112 +0x26d
created by github.com/hawkular/hawkular-openshift-agent/k8s.(*NodeEventConsumer).Start
/home/mazz/source/go/hawkular-openshift-agent/src/github.com/hawkular/hawkular-openshift-agent/k8s/node_event_consumer.go:82 +0x5c5
也许有人有类似的问题?代理的版本是 Hawkular OpenShift代理:版本:0.1.0 。
答案 0 :(得分:1)
我通过使用openshift-infra项目而不是openshift-infra1成功解决了这个问题。