Warning: This page has not been updated in over over a year and may be outdated or deprecated.
administration:starting_and_stopping_solr
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
administration:starting_and_stopping_solr [2016/03/01 17:54] – [Linux Method] demiankatz | administration:starting_and_stopping_solr [2023/10/24 13:47] (current) – Removed notes about releases prior to 3.0. demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Starting and Stopping Solr ====== | ====== Starting and Stopping Solr ====== | ||
- | Once VuFind | + | :!: This page applies to VuFind® versions 3.0 and newer; if you are using a very old release, see the "Old revisions" |
+ | |||
+ | Once VuFind® | ||
===== Starting Solr Manually ===== | ===== Starting Solr Manually ===== | ||
+ | ==== Linux Method ==== | ||
+ | To start Solr under Linux, just switch to the directory where you installed VuFind® (i.e. $VUFIND_HOME) and run this command: | ||
- | ==== Linux Method ==== | + | ./solr.sh start |
- | To start Solr under Linux, just switch to the directory where you installed VuFind (i.e. $VUFIND_HOME) and run this command: | + | Note: If this doesn' |
- | | + | |
- | Note: If this doesn' | + | Note: If you previously rebooted your system without manually stopping Solr, the script may mistakenly believe |
- | chmod +x vufind.sh | + | === Limit Warnings === |
- | Note: If you previously rebooted your system without manually stopping VuFind, the script | + | Starting with Solr 7.3.1, |
- | ==== Windows Method ==== | + | < |
+ | *** [WARN] *** Your open file limit is currently 1024. | ||
+ | It should be set to 65000 to avoid operational disruption. | ||
+ | If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh | ||
+ | *** [WARN] *** Your Max Processes Limit is currently 15058. | ||
+ | It should be set to 65000 to avoid operational disruption. | ||
+ | If you no longer wish to see this warning, set SOLR_ULIMIT_CHECKS to false in your profile or solr.in.sh | ||
+ | </ | ||
- | Starting with VuFind 1.0RC2, VuFind includes a Windows batch file to run Solr. Just follow these steps: | + | This is warning of some default settings that could impact the performance of your Solr instance. They are unlikely |
- | * At a command prompt, switch | + | The best way to address the errors on Linux platforms using systemd is to start Solr through systemd and ensure that your [[# |
- | * Type: vufind start | + | |
- | Note that the vufind.bat file which allows this command to work is created automatically as part of the install.bat setup process. | + | On some Linux platforms, if systemd |
- | If you are using an earlier version | + | < |
+ | username | ||
+ | username | ||
+ | username | ||
+ | username | ||
+ | </ | ||
+ | |||
+ | (where " | ||
+ | |||
+ | It may be necessary | ||
+ | |||
+ | ==== Windows Method ==== | ||
+ | |||
+ | VuFind® includes a Windows batch file to run Solr. Just follow these steps: | ||
- | cd \vufind\solr\jetty\ | + | * At a command prompt, switch to your VuFind® directory. |
- | java -Dsolr.solr.home=c:\vufind\solr -Xmx1G -Xms1G -jar start.jar | + | * Type: solr start |
- | Note: The above command | + | Note that some of the scripting for this command |
===== Stopping Solr Manually ===== | ===== Stopping Solr Manually ===== | ||
Line 39: | Line 62: | ||
==== Linux Method ==== | ==== Linux Method ==== | ||
- | To take the server offline, switch to the VuFind | + | To take the server offline, switch to the VuFind® |
- | ./vufind.sh stop | + | ./solr.sh stop |
==== Windows Method ==== | ==== Windows Method ==== | ||
- | To stop a manually-started | + | You can stop Solr from the command |
- | If you are running Solr through Jetty as a service, you can stop the server through the Services control in the Administrative Tools area of Control Panel. | + | * At a command prompt, switch to your VuFind® directory. |
+ | * Type: solr stop | ||
===== Restarting Solr Manually ===== | ===== Restarting Solr Manually ===== | ||
Line 53: | Line 77: | ||
==== Linux Method ==== | ==== Linux Method ==== | ||
- | Restarting Solr under Linux is much the same as starting it. Just switch to the VuFind | + | Restarting Solr under Linux is much the same as starting it. Just switch to the VuFind® |
- | ./vufind.sh restart | + | ./solr.sh restart |
==== Windows Method ==== | ==== Windows Method ==== | ||
- | There is no graceful way to restart | + | You can restart Solr from the command line in Windows: |
- | If you are running Solr through Jetty as a service, you can restart the server through the Services control in the Administrative Tools area of Control Panel. | + | * At a command prompt, switch to your VuFind® directory. |
+ | * Type: solr restart | ||
===== Killing an Unresponsive Solr Process ===== | ===== Killing an Unresponsive Solr Process ===== | ||
Line 99: | Line 124: | ||
If you don't want to have to manually start and stop Solr every time you turn on or shut down your server, you can set it up to run automatically. | If you don't want to have to manually start and stop Solr every time you turn on or shut down your server, you can set it up to run automatically. | ||
+ | ==== Linux (systemd) Method ==== | ||
+ | // Thanks to [[https:// | ||
+ | Most modern flavors of Linux (such as CentOS 7 and newer) use [[https:// | ||
+ | To automate Solr with systemd: | ||
+ | * [[administration: | ||
+ | * add permission for the solr directory to this user if you have not already: | ||
- | ==== Linux (init.d) Method ==== | + | < |
- | You can set up Solr to run as a daemon. To do so, create | + | * create |
< | < | ||
- | #!/bin/sh | + | [Unit] |
- | ### BEGIN INIT INFO | + | After=network.target |
- | # Default-Start: | + | |
- | # Default-Stop: | + | |
- | # Description: | + | |
- | ### END INIT INFO | + | |
- | cd / | + | |
- | ./vufind.sh $* | + | |
- | </ | + | |
- | + | ||
- | // Note: The information in the INIT INFO block is only required for RedHat-style systems that use the chkconfig utility. | + | |
- | + | ||
- | // Note: If your VuFind instance is installed somewhere other than / | + | |
- | + | ||
- | Make sure that the script is executable (sudo may be needed on the command for some platforms): | + | |
- | + | ||
- | < | + | |
- | chmod +x / | + | |
- | </ | + | |
- | + | ||
- | You will then need to add the script to your runlevel configuration (generally found under / | + | |
- | + | ||
- | On RedHat (including Fedora): chkconfig --add vufind | + | |
- | On Debian (including Ubuntu): update-rc.d vufind defaults | + | |
- | + | ||
- | If this doesn' | + | |
- | + | ||
- | === Interacting with Solr After Automation === | + | |
- | + | ||
- | On some platforms, the " | + | |
- | + | ||
- | < | + | |
- | service vufind start | + | |
- | service vufind stop | + | |
- | service vufind restart | + | |
- | service vufind check | + | |
- | </ | + | |
- | + | ||
- | // | + | |
- | + | ||
- | If service is available, it is the preferred way of starting and stopping Solr after automation. | + | |
- | + | ||
- | ==== Linux (systemd) Method ==== | + | |
- | + | ||
- | // Thanks to [[https:// | + | |
- | + | ||
- | Some newer flavors of Linux (such as CentOS 7) use [[https:// | + | |
- | + | ||
- | To automate Solr with systemd, you should be able to add code similar to this in a new file called / | + | |
- | + | ||
- | < | + | |
- | Description=VuFind Starter | + | |
- | After=network.target | + | |
[Service] | [Service] | ||
Type=forking | Type=forking | ||
- | ExecStart=/ | + | ExecStart=/ |
- | PIDFile=/var/run/ | + | PIDFile=/usr/local/vufind/ |
- | User=root | + | User=solr |
- | ExecStop=/ | + | ExecStop=/ |
- | + | SuccessExitStatus=0 | |
- | # Java responds to a SIGTERM by returning with exit code 143 which leads to " | + | LimitNOFILE=65000 |
- | SuccessExitStatus=143 | + | LimitNPROC=65000 |
[Install] | [Install] | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
</ | </ | ||
+ | |||
+ | 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 " | ||
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. | ||
Line 193: | Line 175: | ||
systemctl [enable, start, stop, status] vufind | systemctl [enable, start, stop, status] vufind | ||
</ | </ | ||
+ | |||
+ | Alternatively, | ||
==== Windows Method ==== | ==== Windows Method ==== | ||
- | === VuFind 1.x === | + | Solr can be started |
- | + | ||
- | Jetty (the wrapper that allows | + | |
- | + | ||
- | wrapper.java.additional.1=-Djetty.home=../ | + | |
- | wrapper.java.additional.2=-Djetty.logs=../ | + | |
- | wrapper.java.initmemory=3 | + | |
- | wrapper.java.maxmemory=64 | + | |
- | + | ||
- | And change them to: | + | |
- | + | ||
- | wrapper.java.additional.1=-Djetty.home=../ | + | |
- | wrapper.java.additional.2=-Djetty.logs=../ | + | |
- | wrapper.java.additional.3=-Dsolr.solr.home=c: | + | |
- | wrapper.java.initmemory=64 | + | |
- | wrapper.java.maxmemory=256 | + | |
- | + | ||
- | You'll notice the first two lines haven' | + | |
- | + | ||
- | Now it's time to install the service. Open a command window and run the following: | + | |
- | + | ||
- | cd \vufind\solr\jetty\bin | + | |
- | Jetty-Service.exe -i jetty-service.conf | + | |
- | + | ||
- | NOTE: If you are running | + | |
- | + | ||
- | === VuFind 2.x === | + | |
- | + | ||
- | The Jetty service found in VuFind 1.x is no longer compatible with the version of Jetty used in VuFind 2.x. A best practice for running VuFind 2.x's Solr index as a Windows service has not yet been determined. See the [[http:// | + | |
- | + | ||
- | February 2015: Solr was successfully configured as a service on both a Windows 7 test box running under XAMPP and a production Windows 8 R2 server using the following: http:// | + | |
- | + | ||
- | < | + | |
- | SolrService.exe // | + | |
- | --Install=C: | + | |
- | --LogPath=C: | + | |
- | --LogLevel=Debug --StdOutput=auto --StdError=auto | + | |
- | --StartMode=java --StopMode=java --Jvm=auto | + | |
- | ++JvmOptions=-Djetty.home=C: | + | |
- | ++JvmOptions=-DSTOP.KEY=stopsolr ++JvmOptions=-Djetty.logs=C: | + | |
- | ++JvmOptions=-Dorg.eclipse.jetty.util.log.SOURCE=true | + | |
- | ++JvmOptions=-XX: | + | |
- | --StartClass=org.eclipse.jetty.start.Main ++StartParams=OPTION=ALL | + | |
- | ++StartParams=C: | + | |
- | --StopClass=org.eclipse.jetty.start.Main | + | |
- | ++StopParams=--stop ++JvmOptions=-Dsolr.solr.home=C: | + | |
- | --StartPath=C: | + | |
- | </ | + | |
- | + | ||
- | // Note: the above should be entered as a single command line; it has been broken up here for readability. // | + | |
- | + | ||
- | Important! If you are running 64bit you'll need to retrieve the prunsrv.exe from the amd64 folder. | + | |
- | Judy Drescher, Molloy College | ||
===== Taking the User Interface Offline ===== | ===== Taking the User Interface Offline ===== | ||
- | If you simply stop the Solr server, users attempting to access your VuFind | + | If you simply stop the Solr server, users attempting to access your VuFind® |
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
administration/starting_and_stopping_solr.1456854847.txt.gz · Last modified: 2016/03/01 17:54 by demiankatz