How to fix error starting mailman on cPanel server

The mailman error I got looks as below:

root@server1 [/usr/local/cpanel/3rdparty]# /usr/local/cpanel/scripts/restartsrv –wait –force mailman
Waiting for “mailman” to start ……info [restartsrv_mailman] systemd failed to start the service “mailman” (The “/usr/bin/systemctl restart mailman.service –no-ask-password” command (process 444759) reported error number 1 when it ended.): Job for mailman.service failed because the control process exited with error code. See “systemctl status mailman.service” and “journalctl -xe” for details.

…Waiting for mailman,qrunner to shutdown … not running.
info [restartsrv_mailman] systemd failed to start the service “mailman” (The “/usr/bin/systemctl restart mailman.service –no-ask-password” command (process 444818) reported error number 1 when it ended.): Job for mailman.service failed because the control process exited with error code. See “systemctl status mailman.service” and “journalctl -xe” for details.

…failed.

Cpanel::Exception::Services::StartError
Service Status
undefined status from Cpanel::ServiceManager::Services::Mailman

Service Error
(XID jyr86j) The “mailman” service failed to start.

Startup Log
Nov 17 14:18:44 server1.hostname.com restartsrv_mailman[444819]: if not force or qrunner_state():
Nov 17 14:18:44 server1.hostname.com restartsrv_mailman[444819]: File “/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl”, line 182, in qrunner_state
Nov 17 14:18:44 server1.hostname.com restartsrv_mailman[444819]: hostname, pid, tempfile = get_lock_data()
Nov 17 14:18:44 server1.hostname.com restartsrv_mailman[444819]: File “/usr/local/cpanel/3rdparty/mailman/bin/mailmanctl”, line 174, in get_lock_data
Nov 17 14:18:44 server1.hostname.com restartsrv_mailman[444819]: pid = int(parts[-1])
Nov 17 14:18:44 server1.hostname.com restartsrv_mailman[444819]: ValueError: invalid literal for int() with base 10: ”
Nov 17 14:18:44 server1.hostname.com systemd[1]: mailman.service: control process exited, code=exited status=1
Nov 17 14:18:44 server1.hostname.com systemd[1]: Failed to start mailman services.
Nov 17 14:18:44 server1.hostname.com systemd[1]: Unit mailman.service entered failed state.
Nov 17 14:18:44 server1.hostname.com systemd[1]: mailman.service failed.

mailman has failed. Contact your system administrator if the service does not automagically recover.

 

Mailman reinstall didn’t work

rpm -e --nodeps cpanel-mailman
/usr/local/cpanel/scripts/check_cpanel_rpms --fix --targets=mailman

To fix move out lock files

root@server1 [/usr/local/cpanel/3rdparty]# ls -la /usr/local/cpanel/3rdparty/mailman/locks/
total 8
drwxrwsr-x 2 mailman mailman 4096 Nov 17 14:22 ./
drwxrwsr-x 23 mailman mailman 4096 Nov 17 14:17 ../
-rw-rw-r– 2 mailman mailman 0 Nov 18 2022 master-qrunner
-rw-rw-r– 2 mailman mailman 0 Nov 18 2022 master-qrunner.server1.hostname.com.1530

mkdir /usr/local/src/mailman_locks
mv -v /usr/local/cpanel/3rdparty/mailman/locks/* /usr/local/src/mailman_locks
‘/usr/local/cpanel/3rdparty/mailman/locks/master-qrunner’ -> ‘/usr/local/src/mailman_locks/mast

Then restart mailman service again

service mailman start

Source https://forums.cpanel.net/threads/mailman-failed-wont-restart.599171/

Similar Posts:

2 comments on “How to fix error starting mailman on cPanel server

  1. Thank you. Worked for me to:
    rpm -e –nodeps cpanel-mailman
    /usr/local/cpanel/scripts/check_cpanel_rpms –fix –targets=mailman

    Appreciate the help!

Leave a Reply

Your email address will not be published. Required fields are marked *