ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitro Lisnichenko" <dlysniche...@hortonworks.com>
Subject Re: Review Request 40598: Pre-upgrade checks sometimes fail with NullPointerException
Date Mon, 23 Nov 2015 15:20:19 GMT


> On Nov. 23, 2015, 5:07 p.m., Jonathan Hurley wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java,
lines 317-319
> > <https://reviews.apache.org/r/40598/diff/1/?file=1137386#file1137386line317>
> >
> >     Unless we're constructing these in-memory / on-the-fly, then these come directly
from the XML, right? I don't see how they can be null intermittently. 
> >     
> >     With that said, this isn't a bad check, but I'd like a log statement here as
well. It will help for developers to see the error if it happens so we might be able to actually
fix the root cause and not just mask it with an if-statement.

As I remember, both upgrade processes for 2.2->2.3 (4 hosts, HDFS+ZK+AMS) had 1 failed
pre-upgrade check, that became ok after some time after I closed the dialog with error. Probably
I was viewing a EU pre-upgrade check error dialog. EU generates in-memory tasks.

Adding logging statement is a good idea. I'll probably add it with an WARN level to make sure
it is not going to become lost in log output.


- Dmitro


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40598/#review107589
-----------------------------------------------------------


On Nov. 23, 2015, 4:56 p.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40598/
> -----------------------------------------------------------
> 
> (Updated Nov. 23, 2015, 4:56 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Jayush Luniya, and Nate
Cole.
> 
> 
> Bugs: AMBARI-14014
>     https://issues.apache.org/jira/browse/AMBARI-14014
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Got 500 - unexpected error on server during pre-upgrade check
> {code}
> 22 Nov 2015 19:21:31,505 ERROR [qtp-client-27] MetricsRequestHelper:96 - Error getting
timeline metrics : Connection refused
> 22 Nov 2015 19:28:05,249 ERROR [qtp-client-24] CheckHelper:72 - Check HOSTS_MASTER_MAINTENANCE
failed
> java.lang.NullPointerException
> at org.apache.ambari.server.state.stack.UpgradePack.getTasks(UpgradePack.java:317)
> at org.apache.ambari.server.checks.HostsMasterMaintenanceCheck.perform(HostsMasterMaintenanceCheck.java:85)
> at org.apache.ambari.server.state.CheckHelper.performChecks(CheckHelper.java:61)
> at org.apache.ambari.server.controller.internal.PreUpgradeCheckResourceProvider.getResources(PreUpgradeCheckResourceProvider.java:194)
> at org.apache.ambari.server.controller.internal.ClusterControllerImpl$ExtendedResourceProviderWrapper.queryForResources(ClusterControllerImpl.java:945)
> at org.apache.ambari.server.controller.internal.ClusterControllerImpl.getResources(ClusterControllerImpl.java:132)
> at org.apache.ambari.server.api.query.QueryImpl.doQuery(QueryImpl.java:508)
> at org.apache.ambari.server.api.query.QueryImpl.queryForResources(QueryImpl.java:380)
> at org.apache.ambari.server.api.query.QueryImpl.execute(QueryImpl.java:216)
> at org.apache.ambari.server.api.handlers.ReadHandler.handleRequest(ReadHandler.java:68)
> at org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:135)
> at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:106)
> at org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:75)
> at org.apache.ambari.server.api.services.PreUpgradeCheckService.getPreUpgradeChecks(PreUpgradeCheckService.java:62)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
> at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205)
> at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
> at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
> at com.sun.jersey.server.impl.uri.rules.SubLocatorRule.accept(SubLocatorRule.java:137)
> at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
> at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
> at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
> at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542)
> at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473)
> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419)
> at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1409)
> at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:409)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:540)
> at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:715)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
> at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.apache.ambari.server.security.authorization.AmbariAuthorizationFilter.doFilter(AmbariAuthorizationFilter.java:196)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
> at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
> {code}
> 
> I reproduced this issue only once, so it seems to be intermittent.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/UpgradePack.java bee219a

> 
> Diff: https://reviews.apache.org/r/40598/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message