1 (edited by max.ingresspoint 2020-08-18 06:14:52)

Topic: "Internal Server Error" on IRedMailAdmin module.

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version 1.3.1
- Deployed with the downloadable installer.
- Linux/BSD distribution name and version: CentOS 7 (ARM)
- Store mail accounts in which backend in MySQL (MariaDB)
- Web server Nginx:
- Don't manage mail accounts with iRedAdmin-Pro.
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
After clean installation version 1.3.1 I don't have access to IRedMailAdmin on local network (https://***.***.*.***/iredadmin) because i got exception "Internal Server Error".
Any ideas?
What can I do?

Thnx.

----

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

2

Re: "Internal Server Error" on IRedMailAdmin module.

Any related error in /var/log/messages?

3 (edited by max.ingresspoint 2020-08-18 16:01:49)

Re: "Internal Server Error" on IRedMailAdmin module.

In attach of this message.

Post's attachments

1.png 75.58 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

4

Re: "Internal Server Error" on IRedMailAdmin module.

Any ideas?

5

Re: "Internal Server Error" on IRedMailAdmin module.

Please, tell me, which version of Python should be installed on my server?

6

Re: "Internal Server Error" on IRedMailAdmin module.

Please install package "python2-PyMySQL" and try again.

7 (edited by max.ingresspoint 2020-08-24 17:43:04)

Re: "Internal Server Error" on IRedMailAdmin module.

Ok, thanks. I am trying)

8 (edited by max.ingresspoint 2020-08-24 18:37:50)

Re: "Internal Server Error" on IRedMailAdmin module.

ZhangHuangbin wrote:

Please install package "python2-PyMySQL" and try again.

I am installing package "python2-PyMySQL" and trying again.
But, I still get the error "Internal Server Error" in the iredadmin.
Details in the two attaches for this message.

Post's attachments

2.png
2.png 42.13 kb, 3 downloads since 2020-08-24 

3.png 35.83 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

9

Re: "Internal Server Error" on IRedMailAdmin module.

And periodically I see several messages in the postmaser mailbox, like this:

Cron <root@mail> python2 /opt/www/iredadmin/tools/delete_mailboxes.py
"<<< ERROR >>> Cannot connect to SQL database, aborted. Error: TypeError("cannot concatenate 'str' and 'exceptions.ImportError' objects",)"
_____________________________________________________________________
Cron <root@mail> python3 /opt/iredapd/tools/cleanup_db.py >/dev/null
"Traceback (most recent call last):
  File "/opt/iredapd/tools/cleanup_db.py", line 31, in <module>
    print_left_rows=True)
  File "/opt/iredapd/tools/../tools/__init__.py", line 90, in cleanup_sql_table
    _qr = conn.select(sql_table,
AttributeError: 'NoneType' object has no attribute 'select'"
_____________________________________________________________________
Cron <root@mail> python3 /opt/iredapd/tools/spf_to_greylist_whitelists.py >/dev/null
"Traceback (most recent call last):
  File "/opt/iredapd/tools/spf_to_greylist_whitelists.py", line 91, in <module>
    qr = conn.select('greylisting_whitelist_domains', what='domain')
AttributeError: 'NoneType' object has no attribute 'select'"

10

Re: "Internal Server Error" on IRedMailAdmin module.

It seems the error is caused by lack of python2 mysql libs. I was having the same problem on a recent install of iRedmail 1.3.1 on Ubuntu 20.04. I installed the pymsql lib via pip. I got a security warning about python2.7 being EOL. So you need to decide if that is suitable for your mail server.

# pip install pymysql
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/developme … -2-support
Collecting pymysql
  Downloading PyMySQL-0.10.0-py2.py3-none-any.whl (47 kB)
     |████████████████████████████████| 47 kB 1.7 MB/s
Installing collected packages: pymysql
Successfully installed pymysql-0.10.0

max.ingresspoint wrote:

And periodically I see several messages in the postmaser mailbox, like this:

Cron <root@mail> python2 /opt/www/iredadmin/tools/delete_mailboxes.py
"<<< ERROR >>> Cannot connect to SQL database, aborted. Error: TypeError("cannot concatenate 'str' and 'exceptions.ImportError' objects",)"
_____________________________________________________________________
Cron <root@mail> python3 /opt/iredapd/tools/cleanup_db.py >/dev/null
"Traceback (most recent call last):
  File "/opt/iredapd/tools/cleanup_db.py", line 31, in <module>
    print_left_rows=True)
  File "/opt/iredapd/tools/../tools/__init__.py", line 90, in cleanup_sql_table
    _qr = conn.select(sql_table,
AttributeError: 'NoneType' object has no attribute 'select'"
_____________________________________________________________________
Cron <root@mail> python3 /opt/iredapd/tools/spf_to_greylist_whitelists.py >/dev/null
"Traceback (most recent call last):
  File "/opt/iredapd/tools/spf_to_greylist_whitelists.py", line 91, in <module>
    qr = conn.select('greylisting_whitelist_domains', what='domain')
AttributeError: 'NoneType' object has no attribute 'select'"

11

Re: "Internal Server Error" on IRedMailAdmin module.

Yeaaah)
It's worked! I am happy. Thank you very much.)