Skip to main content

When Solr is displaying results on the site, first step is to log in the server and check its status

● solr.service - LSB: Controls Apache Solr as a Service
     Loaded: loaded (/etc/init.d/solr; generated)
     Active: failed (Result: exit-code) since Wed 2024-04-17 23:22:52 UTC; 6h ago
       Docs: man:systemd-sysv-generator(8)

Apr 17 23:22:50 FRDC-Drupal-PROD systemd[1]: Starting LSB: Controls Apache Solr as a Service...
Apr 17 23:22:51 FRDC-Drupal-PROD su[750]: (to solr) root on none
Apr 17 23:22:51 FRDC-Drupal-PROD su[750]: pam_unix(su-l:session): session opened for user solr>
Apr 17 23:22:51 FRDC-Drupal-PROD su[750]: pam_unix(su-l:session): session closed for user solr
Apr 17 23:22:52 FRDC-Drupal-PROD systemd[1]: solr.service: Control process exited, code=exited>
Apr 17 23:22:52 FRDC-Drupal-PROD systemd[1]: solr.service: Failed with result 'exit-code'.
Apr 17 23:22:52 FRDC-Drupal-PROD systemd[1]: Failed to start LSB: Controls Apache Solr as a Se>

You might need to navigate to the directory where your Solr instance is installed, although this is not strictly necessary for restarting the service unless you have specific scripts in that directory. The default installation directory is usually /opt/solr or /var/solr, but this depends on how Solr was installed.

 

Stop Solr

You can stop Solr by running the following command

sudo service solr stop

Alternatively, if Solr was installed from a package, you might be able to use

sudo systemctl stop solr

 

Start Solr

After stopping, you can restart Solr by running:

sudo service solr start

Or, if you used systemctl to stop it:

sudo systemctl start solr

 

Check Status

To ensure Solr is running, you can check the status with:

sudo service solr status

Or:

sudo systemctl status solr

 

Restart Solr

sudo systemctl restart nginx

 

As the site has no results, there is no need to the Solr service.  Instead go with start Solr.

 

Response post starting / restarting Solr

● solr.service - LSB: Controls Apache Solr as a Service
     Loaded: loaded (/etc/init.d/solr; generated)
     Active: active (exited) since Thu 2024-04-18 06:09:03 UTC; 5s ago
       Docs: man:systemd-sysv-generator(8)
    Process: 77653 ExecStart=/etc/init.d/solr start (code=exited, status=0/SUCCESS)

Apr 18 06:08:58 FRDC-Drupal-PROD systemd[1]: Starting LSB: Controls Apache Solr as a Service...
Apr 18 06:08:58 FRDC-Drupal-PROD su[77655]: (to solr) root on none
Apr 18 06:08:58 FRDC-Drupal-PROD su[77655]: pam_unix(su-l:session): session opened for user so>
Apr 18 06:09:03 FRDC-Drupal-PROD systemd[1]: Started LSB: Controls Apache Solr as a Service.

 

Related articles

Andrew Fletcher01 May 2024
Common commands used in Ubuntu - in progress
A growing list of commands I've used and what they do in no specific ordersudo snap install bw ps aux | grep java whoami ip addr show uptime sudo apt update && sudo apt upgrade -y cat /etc/os-release sudo apt-get install needrestart sudo reboot sudo needrestart sudo ckan sysadmin...
Andrew Fletcher18 Mar 2024
Resolving CVE-2022-48624 less issue
To resolve the CVE-2022-48624 vulnerability on Ubuntu using Nginx, it's crucial to understand that the issue lies within the "less" package, not Nginx itself. The vulnerability affects "less" before version 606, where close_altfile in filename.c in less omits shell_quote calls for LESSCLOSE,...
Andrew Fletcher06 Mar 2024
Terminal command to find and replace
In many terminal text editors, you use find command as reference in Terminal commands - find.  How about find and replace.  This action depends on the specific text editor you're using in the terminal.  Here are a few common terminal text editors and how you can find and replace...