1

Topic: mlmmjadmin error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version: 1.6.3
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: Rocky Linux 9.1 aarch64
- Store mail accounts in which backend: MySQL
- Web server: Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
====

I have just migrated from another server and everything else is working but I get this error when accessing user account info on iRedAdmin-Pro:

 Error: ConnectionError(MaxRetryError("HTTPConnectionPool(host='127.0.0.1', port=7790): Max retries exceeded with url: /api/subscriber/fc@example.com/subscribed?query_all_lists=no&email_only=yes (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xffffa8531fa0>: Failed to establish a new connection: [Errno 111] Connection refused'))"))

I have verified permissions on /var/vmail/mlmmj with:

chmod -R 0700 /var/vmail/mlmmj 
chmod -R 0700 /var/vmail/mlmmj-archive 
chown -R mlmmj:mlmmj  /var/vmail/mlmmj 
chown -R mlmmj:mlmmj  /var/vmail/mlmmj-archive

The command

systemctl status mlmmjadmin

returns the result:

× mlmmjadmin.service - RESTful API server used to manage mlmmj mailing list manager
     Loaded: loaded (/usr/lib/systemd/system/mlmmjadmin.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sun 2023-07-16 13:07:09 PDT; 2s ago
   Duration: 107ms
    Process: 74246 ExecStartPre=/usr/bin/mkdir /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
    Process: 74247 ExecStartPre=/usr/bin/chown mlmmj:mlmmj /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
    Process: 74248 ExecStartPre=/usr/bin/chmod 0755 /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
    Process: 74249 ExecStart=/usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid (code=exited, status=255/EXCEPTION)
    Process: 74250 ExecStopPost=/usr/bin/rm -rf /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
   Main PID: 74249 (code=exited, status=255/EXCEPTION)
        CPU: 113ms

Any help would be much appreciated!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: mlmmjadmin error

Any related error in /var/log/maillog or /var/log/mlmmjadmin/mlmmjadmin.log while restarting mlmmjadmin service?

3

Re: mlmmjadmin error

I could not see any related errors in maillog.
Here is the whole entry from mlmmjadmin.log

Jul 16 01:12:59 mail mlmmjadmin[1510]: *** Starting uWSGI 2.0.21 (64bit) on [Sun Jul 16 01:12:58 2023] ***
Jul 16 01:12:59 mail mlmmjadmin[1510]: compiled with version: 11.2.1 20220127 (Red Hat 11.2.1-9) on 28 October 2022 00:00:00
Jul 16 01:12:59 mail mlmmjadmin[1510]: os: Linux-5.14.0-162.12.1.el9_1.0.2.aarch64 #1 SMP PREEMPT_DYNAMIC Mon Jan 30 21:48:42 UTC 2023
Jul 16 01:12:59 mail mlmmjadmin[1510]: nodename: mail.spots.edu
Jul 16 01:12:59 mail mlmmjadmin[1510]: machine: aarch64
Jul 16 01:12:59 mail mlmmjadmin[1510]: clock source: unix
Jul 16 01:12:59 mail mlmmjadmin[1510]: pcre jit disabled
Jul 16 01:12:59 mail mlmmjadmin[1510]: detected number of CPU cores: 1
Jul 16 01:12:59 mail mlmmjadmin[1510]: current working directory: /
Jul 16 01:12:59 mail mlmmjadmin[1510]: writing pidfile to /var/run/mlmmjadmin/mlmmjadmin.pid
Jul 16 01:12:59 mail mlmmjadmin[1510]: detected binary path: /usr/sbin/uwsgi
Jul 16 01:12:59 mail mlmmjadmin[1510]: setgid() to 2003
Jul 16 01:12:59 mail mlmmjadmin[1510]: setuid() to 2003
Jul 16 01:12:59 mail mlmmjadmin[1510]: chdir() to /opt/mlmmjadmin
Jul 16 01:12:59 mail mlmmjadmin[1510]: your processes number limit is 22081
Jul 16 01:12:59 mail mlmmjadmin[1510]: your memory page size is 4096 bytes
Jul 16 01:12:59 mail mlmmjadmin[1510]: detected max file descriptor number: 1024
Jul 16 01:12:59 mail mlmmjadmin[1510]: VirtualHosting mode enabled.
Jul 16 01:12:59 mail mlmmjadmin[1510]: lock engine: pthread robust mutexes
Jul 16 01:12:59 mail mlmmjadmin[1510]: thunder lock: disabled (you can enable it with --thunder-lock)
Jul 16 01:12:59 mail mlmmjadmin[1510]: uwsgi socket 0 bound to TCP address 127.0.0.1:7790 fd 6
Jul 16 01:12:59 mail mlmmjadmin[1510]: Python version: 3.9.16 (main, May 29 2023, 00:00:00)  [GCC 11.3.1 20221121 (Red Hat 11.3.1-4)]
Jul 16 01:12:59 mail mlmmjadmin[1510]: Python main interpreter initialized at 0x260ab400
Jul 16 01:12:59 mail mlmmjadmin[1510]: python threads support enabled
Jul 16 01:12:59 mail mlmmjadmin[1510]: your server socket listen backlog is limited to 100 connections
Jul 16 01:12:59 mail mlmmjadmin[1510]: your mercy for graceful operations on workers is 60 seconds
Jul 16 01:12:59 mail mlmmjadmin[1510]: mapped 437520 bytes (427 KB) for 5 cores
Jul 16 01:12:59 mail mlmmjadmin[1510]: *** Operational MODE: preforking ***

4

Re: mlmmjadmin error

Is there anything I can do to get this working please?

5

Re: mlmmjadmin error

I don't see any error in pasted log.

- Is mlmmjadmin listening on port 7790?
- Do you still have issue with iRedAdmin-Pro?

6

Re: mlmmjadmin error

The mlmmjadmin process shows "failed" when running systemctl status.
I still have the same error showing in iRedAdmin-Pro.

7

Re: mlmmjadmin error

First switch to root user, then run "su -s /bin/bash - mlmmj" to switch to mlmmj user, run commands below and show us the full console output:

cd /opt/mlmmjadmin/
python3 mlmmjadmin.py

8

Re: mlmmjadmin error

[root@mail tools]# su -s /bin/bash - mlmmj
su: warning: cannot change directory to /var/vmail/mlmmj: Permission denied
-bash: /var/vmail/mlmmj/.bash_profile: Permission denied
[mlmmj@mail tools]$ cd /opt/mlmmjadmin/
[mlmmj@mail mlmmjadmin]$ python3 mlmmjadmin.py

9

Re: mlmmjadmin error

There was no output from

 python3 mlmmjadmin.py

10

Re: mlmmjadmin error

The only error I can see is this line from the

systemctl status mlmmjadmin

command:

Process: 229614 ExecStart=/usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid (code=exited, status=255/EXCEPTION)

11

Re: mlmmjadmin error

what are the persmissions on /var/vmail/mlmmj directory:
ls -al /var/vmail

should look like this:
drwx------  2 mlmmj    mlmmj    4096 Jul 19 14:52 mlmmj

and you should be able to su -s /bin/bash - mlmmj

12

Re: mlmmjadmin error

[root@mail ~]# ls -al /var/vmail/
total 4
drwx------   9 vmail vmail  111 Jun 17  2021 .
drwxr-xr-x. 21 root  root  4096 Jul  8 13:18 ..
drwx------   3 vmail vmail   42 Jun 18  2021 backup
drwx------   3 mlmmj mlmmj   95 Sep 10  2021 mlmmj
drwx------   2 mlmmj mlmmj    6 Jun 17  2021 mlmmj-archive
drwx------   2 vmail vmail    6 Jun 17  2021 pgp-keys
drwx------   2 vmail vmail    6 Jun 17  2021 public
drwx------   2 vmail vmail   48 Jun 17  2021 sieve
drwx------   8 vmail vmail  130 Oct 12  2021 vmail1

13

Re: mlmmjadmin error

ok, and what about permissions inside mlmmj directory?
ls -al /var/vmail/mlmmj

here is mine:
-rw------- 1 mlmmj mlmmj   50 Jul 19 14:52 .bash_history
-rw-r--r-- 1 mlmmj mlmmj  220 Feb 25  2020 .bash_logout
-rw-r--r-- 1 mlmmj mlmmj 3771 Feb 25  2020 .bashrc
-rw-r--r-- 1 mlmmj mlmmj  807 Feb 25  2020 .profile

14

Re: mlmmjadmin error

fv wrote:

-bash: /var/vmail/mlmmj/.bash_profile: Permission denied

Remove /var/vmail/mlmmj/.bash_profile and try again.

15

Re: mlmmjadmin error

I found the problem! /var/vmail was not executable for all so mlmmj could not get into his home directory. I fixed it with the following command:

sudo chmod 755 /var/vmail/

Thank you for your help and suggestions!