Wei-Chiu Chuang created HDDS-8194: ------------------------------------- Summary: OzoneManager.getRatisRoles() throws NPE because the ratis role is undetermined Key: HDDS-8194 URL: https://issues.apache.org/jira/browse/HDDS-8194 Project: Apache Ozone Issue Type: Bug Reporter: Wei-Chiu Chuang
The OM is undergoing leader election: {noformat} 2023-03-14 17:28:19,826 INFO org.apache.ratis.server.impl.RoleInfo: om1: start om1@group-9F198C4C3682-LeaderElection4 2023-03-14 17:28:19,829 INFO org.apache.ratis.server.impl.LeaderElection: om1@group-9F198C4C3682-LeaderElection4 PRE_VOTE round 0: submit vote requests at term 16 for 344159: peers:[om1|rpc:hb2-cf4-2.hb2-cf4.root.hwx.site:9872|admin:|client:|dataStream:|priority:0|startupRole:FOLLOWER, om3|rpc:hb2-cf4-8.hb2-cf4.root.hwx.site:9872|ad min:|client:|dataStream:|priority:0|startupRole:FOLLOWER, om2|rpc:hb2-cf4-6.hb2-cf4.root.hwx.site:9872|admin:|client:|dataStream:|priority:0|startupRole:FOLLOWER]|list eners:[], old=null 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.LeaderElection: om1@group-9F198C4C3682-LeaderElection4 got exception when requesting votes: java.util.concurr ent.ExecutionException: org.apache.ratis.thirdparty.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.LeaderElection: om1@group-9F198C4C3682-LeaderElection4 got exception when requesting votes: java.util.concurr ent.ExecutionException: org.apache.ratis.thirdparty.io.grpc.StatusRuntimeException: UNAVAILABLE: io exception 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.LeaderElection: om1@group-9F198C4C3682-LeaderElection4: PRE_VOTE REJECTED received 0 response(s) and 2 except ion(s): 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.LeaderElection: Exception 0: java.util.concurrent.ExecutionException: org.apache.ratis.thirdparty.io.grpc.S tatusRuntimeException: UNAVAILABLE: io exception 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.LeaderElection: Exception 1: java.util.concurrent.ExecutionException: org.apache.ratis.thirdparty.io.grpc.S tatusRuntimeException: UNAVAILABLE: io exception 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.LeaderElection: om1@group-9F198C4C3682-LeaderElection4 PRE_VOTE round 0: result REJECTED 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.RaftServer$Division: om1@group-9F198C4C3682: changes role from CANDIDATE to FOLLOWER at term 16 for REJECTED 2023-03-14 17:28:19,833 INFO org.apache.ratis.server.impl.RoleInfo: om1: shutdown om1@group-9F198C4C3682-LeaderElection4 2023-03-14 17:28:19,834 INFO org.apache.ratis.server.impl.RoleInfo: om1: start om1@group-9F198C4C3682-FollowerState {noformat} {noformat} 2023-03-14 17:28:21,495 ERROR org.apache.hadoop.jmx.JMXJsonServlet: getting attribute RatisRoles of Hadoop:service=OzoneManager,name=OzoneManagerInfo,component=ServerR untime threw an exception javax.management.RuntimeMBeanException: java.lang.NullPointerException at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:651) at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678) at org.apache.hadoop.jmx.JMXJsonServlet.writeAttribute(JMXJsonServlet.java:338) at org.apache.hadoop.jmx.JMXJsonServlet.listBeans(JMXJsonServlet.java:316) at org.apache.hadoop.jmx.JMXJsonServlet.doGet(JMXJsonServlet.java:210) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:799) at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1626) at org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter.doFilter(StaticUserWebFilter.java:110) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.apache.hadoop.hdds.server.http.HttpServer2$QuotingInputFilter.doFilter(HttpServer2.java:1681) at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601) at org.apache.hadoop.hdds.server.http.NoCacheFilter.doFilter(NoCacheFilter.java:48) ... Caused by: java.lang.NullPointerException at org.apache.hadoop.ozone.om.OzoneManager.getRatisRoles(OzoneManager.java:2925) at sun.reflect.GeneratedMethodAccessor192.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:193) at com.sun.jmx.mbeanserver.ConvertingMethod.invokeWithOpenReturn(ConvertingMethod.java:175) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:117) at com.sun.jmx.mbeanserver.MXBeanIntrospector.invokeM2(MXBeanIntrospector.java:54) at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) at com.sun.jmx.mbeanserver.PerInterface.getAttribute(PerInterface.java:83) at com.sun.jmx.mbeanserver.MBeanSupport.getAttribute(MBeanSupport.java:206) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:647) ... 53 more {noformat} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org For additional commands, e-mail: issues-h...@ozone.apache.org