1

Topic: mlmmjadmin upgrade problems

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 4.3 (mysql)
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

hi,

I'm currently in the upgrade process to the latest iredmail etc., but I'm having issues with mlmmjadmin.

The first error I've got was when executing the

~/mlmmjadmin-3.1.3/tools# bash upgrade_mlmmjadmin.sh

The error was "pymysql.err.OperationalError: (1045, "Access denied for user 'vmailadmin'@'localhost' (using password: YES)")"
But I could fix that easily and fast by looking up the password in /opt/mlmmjadmin/settings.py and apply that to mysql.
Then I ran the upgrade again and got this error, which I don't know how to fix:

* Detected Linux/BSD distribution: UBUNTU
Install package: python3 python3-pip python3-requests uwsgi-plugin-python3 python3-pymysql
* Found mlmmjadmin: /opt/mlmmjadmin, symbol link of /opt/mlmmjadmin-3.1.3
* Found old config file: /opt/mlmmjadmin/settings.py
* Copying new version to /opt/mlmmjadmin-3.1.3
* Copy /opt/mlmmjadmin/settings.py.
cp: '/opt/mlmmjadmin/settings.py' and '/opt/mlmmjadmin-3.1.3/settings.py' are the same file
* Removing old symbol link /opt/mlmmjadmin
* Creating symbol link: /opt/mlmmjadmin-3.1.3 -> /opt/mlmmjadmin
* Copy systemd service file.
'/opt/mlmmjadmin/rc_scripts/systemd/debian.service' -> '/lib/systemd/system/mlmmjadmin.service'
Created symlink /etc/systemd/system/multi-user.target.wants/mlmmjadmin.service → /lib/systemd/system/mlmmjadmin.service.
* mlmmjadmin has been successfully upgraded.
* Restarting service: mlmmjadmin.
* Sync mailing list profiles to SQL/LDAP.
Traceback (most recent call last):
  File "tools/sync_profiles_to_db.py", line 251, in <module>
    qr = sync_owners(mail, owners)
  File "tools/sync_profiles_to_db.py", line 234, in sync_owners
    address_type="owner")
  File "tools/sync_profiles_to_db.py", line 182, in __sync_addresses
    where="address=$mail")
  File "/usr/local/lib/python3.6/dist-packages/web/db.py", line 1175, in delete
    self._db_execute(db_cursor, q)
  File "/usr/local/lib/python3.6/dist-packages/web/db.py", line 764, in _db_execute
    out = cur.execute(query, params)
  File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 165, in execute
    result = self._query(query)
  File "/usr/lib/python3/dist-packages/pymysql/cursors.py", line 321, in _query
    conn.query(q)
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 860, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1061, in _read_query_result
    result.read()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1349, in read
    first_packet = self.connection._read_packet()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 1018, in _read_packet
    packet.check_error()
  File "/usr/lib/python3/dist-packages/pymysql/connections.py", line 384, in check_error
    err.raise_mysql_exception(self._data)
  File "/usr/lib/python3/dist-packages/pymysql/err.py", line 107, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table 'vmail.maillist_owners' doesn't exist")
* Upgrading completed.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team.

2

Re: mlmmjadmin upgrade problems

Also after upgrading to iRedAdmin Pro 5.1 SQL I get "internal server error" when accessing the iredadmin portal and login on roundcubemail runs into a timeout.

3 (edited by lug 2022-05-08 21:06:06)

Re: mlmmjadmin upgrade problems

/var/log/nginx/error.log (when clicking login on roundcubemail)

2022/05/08 14:50:42 [error] 4922#4922: *16 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 31.17.xx.xx, server: _, request: "GET /mail/?_task=mail&_token=censored HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.2-fpm.sock", host: "myhostname.mydomain.tld", referrer: "https://myhostname.mydomain.tld/mail/"

service iredadmin status

● iredadmin.service - iRedAdmin daemon service
   Loaded: loaded (/lib/systemd/system/iredadmin.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2022-05-08 15:03:06 CEST; 2s ago
  Process: 2882 ExecStopPost=/bin/rm -rf /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 2880 ExecStop=/usr/bin/uwsgi --stop /var/run/iredadmin/iredadmin.pid (code=exited, status=0/SUCCESS)
  Process: 2895 ExecStartPre=/bin/chmod 0755 /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 2892 ExecStartPre=/bin/chown iredadmin:iredadmin /var/run/iredadmin (code=exited, status=0/SUCCESS)
  Process: 2885 ExecStartPre=/bin/mkdir -p /var/run/iredadmin (code=exited, status=0/SUCCESS)
 Main PID: 2904 (uwsgi)
    Tasks: 6 (limit: 4656)
   CGroup: /system.slice/iredadmin.service
           ├─2904 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─2911 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─2913 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─2914 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           ├─2916 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
           └─2917 /usr/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid

May 08 15:03:06 myhostname iredadmin[2904]: *** Operational MODE: preforking ***
May 08 15:03:06 myhostname iredadmin[2904]: WSGI app 0 (mountpoint='') ready in 0 seconds on interpreter 0x5597d611d4f0 pid: 2904 (default app)
May 08 15:03:06 myhostname iredadmin[2904]: dropping root privileges after application loading
May 08 15:03:06 myhostname iredadmin[2904]: *** uWSGI is running in multiple interpreter mode ***
May 08 15:03:06 myhostname iredadmin[2904]: spawned uWSGI master process (pid: 2904)
May 08 15:03:06 myhostname iredadmin[2904]: spawned uWSGI worker 1 (pid: 2911, cores: 1)
May 08 15:03:06 myhostname iredadmin[2904]: spawned uWSGI worker 2 (pid: 2913, cores: 1)
May 08 15:03:06 myhostname iredadmin[2904]: spawned uWSGI worker 3 (pid: 2914, cores: 1)
May 08 15:03:06 myhostname iredadmin[2904]: spawned uWSGI worker 4 (pid: 2916, cores: 1)
May 08 15:03:06 myhostname iredadmin[2904]: spawned uWSGI worker 5 (pid: 2917, cores: 1)

4

Re: mlmmjadmin upgrade problems

first of all: ubuntu 18.04 isn't supported anymore

pymysql.err.ProgrammingError: (1146, "Table 'vmail.maillist_owners' doesn't exist")

seems you missed some database upgrade scripts aswell

4.3 was an very old version, did you do every single update, or just the newest one? because that won't work

5 (edited by lug 2022-05-09 14:51:07)

Re: mlmmjadmin upgrade problems

Cthulhu wrote:

first of all: ubuntu 18.04 isn't supported anymore

Why is iredmail always dropping support for OS's, that are still well in their lifetime sad
The last time the upgrade installer would'nt run if the OS is not supported, seems like this feature was removed then...
Neertheless, I run another instance on another Ubuntu 18.04 Server, and it's fine.

Cthulhu wrote:

pymysql.err.ProgrammingError: (1146, "Table 'vmail.maillist_owners' doesn't exist")

seems you missed some database upgrade scripts aswell

No, I guess the problem is the upgrade procedures are written to be done at that exact moment the author writes the how-to. Because the tutorial said to upgrade to the latest version of mlmmjadmin, which did not have that table at that time. Today I re-executed it, and it went fine without any errors, but the webinterface and roundcube still don't work.

Cthulhu wrote:

4.3 was an very old version, did you do every single update, or just the newest one? because that won't work

iRedAdmin was the last thing I updated, before I followed this path: https://docs.iredmail.org/iredmail.releases.html

Then I directly migrated from 4.3 to 5.1, as it seems there is no way to get older releases.

6

Re: mlmmjadmin upgrade problems

Fixed the problem, changing the password of vmailadmin was the cause.

/root/.my.cnf-vmailadmin

had the old password in it, which I have now stored for the user in mysql and saved in the

/opt/mlmmjadmin/settings.py

file.

7

Re: mlmmjadmin upgrade problems

Cthulhu wrote:

first of all: ubuntu 18.04 isn't supported anymore

Hi @Cthulhu,

Ubuntu 18.04 is not supported for NEW iRedMail installation, but upgrading iRedMail on a running 18.04 server is ok.