[ 
https://issues.apache.org/jira/browse/METRON-1503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16434299#comment-16434299
 ] 

ASF GitHub Bot commented on METRON-1503:
----------------------------------------

Github user nickwallen commented on a diff in the pull request:

    https://github.com/apache/metron/pull/975#discussion_r180839113
  
    --- Diff: 
metron-platform/metron-solr/src/main/java/org/apache/metron/solr/dao/SolrSearchDao.java
 ---
    @@ -176,19 +179,23 @@ private SolrQuery buildSearchRequest(
           facetFields.get().forEach(query::addFacetField);
         }
     
    -    String collections = 
searchRequest.getIndices().stream().collect(Collectors.joining(","));
    -    query.set("collection", collections);
    +    query.set("collection", getCollections(searchRequest.getIndices()));
    --- End diff --
    
    This is the key fix for the bug that you found.  When I comment this out 
and run the tests, the integration test does fail, which is great.  
    
    Unfortunately, I would have expected the `SolrSearchDaoTest` to fail too, 
but it did not.  If you think it is easy enough to fail a unit test on this 
condition, it would be a good add.  


> Alerts are not getting populated in alerts UI when search engine is Solr
> ------------------------------------------------------------------------
>
>                 Key: METRON-1503
>                 URL: https://issues.apache.org/jira/browse/METRON-1503
>             Project: Metron
>          Issue Type: Bug
>            Reporter: Ryan Merriman
>            Assignee: Ryan Merriman
>            Priority: Major
>
> When navigating to the Alerts UI no alerts are displayed.  REST is returning 
> this error on a search call:
> {{Mar 27, 2018 6:51:50 AM org.apache.catalina.core.StandardWrapperValve 
> invoke SEVERE: Servlet.service() for servlet [dispatcherServlet] in context 
> with path [] threw exception [Request processing failed; nested exception is 
> org.apache.solr.common.SolrException: Collection not found: websphere] with 
> root cause org.apache.solr.common.SolrException: Collection not found: 
> websphere at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.getCollectionNames(CloudSolrClient.java:1401)
>  at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.requestWithRetryOnStaleState(CloudSolrClient.java:1094)
>  at 
> org.apache.solr.client.solrj.impl.CloudSolrClient.request(CloudSolrClient.java:1073)
>  at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:160) at 
> org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:942) at 
> org.apache.solr.client.solrj.SolrClient.query(SolrClient.java:957) at 
> org.apache.metron.solr.dao.SolrSearchDao.search(SolrSearchDao.java:89) at 
> org.apache.metron.solr.dao.SolrDao.search(SolrDao.java:90) at 
> org.apache.metron.solr.dao.SolrMetaAlertDao.search(SolrMetaAlertDao.java:89) 
> at 
> org.apache.metron.rest.service.impl.SearchServiceImpl.search(SearchServiceImpl.java:73)
>  at 
> org.apache.metron.rest.controller.SearchController.search(SearchController.java:54)
>  at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source) at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498) at 
> org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
>  at 
> org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
>  at 
> org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:114)
>  at 
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
>  at 
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
>  at 
> org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
>  at 
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
>  at 
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
>  at 
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
>  at 
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:872)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at 
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
>  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
>  at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
>  at 
> org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to