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

部署KubePrometheus报错 #151

Open
fmiaojie opened this issue Jul 23, 2024 · 3 comments
Open

部署KubePrometheus报错 #151

fmiaojie opened this issue Jul 23, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@fmiaojie
Copy link

组件甚至不能删除,删除也报这个错
2024-07-23 10:21:12,004 INFO o.d.c.p.ConfigDeleteTask 88: command task:28 开始, 记录到数据库
2024-07-23 10:21:12,022 INFO o.d.c.p.ConfigDeleteTask 95: serviceRender目录为空
2024-07-23 10:21:12,023 INFO o.d.c.p.ConfigDeleteTask 127: serviceCommon目录为空
2024-07-23 10:21:12,023 INFO o.d.c.p.ConfigDeleteTask 157: k8sCommon目录为空
2024-07-23 10:21:12,023 INFO o.d.c.p.ConfigDeleteTask 165: 加载k8sRender目录:/opt/cloudeon/stack/EDP-2.0.0/kube-prometheus-stack/k8s-render
2024-07-23 10:21:12,042 INFO o.d.c.p.ConfigDeleteTask 194: 加载kube-prometheus-render目录:/opt/cloudeon/stack/EDP-2.0.0/kube-prometheus-stack/kube-prometheus-render
2024-07-23 10:21:12,071 ERROR o.d.c.p.ConfigDeleteTask 209: 处理资源失败,资源内容如下:
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: server-alertmanager-config
namespace: cloudeon
labels:
alertmanagerConfig: "true"
spec:
route:
groupBy: ['alert']
groupWait: 30s
groupInterval: 1m
repeatInterval: 2m
receiver: 'web.hook'
continue: true
matchers:
- name: receiver
value: "webhook"
receivers:

  • name: 'null'
  • name: 'web.hook'
    webhookConfigs:
    • url: 'http://172.17.0.2:7700/apiPre/alert/webhook'
      sendResolved: true
      inhibitRules:
    • sourceMatch:
      • name: alertLevel
        value: "异常级别"
        targetMatch:
      • name: alertLevel
        value: "告警级别"
        equal: ['alert', 'dev', 'instance']

2024-07-23 10:21:12,072 ERROR o.d.c.p.ConfigDeleteTask 134: CommandTask:28发生异常,处理异常。。。io.fabric8.kubernetes.client.KubernetesClientException: Could not find a registered handler for item: [GenericKubernetesResource(apiVersion=monitoring.coreos.com/v1alpha1, kind=AlertmanagerConfig, metadata=ObjectMeta(annotations={}, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={alertmanagerConfig=true}, managedFields=[], name=server-alertmanager-config, namespace=cloudeon, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), additionalProperties={spec={route={groupBy=[alert], groupWait=30s, groupInterval=1m, repeatInterval=2m, receiver=web.hook, continue=true, matchers=[{name=receiver, value=webhook}]}, receivers=[{name=null}, {name=web.hook, webhookConfigs=[{url=http://172.17.0.2:7700/apiPre/alert/webhook, sendResolved=true}]}], inhibitRules=[{sourceMatch=[{name=alertLevel, value=异常级别}], targetMatch=[{name=alertLevel, value=告警级别}], equal=[alert, dev, instance]}]}})].
java.lang.RuntimeException: io.fabric8.kubernetes.client.KubernetesClientException: Could not find a registered handler for item: [GenericKubernetesResource(apiVersion=monitoring.coreos.com/v1alpha1, kind=AlertmanagerConfig, metadata=ObjectMeta(annotations={}, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={alertmanagerConfig=true}, managedFields=[], name=server-alertmanager-config, namespace=cloudeon, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), additionalProperties={spec={route={groupBy=[alert], groupWait=30s, groupInterval=1m, repeatInterval=2m, receiver=web.hook, continue=true, matchers=[{name=receiver, value=webhook}]}, receivers=[{name=null}, {name=web.hook, webhookConfigs=[{url=http://172.17.0.2:7700/apiPre/alert/webhook, sendResolved=true}]}], inhibitRules=[{sourceMatch=[{name=alertLevel, value=异常级别}], targetMatch=[{name=alertLevel, value=告警级别}], equal=[alert, dev, instance]}]}})].
at cn.hutool.core.lang.func.VoidFunc1.callWithRuntimeException(VoidFunc1.java:36)
at org.dromara.cloudeon.service.KubeService.executeWithKubeClient(KubeService.java:46)
at org.dromara.cloudeon.processor.ConfigTask.internalExecute(ConfigTask.java:200)
at org.dromara.cloudeon.processor.BaseCloudeonTask.run(BaseCloudeonTask.java:100)
at net.tascalate.concurrent.PromiseAdapterExtended.lambda$runnableAsFunction$8(PromiseAdapterExtended.java:168)
at net.tascalate.concurrent.AbstractCompletableTask.lambda$thenApplyAsync$0(AbstractCompletableTask.java:150)
at net.tascalate.concurrent.CallbackRegistry.lambda$callCallback$0(CallbackRegistry.java:282)
at net.tascalate.concurrent.CompletableSubTask$DelegatingCallable.call(CompletableSubTask.java:46)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at net.tascalate.concurrent.CompletableSubTask.fireTransition(CompletableSubTask.java:66)
at net.tascalate.concurrent.CallbackRegistry.lambda$callCallback$1(CallbackRegistry.java:284)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Could not find a registered handler for item: [GenericKubernetesResource(apiVersion=monitoring.coreos.com/v1alpha1, kind=AlertmanagerConfig, metadata=ObjectMeta(annotations={}, creationTimestamp=null, deletionGracePeriodSeconds=null, deletionTimestamp=null, finalizers=[], generateName=null, generation=null, labels={alertmanagerConfig=true}, managedFields=[], name=server-alertmanager-config, namespace=cloudeon, ownerReferences=[], resourceVersion=null, selfLink=null, uid=null, additionalProperties={}), additionalProperties={spec={route={groupBy=[alert], groupWait=30s, groupInterval=1m, repeatInterval=2m, receiver=web.hook, continue=true, matchers=[{name=receiver, value=webhook}]}, receivers=[{name=null}, {name=web.hook, webhookConfigs=[{url=http://172.17.0.2:7700/apiPre/alert/webhook, sendResolved=true}]}], inhibitRules=[{sourceMatch=[{name=alertLevel, value=异常级别}], targetMatch=[{name=alertLevel, value=告警级别}], equal=[alert, dev, instance]}]}})].
at io.fabric8.kubernetes.client.impl.Handlers.get(Handlers.java:77)
at io.fabric8.kubernetes.client.impl.KubernetesClientImpl.resource(KubernetesClientImpl.java:357)
at io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.getResource(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java:113)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:566)
at io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.delete(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableListImpl.java:205)
at org.dromara.cloudeon.processor.ConfigTask.lambda$internalExecute$715b0fb2$2(ConfigTask.java:206)
at cn.hutool.core.lang.func.VoidFunc1.callWithRuntimeException(VoidFunc1.java:34)
... 13 common frames omitted

@fmiaojie fmiaojie added the bug Something isn't working label Jul 23, 2024
@CherryRum
Copy link

一样,您解决了吗

@xlostpath
Copy link

xlostpath commented Sep 20, 2024 via email

@CherryRum
Copy link

知道为啥了,这个问题一般是你的k8s集群(没启动完善)
1.检查你的node节点
2.检查集群的pod是否起来正常
3.helm安装是否正常
4.到这报错 可能就是拉不到镜像可以去你的node手动pull试下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants