Search code examples
javaspringsolrpostgresql-9.4dspace

Users can't search on DSpace after log in (Upgrade DSpace 6.0)


We have migrated from DSpace 4.1 to DSpace 6.0 and after the migration, our users (excepts Admins) can't search, see items, collections, communities. Without login on, everything is available, but they disappear avec logging on.

Before :

Before

After:

After

DSpace log :

2017-07-10 07:56:18,782 ERROR org.dspace.browse.ItemCountDAOSolr @ caught exception:
 org.dspace.discovery.SearchServiceException: Error executing query
     at org.dspace.discovery.SolrServiceImpl.search(SolrServiceImpl.java:1711)
     at org.dspace.browse.ItemCountDAOSolr.loadCount(ItemCountDAOSolr.java:138)
     at org.dspace.browse.ItemCountDAOSolr.getCount(ItemCountDAOSolr.java:81)
     at org.dspace.browse.ItemCounter.getCount(ItemCounter.java:85)
     at org.dspace.app.xmlui.aspect.artifactbrowser.CommunityBrowser.getValidity(CommunityBrowser.java:169)
     at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:606)
     at org.apache.cocoon.core.container.spring.avalon.PoolableProxyHandler.invoke(PoolableProxyHandler.java:71)
     at com.sun.proxy.$Proxy153.getValidity(Unknown Source)

Catalina-daemon.out log :

 14-Jun-2017 14:20:05.231 INFO [http-nio-8080-exec-7] org.apache.coyote.http11.AbstractHttp11Processor.process Error parsing HTTP request header
  Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
  java.lang.IllegalArgumentException: Request header is too large
     at org.apache.coyote.http11.InternalNioInputBuffer.fill(InternalNioInputBuffer.java:111)
     at org.apache.coyote.http11.AbstractNioInputBuffer.parseRequestLine(AbstractNioInputBuffer.java:268)
     at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1045)
     at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:684)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1533)
     at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1489)
     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
     at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
     at java.lang.Thread.run(Thread.java:745)

Specs :

  • Postgresql : 9.4.11
  • DSpace : 6.0
  • Ubuntu : 14.04
  • Solr : 4.10.4

Solution

  • It turns out, it was the header. We had too many communities and collections and DSpace send them all to solr in http header (don't know why). The header was too large and the http request failed. We increased the maxhttpRequestHeader in tomcat and everything is working properly now.

    <Connector protocol="org.apache.coyote.http11.Http11NioProtocol" 
        port="8443" maxThreads="200" 
        scheme="https" proxyPort="443" 
        maxHttpHeaderSize="65536"/>