Both sides previous revisionPrevious revision | Last revisionBoth sides next revision |
administration:starting_and_stopping_solr [2023/03/10 12:02] – Reduce redundant systemd examples; recommend systemd for limit fix. demiankatz | administration:starting_and_stopping_solr [2023/10/24 13:44] – demiankatz |
---|
====== Starting and Stopping Solr ====== | ====== Starting and Stopping Solr ====== |
| |
Once VuFind is installed, it will only respond to search requests if its Solr back-end is active (unless, of course, you are relying on a third-party discovery service instead of a local index, in which case you can disregard this page entirely). This page explains how to turn Solr on and off and how to automate the process if you wish. | Once VuFind® is installed, it will only respond to search requests if its Solr back-end is active (unless, of course, you are relying on a third-party discovery service instead of a local index, in which case you can disregard this page entirely). This page explains how to turn Solr on and off and how to automate the process if you wish. |
| |
===== Starting Solr Manually ===== | ===== Starting Solr Manually ===== |
==== Linux Method ==== | ==== Linux Method ==== |
| |
To start Solr under Linux, just switch to the directory where you installed VuFind (i.e. $VUFIND_HOME) and run this command: | To start Solr under Linux, just switch to the directory where you installed VuFind® (i.e. $VUFIND_HOME) and run this command: |
| |
./solr.sh start | ./solr.sh start |
chmod +x solr.sh | chmod +x solr.sh |
| |
:!: Prior to VuFind 3.0, solr.sh was named vufind.sh; be sure to use the command appropriate for your version. | :!: Prior to VuFind® 3.0, solr.sh was named vufind.sh; be sure to use the command appropriate for your version. |
| |
Note: If you previously rebooted your system without manually stopping Solr, the script may mistakenly believe that it is still running. In this case, a [[starting_and_stopping_solr#restarting_solr_manually|manual restart]] should solve the problem. | Note: If you previously rebooted your system without manually stopping Solr, the script may mistakenly believe that it is still running. In this case, a [[starting_and_stopping_solr#restarting_solr_manually|manual restart]] should solve the problem. |
==== Windows Method ==== | ==== Windows Method ==== |
| |
VuFind includes a Windows batch file to run Solr. Just follow these steps: | VuFind® includes a Windows batch file to run Solr. Just follow these steps: |
| |
* At a command prompt, switch to your VuFind directory. | * At a command prompt, switch to your VuFind® directory. |
* Type: solr start | * Type: solr start |
| |
Note that some of the scripting for this command is created automatically as part of the install.bat setup process. If you did not install VuFind using install.bat, the command may not work. You can re-run the install process to solve the problem. | Note that some of the scripting for this command is created automatically as part of the install.bat setup process. If you did not install VuFind® using install.bat, the command may not work. You can re-run the install process to solve the problem. |
| |
:!: Prior to VuFind 3.0, solr.bat was named vufind.bat; be sure to use the command appropriate for your version. Prior to VuFind 1.0RC2, Windows support was not included. | :!: Prior to VuFind® 3.0, solr.bat was named vufind.bat; be sure to use the command appropriate for your version. Prior to VuFind® 1.0RC2, Windows support was not included. |
| |
===== Stopping Solr Manually ===== | ===== Stopping Solr Manually ===== |
==== Linux Method ==== | ==== Linux Method ==== |
| |
To take the server offline, switch to the VuFind directory and type: | To take the server offline, switch to the VuFind® directory and type: |
| |
./solr.sh stop | ./solr.sh stop |
| |
:!: Prior to VuFind 3.0, solr.sh was named vufind.sh; be sure to use the command appropriate for your version. | :!: Prior to VuFind® 3.0, solr.sh was named vufind.sh; be sure to use the command appropriate for your version. |
| |
==== Windows Method ==== | ==== Windows Method ==== |
| |
When using VuFind 3.0 or newer, you can stop Solr from the command line in Windows: | When using VuFind® 3.0 or newer, you can stop Solr from the command line in Windows: |
| |
* At a command prompt, switch to your VuFind directory. | * At a command prompt, switch to your VuFind® directory. |
* Type: solr stop | * Type: solr stop |
| |
In VuFind 2.x or earlier, to stop a manually-started Solr instance under Windows, open the command prompt window where the server is running and hit Ctrl-C. This will cause the process to shut down. | In VuFind® 2.x or earlier, to stop a manually-started Solr instance under Windows, open the command prompt window where the server is running and hit Ctrl-C. This will cause the process to shut down. |
| |
===== Restarting Solr Manually ===== | ===== Restarting Solr Manually ===== |
==== Linux Method ==== | ==== Linux Method ==== |
| |
Restarting Solr under Linux is much the same as starting it. Just switch to the VuFind directory and type: | Restarting Solr under Linux is much the same as starting it. Just switch to the VuFind® directory and type: |
| |
./solr.sh restart | ./solr.sh restart |
| |
:!: Prior to VuFind 3.0, solr.sh was named vufind.sh; be sure to use the command appropriate for your version. | :!: Prior to VuFind® 3.0, solr.sh was named vufind.sh; be sure to use the command appropriate for your version. |
| |
==== Windows Method ==== | ==== Windows Method ==== |
| |
When using VuFind 3.0 or newer, you can restart Solr from the command line in Windows: | When using VuFind® 3.0 or newer, you can restart Solr from the command line in Windows: |
| |
* At a command prompt, switch to your VuFind directory. | * At a command prompt, switch to your VuFind® directory. |
* Type: solr restart | * Type: solr restart |
| |
In VuFind 2.x and earlier, there is no graceful way to restart a manually-started Solr instance under Windows. Just follow the manual "stop" and "start" procedures described above. | In VuFind® 2.x and earlier, there is no graceful way to restart a manually-started Solr instance under Windows. Just follow the manual "stop" and "start" procedures described above. |
| |
===== Killing an Unresponsive Solr Process ===== | ===== Killing an Unresponsive Solr Process ===== |
</code> | </code> |
| |
The above example should work for VuFind 7.0 and later using the official VuFind deb package (this has been tested on Ubuntu). For compatibility with VuFind 3.0 through 6.0, simply change "solr-8983.pid" to "solr-8080.pid" to reflect a different default Solr port number. For older versions of VuFind, a different script is needed; click the "Old revisions" link below to find historical documentation. | The above example should work for VuFind® 7.0 and later using the official VuFind® deb package (this has been tested on Ubuntu). For compatibility with VuFind® 3.0 through 6.0, simply change "solr-8983.pid" to "solr-8080.pid" to reflect a different default Solr port number. For older versions of VuFind®, a different script is needed; click the "Old revisions" link below to find historical documentation. |
| |
Be sure to adjust paths in the code above to match your local system. | Be sure to adjust paths in the code above to match your local system. |
==== Windows Method ==== | ==== Windows Method ==== |
| |
As of VuFind 3.0, Solr can be started as a background process from the command line, so it should be possible manage it from within Windows; however, detailed instructions and best practices have not been developed as of this writing. Please feel free to contribute your own recommendations! | As of VuFind® 3.0, Solr can be started as a background process from the command line, so it should be possible manage it from within Windows; however, detailed instructions and best practices have not been developed as of this writing. Please feel free to contribute your own recommendations! |
| |
===== Taking the User Interface Offline ===== | ===== Taking the User Interface Offline ===== |
| |
If you simply stop the Solr server, users attempting to access your VuFind site will encounter error messages. If you are planning an outage, you can take the site more gracefully offline by adjusting the "available" setting in the "[System]" section of your [[configuration:files:config.ini]] file. | If you simply stop the Solr server, users attempting to access your VuFind® site will encounter error messages. If you are planning an outage, you can take the site more gracefully offline by adjusting the "available" setting in the "[System]" section of your [[configuration:files:config.ini]] file. |
---- struct data ---- | ---- struct data ---- |
properties.Page Owner : | properties.Page Owner : |
---- | ---- |
| |