ITADN

[BUG] 当修改一个使用了服务发现的监控时,后台会抛异常

#4100Openpentium100 创建于 2026-03-29
bug
P
pentium100commented
### Is there an existing issue for this? - [x] I have searched the existing issues ### Current Behavior [BUG] 当修改一个使用了服务发现的监控时,后台会抛异常 2026-03-29 15:22:10 [http-nio-1157-exec-1] ERROR org.apache.hertzbeat.manager.support.GlobalExceptionHandler - [monitor]-[unknown error happen]-null java.lang.NullPointerException at java.base/java.util.Objects.requireNonNull(Objects.java:220) at java.base/java.util.ImmutableCollections$MapN.<init>(ImmutableCollections.java:1437) at java.base/java.util.Map.of(Map.java:1384) at org.apache.hertzbeat.manager.service.impl.MonitorServiceImpl.modifyMonitor(MonitorServiceImpl.java:418) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:565) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) 新建时不会,就是修改会。原因是修改的服务上没有处理scrape为service discovery时,instance为空的情况。 ### Expected Behavior _No response_ ### Steps To Reproduce 1. add any type of monitor 2. select nacos service discovery 3. fill nacos server information. 4. confirm it. 5. edit monitor. 6. don't change any thing , just save it. 7. you will got error. ### Environment ```markdown HertzBeat version(s): v1.8.0 ``` ### Debug logs _No response_ ### Anything else? _No response_
0 条评论