1

Topic: jinja2 python not found but installed

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):
- Deployed with iRedMail Easy or the downloadable installer?
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
iRedMail Version:1.6.2 MARIADB edition.
Download Installer
Rocky Linux 8.7
MariaDB
NGINX
IredAdmin Pro

Recently moved our mail server to a new system, and things like roundcube work, and people can send and receive email, but the iredadmin interface broke after I did the final move. I had been running the pro addon for a few days on both prior to final migration to test if that makes a difference. The old server has been decommissioned and shut down but not sure that should have mattered in this case.

Feb 22 02:40:21 email iredadmin[830]: Traceback (most recent call last):
Feb 22 02:40:21 email iredadmin[830]:  File "/opt/www/iRedAdmin-Pro-SQL-5.3/iredadmin.py", line 8, in <module>
Feb 22 02:40:21 email iredadmin[830]:    from libs import iredbase
Feb 22 02:40:21 email iredadmin[830]:  File "/opt/www/iRedAdmin-Pro-SQL-5.3/libs/iredbase.py", line 6, in <module>
Feb 22 02:40:21 email iredadmin[830]:    from jinja2 import Environment, FileSystemLoader
Feb 22 02:40:21 email iredadmin[830]: ModuleNotFoundError: No module named 'jinja2'
Feb 22 02:40:21 email iredadmin[830]: unable to load app 0 (mountpoint='mail.tld.com|/iredadmin') (callable not found or import error)
Feb 22 02:40:21 email iredadmin[830]: --- no python application found, check your startup logs for errors ---
Feb 22 02:40:21 email iredadmin[830]: [168.245.183.162] GET /iredadmin 500 104 "-"

----

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

2

Re: jinja2 python not found but installed

Please install package "python3-jinja2" and restart "iredadmin" service:

yum -y install python3-jinja2
service iredadmin restart

3

Re: jinja2 python not found but installed

ZhangHuangbin wrote:

Please install package "python3-jinja2" and restart "iredadmin" service:

yum -y install python3-jinja2
service iredadmin restart

Sorry for not posting this after my initial, I had already verified that jinja2 was installed, and even reinstalled it.

Ironically, just to try something, I re-ran the iRedAdmin-Pro upgrade install script, and after that it started working. So while I am unsure of what was actually wrong, it did fix it. Self healing for the win I guess.