[ 
https://issues.apache.org/jira/browse/AMBARI-24750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Zhiguo Wu updated AMBARI-24750:
-------------------------------
    Fix Version/s: 2.8.0

> HTTP 500 internal server error caused by NPE when trying to set loglevel in 
> logsearch
> -------------------------------------------------------------------------------------
>
>                 Key: AMBARI-24750
>                 URL: https://issues.apache.org/jira/browse/AMBARI-24750
>             Project: Ambari
>          Issue Type: Bug
>          Components: logsearch
>    Affects Versions: 2.7.1
>            Reporter: Péter Gergő Barna
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.8.0, 2.7.3
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> This request sometimes returns HTTP 500 internal server error:
>  
> {noformat}
> curl -vv -X PUT --header 'Content-Type: application/json' --header 'Accept: 
> application/json' --header 'Authorization: Basic YWRtaW46YWRtaW4=' -d 
> '{"filter":{"storm_worker_event":{"hosts":[],"defaultLevels":["FATAL","ERROR","WARN","INFO","DEBUG","TRACE","UNKNOWN"],"expiryTime":null,"label":"storm_worker_event","overrideLevels":[]}}}'
>  
> 'http://my.host:61888/api/v1/shipper/filters/streamline-181008-150631-i7y-1/level'{noformat}
>  
> a corresponding entry appears in this log  
> ambari-logsearch-portal/logsearch.json:
>  
>  
> {noformat}
> {"level":"WARN","file":"ShipperConfigManager.java","thread_name":"qtp1188445627-1735","line_number":142,"logger_name":"org.apache.ambari.logsearch.manager.ShipperConfigManager","logtime":"1539020343816","log_message":"Could
>  not update log level filters java.lang.NullPointerException at 
> org.apache.ambari.logsearch.config.zookeeper.LogLevelFilterManagerZK.setLogLevelFilters(LogLevelFilterManagerZK.java:86)
>  at 
> org.apache.ambari.logsearch.manager.ShipperConfigManager.setLogLevelFilters(ShipperConfigManager.java:138)
>  at 
> org.apache.ambari.logsearch.rest.ShipperConfigResource.setLogLevelFilter(ShipperConfigResource.java:122)
>  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:498) at 
> org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
>  at 
> org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
>  at 
> org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
>  at 
> org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160)
>  at 
> org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
>  at 
> org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
>  at 
> org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
>  at 
> org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
>  at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) 
> at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at 
> org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at 
> org.glassfish.jersey.internal.Errors.process(Errors.java:315) at 
> org.glassfish.jersey.internal.Errors.process(Errors.java:297) at 
> org.glassfish.jersey.internal.Errors.process(Errors.java:267) at 
> org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
>  at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) 
> at 
> org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
>  at 
> org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473) 
> at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427) 
> at 
> org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
>  at 
> org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
>  at 
> org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
>  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865) at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
>  at 
> org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:215)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
>  at 
> org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
>  at 
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
>  at 
> org.apache.ambari.logsearch.web.filters.LogSearchLogLevelFilterManagerFilter.doFilter(LogSearchLogLevelFilterManagerFilter.java:79)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
>  at 
> org.apache.ambari.logsearch.web.filters.LogSearchConfigStateFilter.doFilter(LogSearchConfigStateFilter.java:83)
>  at 
> org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
>  
> {noformat}
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org

Reply via email to