SOLVED cpanel-dovecot-solr not working on Amazon AMI

a.post

Member
Mar 23, 2005
20
1
153
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:
[email protected] [/]# netstat -an |grep 8984
If it is not running (no ouput), try to start manually
Code:
[email protected] [/]# /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:
[email protected] [/]# 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:
[email protected] [/]#/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:
[email protected] [/]# /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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
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.
 

tandyuk

Active Member
Dec 18, 2003
38
10
158
Worthing, UK
cPanel Access Level
DataCenter Provider
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:
[email protected] [~]# netstat -an |grep 8984
[email protected] [~]# /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]
[email protected] [~]# /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
[email protected] [~]# /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  ]
[email protected] [~]# 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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
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.
 

splaquet

Well-Known Member
Sep 24, 2008
53
3
58
W. Hartford, CT
cPanel Access Level
Root Administrator
Twitter
this was the first format/reinstall that i've performed since the previous cPanel pricing update. my hosting provider doesn't have an install for CentOS w/ cPanel now, as the licenses appear to be applied afterwards. since a few nights ago, i've been unable to completely install CentOS, CloudLinux & cPanel. after reinstalling the server a few times (bouncing between CentOS 7/8), I've finally been able to install a working combo... although, I've yet to see the cPanel provided SSL cert apply, i feel confident that i finally have a stable cPanel reinstall w/ CentOS/CloudLinux 8.

Code:
# hostnamectl
Operating System: CloudLinux 8.3 (Pavel Belyayev)
CPE OS Name: cpe:/o:cloudlinux:cloudlinux:8.3:GA:server
Kernel: Linux 4.18.0-147.8.1.el8.lve.1.x86_64
Architecture: x86-64
this time, after the cPanel install didn't go through w/ the 1-liner, i had to update/replace existing excludes using the content from cPanel install info page:
- nano /etc/yum.conf
exclude=bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mydns* nsd* p0f php* proftpd* pure-ftpd* spamassassin*

- then packages:
$ dnf config-manager --set-enabled cloudlinux-PowerTools
$ yum reposync

I was really hoping that would have done the trick, but still saw the Apache Solr error, when trying to install via Manage Plugins page.

i cannot seem to find a way to install, which i have a feeling will resolve this issue:
javapackages-filesystem

Code:
The system will install the “cpanel-dovecot-solr” plugin.
[2021-01-15 16:42:28 -0500] info [xml-api] Starting yum execution “--assumeyes --color=never --config /etc/yum.conf install cpanel-dovecot-solr --enablerepo=cloudlinux-PowerTools --enablerepo=epel --enablerepo=cl-ea4-testing --enablerepo=cl-ea4”.
This system is receiving updates from CloudLinux Network server.
cPanel Plugins project                           20 kB/s | 2.9 kB     00:00    
Error: 
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
[2021-01-15 16:42:32 -0500] info [xml-api] Completed yum execution “--assumeyes --color=never --config /etc/yum.conf install cpanel-dovecot-solr --enablerepo=cloudlinux-PowerTools --enablerepo=epel --enablerepo=cl-ea4-testing --enablerepo=cl-ea4”: in 3.805 second(s).
Cpanel::Exception::ProcessFailed::Error/(XID amwvpe) “/usr/local/cpanel/scripts/retry_rpm” reported error code “1” when it ended: 
 at /usr/local/cpanel/Cpanel/ChildErrorStringifier.pm line 161.
    Cpanel::ChildErrorStringifier::to_exception(Cpanel::SafeRun::Object=HASH(0x48940d0)) called at /usr/local/cpanel/Cpanel/ChildErrorStringifier.pm line 140
    Cpanel::ChildErrorStringifier::die_if_error(Cpanel::SafeRun::Object=HASH(0x48940d0)) called at /usr/local/cpanel/Cpanel/SafeRun/Object.pm line 676
    Cpanel::SafeRun::Object::die_if_error(Cpanel::SafeRun::Object=HASH(0x48940d0)) called at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 1102
    Cpanel::SysPkgs::YUM::_die_child_error(Cpanel::SafeRun::Object=HASH(0x48940d0), "Error: \x{a} Problem: package cpanel-dovecot-solr-8.2.0-4.1.noarc"..., "_args", ARRAY(0x445a4c0), "packages", ARRAY(0x413b688)) called at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 1086
    Cpanel::SysPkgs::YUM::_exec_yum(Cpanel::SysPkgs::YUM=HASH(0x413b1f0), "packages", ARRAY(0x413b688), "_args", ARRAY(0x445a4c0)) called at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 1008
    Cpanel::SysPkgs::YUM::_call_yum(Cpanel::SysPkgs::YUM=HASH(0x413b1f0), "packages", ARRAY(0x413b688)) called at /usr/local/cpanel/Cpanel/SysPkgs/YUM.pm line 271
    Cpanel::SysPkgs::YUM::install_packages(Cpanel::SysPkgs::YUM=HASH(0x413b1f0), "packages", ARRAY(0x413b688)) called at /usr/local/cpanel/Cpanel/Plugins.pm line 92
    Cpanel::Plugins::install_plugins("cpanel-dovecot-solr") called at /usr/local/cpanel/Whostmgr/API/1/Plugins.pm line 176
    Whostmgr::API::1::Plugins::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
    eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
    Try::Tiny::try(CODE(0x4592bd8), Try::Tiny::Catch=REF(0x411d598), Try::Tiny::Finally=REF(0x16060c8)) called at /usr/local/cpanel/Whostmgr/API/1/Plugins.pm line 206
    Whostmgr::API::1::Plugins::__ANON__() called at /usr/local/cpanel/Cpanel/Daemonizer/Tiny.pm line 150
    Cpanel::Daemonizer::Tiny::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68
    eval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68
    Cpanel::ForkAsync::do_in_child(CODE(0x41eeb88)) called at /usr/local/cpanel/Cpanel/Daemonizer/Tiny.pm line 153
    Cpanel::Daemonizer::Tiny::__ANON__() called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68
    eval {...} called at /usr/local/cpanel/Cpanel/ForkAsync.pm line 68
    Cpanel::ForkAsync::do_in_child(CODE(0x43652a0)) called at /usr/local/cpanel/Cpanel/Daemonizer/Tiny.pm line 161
    Cpanel::Daemonizer::Tiny::run_as_daemon_with_options(HASH(0x413be98), CODE(0x3f0f8d0)) called at /usr/local/cpanel/Cpanel/Daemonizer/Tiny.pm line 77
    Cpanel::Daemonizer::Tiny::run_as_daemon(CODE(0x3f0f8d0)) called at /usr/local/cpanel/Whostmgr/API/1/Plugins.pm line 208
    Whostmgr::API::1::Plugins::_alter_rpm_installation(HASH(0x1791b58), Whostmgr::API::1::Utils::Metadata=HASH(0x1789ed8), "install", "--edit", "installed") called at /usr/local/cpanel/Whostmgr/API/1/Plugins.pm line 59
    Whostmgr::API::1::Plugins::install_rpm_plugin(HASH(0x1791b58), Whostmgr::API::1::Utils::Metadata=HASH(0x1789ed8), HASH(0x3c98590)) called at whostmgr/bin/xml-api.pl line 3853
    whostmgr::bin::xml_api::__ANON__(Whostmgr::API::1::Utils::Metadata=HASH(0x1789ed8), HASH(0x1791b58), HASH(0x3c98590), CODE(0x3c981d0)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 238
    Whostmgr::API::1::Data::Wrapper::__ANON__() called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 100
    eval {...} called at /usr/local/cpanel/3rdparty/perl/532/lib/perl5/cpanel_lib/Try/Tiny.pm line 91
    Try::Tiny::try(CODE(0x411cbd8), Try::Tiny::Catch=REF(0x411d448)) called at /usr/local/cpanel/Whostmgr/API/1/Data/Wrapper.pm line 257
    Whostmgr::API::1::Data::Wrapper::execute_internal(CODE(0x3c98410), HASH(0x1791b58), HASH(0x3c98590), HASH(0x3c98860), CODE(0x3c981d0)) called at whostmgr/bin/xml-api.pl line 4058
    whostmgr::bin::xml_api::runapp("install_rpm_plugin", HASH(0x3c98590), HASH(0x16965f0), 0, CODE(0x3c981d0)) called at whostmgr/bin/xml-api.pl line 3712
    whostmgr::bin::xml_api::script(CODE(0x3c981d0), "-json", "./install_rpm_plugin") called at whostmgr/bin/xml-api.pl line 3655
 

splaquet

Well-Known Member
Sep 24, 2008
53
3
58
W. Hartford, CT
cPanel Access Level
Root Administrator
Twitter
update on the cPanel signed SSL server cert. super odd (but maybe my chops aren't up to pace), but it was my hostname. i had set my FQDN in hostnamectl, but hostname was only showing the sub of the subdomain. when i updated the sub to the FQDN, the SSL cert immediately pushed through... and applied. BUT, i'm still not seeing it in root certs, when i went to apply the cert to the other services.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,810
895
313
cPanel Access Level
Root Administrator
@splaquet - so you currently aren't seeing any issues with the dovecot processes, correct?

If the SSL is installed and working I would expect that WHM >> Manage Service SSL Certificates would show that as available, and by default it would be setup so you wouldn't need to apply it to other services.