[toc]
If you are seeing search-related errors, this document can help you troubleshoot the problems and ensure that search is running effectively for your community.
The first place to look when you receive errors from Solr is in the logs files which are located (for a standard installation) in the Tomcat installation Logs directory (e.g., C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs). There are two files of you should review for errors:
- stdout_YYYYMMDD
- catalina_YYYYMMDD
...where YYYYMMDD is today's date. Typically you will refer to the Catalina log for Solr errors, whereas the stdout typically logs critical errors.
Solr is unresponsive
- Open stdout_YYYYMMDD.
- Look for any errors. If you see an OutOfMemoryError, read more about how to troubleshoot it.
OutOfMemory error
Solr runs very well out of the box, but as a community grows, you may need to increase the memory allocated to it. The default memory allocated to Solr is 64MB, which for medium-large sized communities is not enough. If you see an error similar to
...you need to give the Java virtual machine (JVM) more memory.
To increase the memory for the JVM:
- Right-click Tomcat Manager in the system tray.
- Select the Java tab.
- Set the Maximum Memory Pool size (in MB) that you want to allocate the JVM.
- Restart the service.
You can also refer to the OutOfMemoryErrors section located in the SolrPerformance section of the Solr wiki.
You can see how much memory Solr is using within the Java VM by viewing the system info at http://[yourSolrInstance]:8080/solr/admin/system/. Look for the element with a memory attribute:
<str name="free">163 MB</str>
<str name="total">474 MB</str>
<str name="max">496 MB</str>
<str name="used">311 MB (%62)</str>
</lst>
Troubleshooting
This section contains some general pointers about troubleshooting various steps in this installation.
Troubleshoot a Tomcat installation
If Tomcat does not start:
-
Open its Logs directory in the Tomcat installation directory.
-
Look for a file named jakarta_service_YYYYMMDD.log, where YYYY, MM, DD are today's date year, month and day, respectively. Open the file and look for the following error messages:
[174 javajni.c] [error] The specified module could not be found.
[994 prunsrv.c] [error] Failed creating java C:\Program Files\Java\jre6\bin\client\jvm.dll
[1269 prunsrv.c] [error] ServiceStart returned 1
OR
[994 prunsrv.c] [error] Failed creating java
[1269 prunsrv.c] [error] ServiceStart returned 1 - If you see any of those error messages, follow the missing msvcr71.dll file instructions.
Missing msvcr71.dll file - Having this file missing is common installation issue for Tomcat. Tomcat does has a dependency on this file, but the Tomcat installer does not include it. To resolve this issue, do the following:
- Copy the msvcr71.dll file to the Tomcat bin directory in one of the following ways:
- 32-bit operating system: Copy the msvcr71.dll file from the bin directory in the Java runtime directory (typically c:\Program Files\Java\jre6\bin) to the bin directory in the Tomcat installation directory.
- 64-bit operating system: Copy the msvcr71.dll file from the bin directory in the the Java runtime directory (typically c:\Program Files (x86)\Java\jre6\bin) to the bin directory in the Tomcat installation directory.
- If you do not have the 32-bit JRE installed (that is, you do not have the directory c:\Program Files (x86)\Java\jre6\bin), go to http://java.com and install it.
- After you install the 32-bit JRE, copy the msvcr71.dll file from the bin directory in the Java runtime directory (typically c:\Program Files (x86)\Java\jre6\bin) to the bin directory in the Tomcat installation directory.
- Or locate the file on your Windows installation CD.
- Before creating the solr1.xml configuration text file (using a code fragment), ensure the Catalina\localhost directory already exists (that is, you have already created it).
- When you edit the communityserver_override.config file to change the Solr host value, remember that text entry is case-sensitive.
- Tip: If you choose to use a different instance name such as "solr_dev" or "solr_stage," ensure that your configuration file in the Catalina directory has the same name as your instance. For example, if you picked "solr_dev," you should have a configuration file named solr_dev.xml in c:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost.
- After you move the existing Solr instance's files from its previous Solr home directory (such as c:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps) to the new host directory, ensure that you delete the previous Solr directory.
Troubleshoot an installation of multiple Solr instances
- Having already created two or more instances of Solr, ensure that they do not have duplicate names.
- Before creating the solr1.xml configuration text file (using the code fragment), ensure that the Catalina\localhost directory already exists.
- When you edit the communityserver_override.config file to change the Solr host value, remember that the text entry is case-sensitive.
- After you move an existing Solr instance's files from its previous home directory to the new host directory, ensure that you delete the previous home Solr directory.