[
https://issues.apache.org/jira/browse/AMBARI-17758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15381057#comment-15381057
]
Hudson commented on AMBARI-17758:
---------------------------------
SUCCESS: Integrated in Ambari-trunk-Commit #5327 (See
[https://builds.apache.org/job/Ambari-trunk-Commit/5327/])
AMBARI-17758. LogSearch Integration NullPointerException when LogSearch
(rnettleton:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=200778b425563de6e4b5a88e7fb2614dbae8178d])
*
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalService.java
*
ambari-server/src/main/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProvider.java
*
ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LoggingSearchPropertyProviderTest.java
*
ambari-server/src/test/java/org/apache/ambari/server/controller/logging/LogSearchDataRetrievalServiceTest.java
*
ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
> LogSearch Integration NullPointerException when LogSearch connection not
> available
> ----------------------------------------------------------------------------------
>
> Key: AMBARI-17758
> URL: https://issues.apache.org/jira/browse/AMBARI-17758
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 2.4.0
> Reporter: Robert Nettleton
> Assignee: Robert Nettleton
> Priority: Critical
> Fix For: 2.4.0
>
> Attachments: AMBARI-17758.patch
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> The following NullPointerException can occur intermittently in the LogSearch
> integration code in the Ambari REST layer:
> {code}
> java.lang.NullPointerException
> at
> org.apache.ambari.server.controller.logging.LogSearchDataRetrievalService.getLogFileTailURI(LogSearchDataRetrievalService.java:159)
> at
> org.apache.ambari.server.controller.logging.LoggingSearchPropertyProvider.populateResources(LoggingSearchPropertyProvider.java:92)
> at
> org.apache.ambari.server.controller.internal.ClusterControllerImpl.populateResources(ClusterControllerImpl.java:155)
> at
> org.apache.ambari.server.api.query.QueryImpl.queryForSubResources(QueryImpl.java:500)
> at
> org.apache.ambari.server.api.query.QueryImpl.queryForSubResources(QueryImpl.java:503)
> at
> org.apache.ambari.server.api.query.QueryImpl.queryForResources(QueryImpl.java:454)
> at
> org.apache.ambari.server.api.query.QueryImpl.execute(QueryImpl.java:222)
> at
> org.apache.ambari.server.api.handlers.ReadHandler.handleRequest(ReadHandler.java:77)
> at
> org.apache.ambari.server.api.services.BaseRequest.process(BaseRequest.java:145)
> at
> org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:126)
> at
> org.apache.ambari.server.api.services.BaseService.handleRequest(BaseService.java:90)
> at
> org.apache.ambari.server.api.services.ClusterService.getCluster(ClusterService.java:91)
> at sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
> {code}
> While the code that calls the LogSearchDataRetrievalService already has a
> check to determine if the LoggingRequestHelper is available (non-null), there
> is a change that a service might be stopped or crashes unexpected in between
> the initial check and this call.
> This is usually an intermittent exception.
> The LogSearchDataRetrievalService should be updated to include a check for
> null when attempting to access the LoggingRequestHelper implementation.
> I'm working on a fix for this, and will be submitting a patch shortly.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)