When trying to restart cPanel's Dovecot Solr service you will see this error:
systemctl start cpanel-dovecot-solr.service; tail -f /var/log/messages
Job for cpanel-dovecot-solr.service failed because the control process exited with error code. See "systemctl status cpanel-dovecot-solr.service" and "journalctl -xe" for details.
Sep 28 12:41:18 srv02 systemd: Dependency Before=cpanel-ccs.service dropped from unit cpanel-ccs.service
Sep 28 12:41:18 srv02 kernel: Firewall: *TCP_IN Blocked* IN=ppp0 OUT= MAC= SRC=18.104.22.168 DST=22.214.171.124 LEN=40 TOS=0x00 PREC=0x00 TTL=242 ID=53490 PROTO=TCP SPT=32767 DPT=8545 WINDOW=1024 RES=0x00 SYN URGP=0
Sep 28 12:41:43 srv02 kernel: Firewall: *TCP_IN Blocked* IN=ppp0 OUT= MAC= SRC=126.96.36.199 DST=188.8.131.52 LEN=40 TOS=0x00 PREC=0x00 TTL=243 ID=36300 PROTO=TCP SPT=42577 DPT=5184 WINDOW=1024 RES=0x00 SYN URGP=0
Sep 28 12:41:43 srv02 systemd: Starting Solr for cPanel Dovecot...
Sep 28 12:41:43 srv02 solr: Port 8984 is already being used by another process (pid: 733)
Sep 28 12:41:43 srv02 solr: Please choose a different port using the -p option.
Sep 28 12:41:43 srv02 systemd: cpanel-dovecot-solr.service: control process exited, code=exited status=1
Sep 28 12:41:43 srv02 systemd: Failed to start Solr for cPanel Dovecot.
Sep 28 12:41:43 srv02 systemd: Unit cpanel-dovecot-solr.service entered failed state.
Sep 28 12:41:43 srv02 systemd: cpanel-dovecot-solr.service failed.
Sep 28 12:42:01 srv02 systemd: Started Session 15101 of user root.
This indicates that there is possibly another process listening to one of Solr's ports. However, when attempting to check what process is listening to those ports, nothing will appear:
netstat -tulpan | grep -Ei "(8984|8983)"
This usually means that during the previous active process for Solr, it had specified a PID (###) in the PID file located here /home/cpanelsolr/bin/solr-8984.pid. You can see the PID value saved in this file via this command:
You need to empty out that file and restart the service again. You can use your editor of choice and remove the value form that file and then restart the service via this command: