Andrew Fletcher published: 3 August 2022 2 minutes read
The following the CKAN source install docs from start to finish including solr. At this point, the site should load but you'll get solr errors. Make the following solr updates:
Go the the directory
/etc/systemd/system
Check if there is a directory jetty9.service.d. In my situation there was, but if it doesn't exist
sudo mkdir /etc/systemd/system/jetty9.service.d
Now review or add a file solr.conf with
[Service]
ReadWritePaths=/var/lib/solr
sudo nano /etc/solr/solr-jetty.xml and replace with
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- Context configuration file for the Solr web application in Jetty -->
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<Set name="contextPath">/solr</Set>
<Set name="war">/usr/share/solr/web</Set>
<!-- Set the solr.solr.home system property -->
<Call name="setProperty" class="java.lang.System">
<Arg type="String">solr.solr.home</Arg>
<Arg type="String">/usr/share/solr</Arg>
</Call>
<!-- Enable symlinks -->
<!-- Disabled due to being deprecated
<Call name="addAliasCheck">
<Arg>
<New class="org.eclipse.jetty.server.handler.ContextHandler$ApproveSameSuffixAliases"/>
</Arg>
</Call>
-->
</Configure>
Restart jetty9
systemctl daemon-reload
sudo service jetty9 restart
If the command 'systemctl daemon-reload', requires a password and you don't have it try
sudo reboot
Finally you might need to edit the port from 8080 to 8983
/etc/jetty9/start.ini
And change
# What host to listen on (leave commented to listen on all interfaces)
#jetty.host=myhost.com
# HTTP port to listen on
# Enable authbind in /etc/default/jetty9 to use a port lower than 1024
jetty.port=8080
# HTTP idle timeout in milliseconds
http.timeout=30000
Changing jetty.port=8983, as follows
# HTTP port to listen on
# Enable authbind in /etc/default/jetty9 to use a port lower than 1024
jetty.port=8983
Related articles
Andrew Fletcher
•
28 Aug 2024
Troubleshooting PHP 8.3 mbstring issues on Ubuntu with Nginx
Maintaining a Drupal site is usually smooth sailing once the environment is properly set up. However, even in a stable environment, updates to modules can sometimes reveal underlying configuration issues that weren't apparent before. This was the case when I updated a contrib module on a Drupal 10.3...
Andrew Fletcher
•
26 Jun 2024
Upgrading Nginx on Ubuntu to due vulnerabilities CVE-2024-32002, CVE-2024-32004 and CVE-2024-32465
The current Nginx version running is 1.18.0. It seems like the Nginx version from the default Ubuntu repositories is still 1.18.0, which might not have the latest security patches. To resolve this, you can add the official Nginx repository to get the latest stable version. 1. Backup your...
Andrew Fletcher
•
09 Jun 2024
Overcoming startup challenges with Apache Solr on Ubuntu 24.04
Recently, after upgrading to Ubuntu 24.04, we encountered a significant challenge with our Apache Solr service—it refused to restart. This post documents the steps I took to diagnose and resolve the issues, providing a clear guide for anyone facing similar troubles. Initial troubleshootingThe...