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 revisionNext revisionBoth sides next revision | ||
administration:starting_and_stopping_solr [2018/06/20 12:06] – [Linux (init.d) Method] demiankatz | administration:starting_and_stopping_solr [2023/03/08 18:45] – demiankatz | ||
---|---|---|---|
Line 34: | Line 34: | ||
</ | </ | ||
- | This is warning of some default settings that could impact the performance of your Solr instance. On most Linux platforms, this can be addressed by editing the / | + | This is warning of some default settings that could impact the performance of your Solr instance. On some Linux platforms, this can be addressed by editing the / |
< | < | ||
Line 46: | Line 46: | ||
It may be necessary to log out of your terminal session and log back in for these settings to take effect. | It may be necessary to log out of your terminal session and log back in for these settings to take effect. | ||
+ | |||
+ | On Linux platforms using systemd, you may be able to work around the problem with a systemd file like this example (in a file like / | ||
+ | |||
+ | < | ||
+ | [Unit] | ||
+ | Description=VuFind Starter | ||
+ | After=network.target | ||
+ | |||
+ | [Service] | ||
+ | Type=forking | ||
+ | ExecStart=/ | ||
+ | PIDFile=/ | ||
+ | User=vufind-user | ||
+ | ExecStop=/ | ||
+ | SuccessExitStatus=0 | ||
+ | LimitNOFILE=65000 | ||
+ | LimitNPROC=65000 | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | </ | ||
+ | |||
+ | (Obviously the / | ||
+ | |||
+ | Once this is in place, you can use "sudo service vufind start" and "sudo service vufind stop" to start and stop the process, and appropriate limits will be applied. | ||
==== Windows Method ==== | ==== Windows Method ==== | ||
Line 143: | Line 168: | ||
:!: If you need to run VuFind with non-default settings, you may wish to add some lines to export environment variables in this script, or else source a script containing all of your environment settings prior to running " | :!: If you need to run VuFind with non-default settings, you may wish to add some lines to export environment variables in this script, or else source a script containing all of your environment settings prior to running " | ||
- | :!: Newer versions of Solr do not like to be run by the root user; you may need to either add " | + | :!: Newer versions of Solr do not like to be run by the root user; you may need to either add " |
< | < | ||
Line 198: | Line 223: | ||
To automate Solr with systemd: | To automate Solr with systemd: | ||
- | * create the user " | + | * [[administration: |
* add permission for the solr directory to this user: | * add permission for the solr directory to this user: | ||
Line 208: | Line 233: | ||
< | < | ||
+ | [Unit] | ||
Description=VuFind Starter | Description=VuFind Starter | ||
- | After=network.target | + | After=network.target |
[Service] | [Service] | ||
Line 225: | Line 251: | ||
</ | </ | ||
- | In VuFind | + | In VuFind |
< | < | ||
- | After=network.target | + | [Unit] |
+ | After=network.target | ||
[Service] | [Service] | ||
Type=forking | Type=forking | ||
ExecStart=/ | ExecStart=/ | ||
- | PIDFile=/ | + | PIDFile=/ |
User=solr | User=solr | ||
ExecStop=/ | ExecStop=/ | ||
Line 264: | Line 291: | ||
==== Windows Method ==== | ==== Windows Method ==== | ||
- | === VuFind | + | As of VuFind 3.0, Solr can be started as a background process from the command line, so it should be possible |
- | + | ||
- | Jetty (the wrapper that allows Solr to run) can be set up as a Windows service. | + | |
- | + | ||
- | 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 Windows Vista the above will still fail with ' | + | |
- | + | ||
- | === 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. | + | |
- | + | ||
- | 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 | + | |
- | + | ||
- | === VuFind 3.x === | + | |
- | + | ||
- | Now that Solr can be started as a background process from the command line, it should be easier to manage it from within Windows; however, detailed instructions 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 ===== | ||
Line 327: | Line 297: | ||
If you simply stop the Solr server, users attempting to access your VuFind site will encounter error messages. | If you simply stop the Solr server, users attempting to access your VuFind site will encounter error messages. | ||
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
administration/starting_and_stopping_solr.txt · Last modified: 2023/10/24 13:47 by demiankatz