[ckan-dev] Error running solr in a container

John Jediny - XAAB john.jediny at gsa.gov
Wed May 25 13:48:44 UTC 2016


Derek,

Can you try using this ckan v2.3/2.4 compatible solr docker container and
see if you get the same results?
https://github.com/GSA/catalog-solr

https://github.com/GSA/catalog-app

On Wed, May 25, 2016 at 5:55 AM, Derek Hohls <dhohls at csir.co.za> wrote:

> Hi
>
> Hope the list can help with this problem...
>
> I have setup and run a full CKAN install without problems in a VM.
>
> Now I am trying to run solr in a separate container.  I have done this,
> using the Docker image from https://hub.docker.com/r/idguk/docker-solr/
> (the official solr Docker could not be used as it does not support the very
> old version - 3.6 -  which is used by CKAN). The Docker is linked, via the
> "-v" option, to the `schema.xml` file sourced from
> `python-ckan_2.5-trusty_amd64.deb`.
>
> However, calling:
>
>     ckan db init
>
> triggers off an error; specifically this:
>
> Traceback (most recent call last):
>   File "/usr/lib/ckan/default/src/ckan/ckan/lib/search/common.py", line
> 51, in is_available
>     conn.query("*:*", rows=1)
>   File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/solr/core.py",
> line 703, in query
>     return self.select(*args, **params)
>   File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/solr/core.py",
> line 798, in __call__
>     xml = self.raw(**params)
>   File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/solr/core.py",
> line 823, in raw
>     rsp = conn._post(self.selector, request, conn.form_headers)
>   File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/solr/core.py",
> line 639, in _post
>     return check_response_status(self.conn.getresponse())
>   File
> "/usr/lib/ckan/default/local/lib/python2.7/site-packages/solr/core.py",
> line 1097, in check_response_status
>     raise ex
>
> On checking the `solr/core.py` file, it seems as if its the call to
> `solr/select/` that triggers the issue.
>
> Access via a browser to this URL (the container version of solr) shows a
> Java error:
>
> java.lang.NullPointerException
>     at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:92)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>     at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)
>     at
> org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:306)
>     at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
>     at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
>     at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>     at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
>     at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
>     at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
>     at
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
>     at
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>     at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>     at org.mortbay.jetty.Server.handle(Server.java:326)
>     at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
>     at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
>     at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
>     at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>     at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>     at
> org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
>     at
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
>
> But in the VM-version of solr, the same call generates an XML document:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
>     <lst name="responseHeader">
>     <int name="status">0</int>
>     <int name="QTime">1</int>
>     <lst name="params"/></lst>
>     <result name="response" numFound="0" start="0"/>
> </response>
>
> I'd appreciate if anyone could highlight what I have missed in the
> configuration that could cause this error.
>
> Thanks
> Derek
>
>
> --
> This message is subject to the CSIR's copyright terms and conditions,
> e-mail legal notice, and implemented Open Document Format (ODF) standard.
> The full disclaimer details can be found at
> http://www.csir.co.za/disclaimer.html.
>
>
> This message has been scanned for viruses and dangerous content by
> *MailScanner* <http://www.mailscanner.info/>,
> and is believed to be clean.
>
>
> Please consider the environment before printing this email.
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>


-- 
Chief Data Engineer
202-341-0191
@Data.gov
@Office of Citizen Science and Innovative Technologies/18F
<http://www.gsa.gov/portal/category/25729>
General Services Administration

Work in the Open... ideate, innovate, iterate...
@github <https://github.com/JJediny> | @projectopendata
<https://github.com/project-open-data>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20160525/05ec7e96/attachment-0003.html>


More information about the ckan-dev mailing list