1

Topic: cron <<< ERROR >>> Cannot connect to SQL database

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

Daily mails with subject: Cron <root@hostname> python2 /opt/www/iredadmin/tools/delete_mailboxes.py

Body:
<<< ERROR >>> Cannot connect to SQL database, aborted. Error: TypeError("cannot concatenate 'str' and 'exceptions.ImportError' objects",)






Hi,
I made a fresh install of 1.3.1 yesterday, without the web-UI. I can create and change users via generated scripts in MariaDB and access my created accounts. During night I receive the emails mentioned above on my default postmaster account.

The releasenotes are pointing out that there exists an issue on FreeBSD. Somebody mentioned exactly my issue, but was closed with reference to FreeBSD. I use Ubuntu 20.04 LTS. Is this aknow issue here two.

----

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

2

Re: cron <<< ERROR >>> Cannot connect to SQL database

Please show us command output:

ls -l /usr/bin/python2 /usr/local/bin/python2
python2 /opt/www/iredadmin/tools/delete_mailboxes.py

3

Re: cron <<< ERROR >>> Cannot connect to SQL database

ls -l /usr/bin/python2 /usr/local/bin/python2
ls: cannot access '/usr/local/bin/python2': No such file or directory
lrwxrwxrwx 1 root root 9 Mar 13 13:31 /usr/bin/python2 -> python2.7

python2 /opt/www/iredadmin/tools/delete_mailboxes.py
Traceback (most recent call last):
  File "/opt/www/iredadmin/tools/delete_mailboxes.py", line 50, in <module>
    from tools import ira_tool_lib
  File "/opt/www/iredadmin/tools/../tools/ira_tool_lib.py", line 20, in <module>
    import settings
ImportError: No module named settings

4

Re: cron <<< ERROR >>> Cannot connect to SQL database

Please show us output of command below:

ls -dl /opt/www/iredadmin/settings.py

5

Re: cron <<< ERROR >>> Cannot connect to SQL database

ZhangHuangbin wrote:

Please show us output of command below:

ls -dl /opt/www/iredadmin/settings.py

I have same issue, and when i run command ls -dl /opt/www/iredadmin/settings.py show result below

-r-------- 1 iredadmin iredadmin 4736 Sep 21 04:56 /opt/www/iredadmin/settings.py

6

Re: cron <<< ERROR >>> Cannot connect to SQL database

rachmad.eepis wrote:

I have same issue, and when i run command ls -dl /opt/www/iredadmin/settings.py show result below

What's your issue? Please explain with details and related error message/log.
Better always create a new forum topic for your own issue.

7

Re: cron <<< ERROR >>> Cannot connect to SQL database

ZhangHuangbin wrote:
rachmad.eepis wrote:

I have same issue, and when i run command ls -dl /opt/www/iredadmin/settings.py show result below

What's your issue? Please explain with details and related error message/log.
Better always create a new forum topic for your own issue.

my issue is same like in this forum.
<<< ERROR >>> Cannot connect to SQL database, aborted. Error: TypeError("cannot concatenate 'str' and 'exceptions.ImportError' objects",)

when i try to search the solution in the iredmail forum, in this forum (https://forum.iredmail.org/topic17213-i … ation.html) say that I have to wait for some more days.

I have alternative to download the iredmail previously version but I can't find them, do you have any suggest ?

8

Re: cron <<< ERROR >>> Cannot connect to SQL database

rachmad.eepis wrote:

<<< ERROR >>> Cannot connect to SQL database, aborted. Error: TypeError("cannot concatenate 'str' and 'exceptions.ImportError' objects",)

Please show me context lines above this one. Also, which iRedAdmin(-Pro) release are you running?

9

Re: cron <<< ERROR >>> Cannot connect to SQL database

Same exact issue here! Happened on a totally stock ubuntu LTS

10

Re: cron <<< ERROR >>> Cannot connect to SQL database

Which version of iRedAdmin(-Pro) are you running?