Problem
After doing some updates Jetty can no longer find Solr when trying to run CKAN on Ubuntu 18.04. A fresh install of CKAN is not working in development or prod.
This is using the 3.6.2+dfsg-18~18.04
package.
I can tell Jetty9 is running but it can't find solr.
Any help or pointers would be great.
Error Message
WARNI [pysolr] Unable to extract error message from invalid XML: mismatched tag: line 10, column 2
ERROR [pysolr] Solr responded with an error (HTTP 404): [Reason: None]
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><title>Error 404 Not Found</title></head><body><h2>HTTP ERROR 404</h2><p>Problem accessing /solr/select/. Reason:<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.15.v20190215</a><hr/></body></html>
ERROR [ckan.controllers.package] Dataset search error: ('SOLR returned an error running query: {\'sort\': \'score desc, metadata_modified desc\', \'fq\': [u\'\', u\'+site_id:"default"\', \'+state:active\', u\'+permission_labels:("public" OR "creator-aedc3c62-8492-48b7-9640-0c362bb2b537")\'], \'facet.mincount\': 1, \'rows\': 21, \'facet.field\': [u\'organization\', u\'groups\', u\'tags\', u\'res_format\', u\'license_id\'], \'facet.limit\': \'50\', \'facet\': \'true\', \'q\': \'*:*\', \'start\': 0, \'wt\': \'json\', \'fl\': \'id validated_data_dict\'} Error: SolrError(u\'Solr responded with an error (HTTP 404): [Reason: None]\\n<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8"/><title>Error 404 Not Found</title></head><body><h2>HTTP ERROR 404</h2><p>Problem accessing /solr/select/. Reason:<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.15.v20190215</a><hr/></body></html>\',)',)
INFO [ckan.lib.base] /dataset render time 0.079 seconds
Steps to Reproduce
- Create a new Ubuntu Server 18.04 LTS setup
- Follow the default source install documentation
- Start the server
paster serve /etc/ckan/default/development.ini
- Navigate to the
/dataset
page
Background
This was working in February without issues by following the docs (which includes the comment from here).
I have noticed that in the newest solr-jetty
package it adds the symlink by default which will mean the step to add this in the CKAN docs will fail as the symlink already exists. I've tried removing and adding it back to get the different permissions on the file with no luck.
Also, the first step under Solr setup instructs to update lines in the /etc/default/jetty
file that no longer exist. I believe these should be moved to /etc/jetty9/start.ini
but i've done both with no luck either.
UPDATES
- Tried downgrading the
solr-jetty
package but same result (however symlink step worked as that wasn't included in the previous package).sudo apt install libsolr-java=3.6.2+dfsg-11 solr-common=3.6.2+dfsg-11 solr-jetty=3.6.2+dfsg-11
sudo apt-get install python-dev postgresql libpq-dev python-pip python-virtualenv git-core redis-server
- Tried downgrading both solr-jetty and openjdk-8-jdk vs openjdk-11-jdk with same error:
sudo apt install libsolr-java=3.6.2+dfsg-11 solr-common=3.6.2+dfsg-11 solr-jetty=3.6.2+dfsg-11
sudo apt install openjdk-8-jdk
- Possibly permission issue similar to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919638
CURRENT SOLUTION
I'm not adding this as an answer as this just abandons using the solr-jetty
package which doesn't answer the question or how to get solr-jetty
to work. However, after getting solr-jetty
to work (see below answer) I've decided to switch to using this solution which uses solr directly.
- Follow CKAN docs steps 1-4
- Install solr 6.5.1 instead of ckan's step 5
- Continue on with step 6
<field name="metadata_modified" type="date" indexed="true" stored="true" multiValued="false"/>
, I have tried adding docValues = "true" as solr documentation suggests but it doesn't seem to work. Do you have an idea on how this should be or fixed ?