For those running cPanel on Amazon Linux and having trouble getting solr to work (continuous failed service checks). This is probably due to the fact that java 1.7 is still default om Amazon Linux.
On the commandline check if the service is running
If it is not running (no ouput), try to start manually
If Java version is the problem it will show. If it's a different problem, fix differently.
Check to see if Java 1.8 is already installed (it should be since 2014)
If you see java-1.8, switch from 1.7 to 1.8
Now restart solr
This should have worked. If not, you might have a specific situation and you have to try something different. This fix worked for my Amazon AMI's.
On the commandline check if the service is running
Code:
root@cpanelhost [/]# netstat -an |grep 8984
Code:
root@cpanelhost [/]# /etc/rc.d/init.d/cpanel-dovecot-solr start
Starting Apache Solr for cPanel Dovecot: Your current version of Java is too old to run this version of Solr
We found version 1.7.0_131, using command 'java'
Please install latest version of Java 8 or set JAVA_HOME properly.
Debug information:
JAVA_HOME: N/A
Active Path:
/sbin:/usr/sbin:/bin:/usr/bin
[FAILED]
Check to see if Java 1.8 is already installed (it should be since 2014)
Code:
root@cpanelhost [/]# yum search java-1.
Loaded plugins: priorities, update-motd, upgrade-helper
=================================================================================== N/S matched: java-1. ====================================================================================
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.8.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.0-openjdk-headless.x86_64 : OpenJDK Runtime Environment
java-1.8.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.8.0-openjdk-javadoc-zip.noarch : OpenJDK API Documentation compressed in single archive
java-1.8.0-openjdk-src.x86_64 : OpenJDK Source Bundle
Code:
root@cpanelhost [/]#/usr/sbin/alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
Enter to keep the current selection[+], or type selection number: 2
Code:
root@cpanelhost [/]# /etc/rc.d/init.d/cpanel-dovecot-solr start