Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED cpanel-dovecot-solr not working on Amazon AMI

Discussion in 'E-mail Discussions' started by a.post, Apr 5, 2017.

  1. a.post

    a.post Member

    Joined:
    Mar 23, 2005
    Messages:
    20
    Likes Received:
    1
    Trophy Points:
    153
    Location:
    The Netherlands
    cPanel Access Level:
    Root Administrator
    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
    Code:
    root@cpanelhost [/]# netstat -an |grep 8984
    If it is not running (no ouput), try to start manually
    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]
    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)
    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
    If you see java-1.8, switch from 1.7 to 1.8
    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
    Now restart solr
    Code:
    root@cpanelhost [/]# /etc/rc.d/init.d/cpanel-dovecot-solr start
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @a.post,

    Thank you for reporting this issue and letting us know the workaround that helped solve the problem on your system. We now have an intenral case open (CPANEL-12511) to address this issue. I'll monitor the progress of this case and update this thread with more information as it becomes available.

    Thank you.
     
  3. tandyuk

    tandyuk Active Member

    Joined:
    Dec 18, 2003
    Messages:
    33
    Likes Received:
    1
    Trophy Points:
    158
    This isnt exclusive to Amazon machines.

    one of our servers running latest cloudlinux 6.x, when upgraded to cpanel64 did exactly the same thing.
    After about 100 chkservd alerts, we resolved it using the same process as above.

    Code:
    root@uk1 [~]# netstat -an |grep 8984
    root@uk1 [~]# /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_45, 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]
    root@uk1 [~]# /usr/sbin/alternatives --config java
    
    There are 3 programs which provide 'java'.
    
      Selection    Command
    -----------------------------------------------
       1           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
     + 2           /usr/java/latest/bin/java
    *  3           /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
    
    Enter to keep the current selection[+], or type selection number: 3
    root@uk1 [~]# /etc/rc.d/init.d/cpanel-dovecot-solr start
    Starting Apache Solr for cPanel Dovecot: Waiting up to 180 seconds to see Solr running on port 8984 [/]
    Started Solr server on port 8984 (pid=1005009). Happy searching!
    
                                                               [  OK  ]
    root@uk1 [~]# netstat -an |grep 8984
    tcp        0      0 127.0.0.1:8984              0.0.0.0:*                   LISTEN
    tcp        0      0 127.0.0.1:42029             127.0.0.1:8984              TIME_WAIT
    
    
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,425
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    An updated RPM was published to address the issue where solr fails if two versions of JAVA are installed and 1.7 is set as the default. You can run the following command to update the RPM on your system:

    Code:
    yum clean all ; yum update cpanel-dovecot-solr
    Thank you.
     
Loading...

Share This Page