| Summary: If Solr does not start on a Linux-based DocuShare server, search services may remain unavailable after installation or after a system restart. In the affected cases reviewed for this article, the problem was caused by the Linux Solr service starting with the wrong service-account or Java environment settings. |
Applies To
| Area | Details |
| Platform | Linux |
| Component | Solr service startup using /etc/init.d/solr |
| Versions reported | DocuShare 7.6, 7.7, and 8.0 |
| Customer impact | Search services may remain unavailable after installation or reboot |
Symptoms
- Solr does not start after the Linux server is rebooted.
- Search is unavailable after a new installation or maintenance restart.
- Running /etc/init.d/solr start returns Java-related startup errors.
- The startup script reports shell-format or carriage-return errors.
| Multiple $'\r': command not found Java not found, or an error was encountered when running java. A working Java 8 JRE is required to run Solr! JAVA_HOME: N/A |
| Important: If this error message mentions Java 8, do not treat that as guidance to install Java 8. In the affected cases, the message is a startup symptom that usually means the Solr service did not inherit the expected Java environment or service-account settings. Keep your DocuShare server on the Java version supported for your DocuShare release. |
Why This Happens
On affected Linux systems, the Solr service does not always start with the expected runtime context. When that happens, Solr may run under the wrong account, fail to inherit the expected Java settings, or call shell files that are not in the correct Unix format.
- The Solr service is configured to run under the wrong account.
- The DocuShare installation directory is not owned by the intended DocuShare service account.
- Solr shell files contain Windows-style line endings instead of Unix line endings.
- JAVA_HOME is valid in an interactive shell but is not available to the Solr service when it starts.
Resolution
Work through the following checks in order.
- Confirm the DocuShare service account. DocuShare on Linux should use a dedicated non-root service account for the DocuShare and Solr processes.
- Verify ownership of the DocuShare installation directory. Confirm that the DocuShare home directory is owned by the intended DocuShare service account and group.
| chown -R docushare:docushare <DOCUSHARE_HOME> |
- Review the Linux Solr service script. Open /etc/init.d/solr and verify that the service is configured to run as the intended DocuShare account.
| Important: Pay particular attention to the RUNAS setting. If that value points to the wrong account, Solr may fail to start correctly. |
- Check the Solr shell files for Unix line endings. If the service reports errors such as Multiple $'\r': command not found, convert the affected files to Unix line endings.
- /etc/init.d/solr
- <DOCUSHARE_HOME>/Solr/bin/solr
- Any solr.in.sh file used by the service startup path
- Verify that Java is available to the Solr service. If java -version succeeds in an interactive shell but the service still reports JAVA_HOME: N/A, the Solr service is likely starting without the expected Java environment.
- Restart Solr and confirm that it starts cleanly.
| /etc/init.d/solr stop /etc/init.d/solr start |
How to Validate the Fix
- Confirm that the Solr service starts without reporting Java or shell-format errors.
- Verify that DocuShare search functionality is available after the service restart.
- Reboot the Linux server during a maintenance window and confirm that Solr starts successfully after the reboot.
Recommended Next Step
If your DocuShare version has a newer maintenance update available, install the latest update recommended for your release line. Later updates include fixes for Linux Solr startup handling.
| Support guidance: If you need help identifying the best update path for your environment, contact Xerox DocuShare Support with your DocuShare version, Linux distribution, and the exact Solr startup error text. |
When To Contact Support
- Solr still fails after the service-account, ownership, line-ending, and Java checks are completed.
- Solr starts manually but fails again after reboot.
- You want assistance validating the Linux Solr service configuration.
- You want version-specific guidance on the latest maintenance update for your DocuShare release.