1

Topic: iRedAdmin-Pro 2.9.0 - Upgrade

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Centos7
- 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.
====
Just updated to iRedAdmin-Pro 2.9.0. When I try to load I'm getting "internal server error" message.

Apr  3 11:56:21 mail uwsgi: Traceback (most recent call last):                                                                                                                  ┤
Apr  3 11:56:21 mail uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 239, in process                                                                    │
Apr  3 11:56:21 mail uwsgi: return self.handle()                                                                                                                                │
Apr  3 11:56:21 mail uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 230, in handle                                                                     │
Apr  3 11:56:21 mail uwsgi: return self._delegate(fn, self.fvars, args)                                                                                                         ┤
Apr  3 11:56:21 mail uwsgi: File "/usr/lib/python2.7/site-packages/web/application.py", line 416, in _delegate                                                                  │
Apr  3 11:56:21 mail uwsgi: mod = __import__(mod, None, None, [''])                                                                                                             ┤
Apr  3 11:56:21 mail uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.9.0/controllers/sql/basic.py", line 15, in <module>                                                              │
Apr  3 11:56:21 mail uwsgi: from libs.sqllib import utils as sql_lib_utils                                                                                                      ┤
Apr  3 11:56:21 mail uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.9.0/libs/sqllib/utils.py", line 11, in <module>                                                                  ┤
Apr  3 11:56:21 mail uwsgi: from libs.sqllib import user as sql_lib_user                                                                                                        │
Apr  3 11:56:21 mail uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.9.0/libs/sqllib/user.py", line 17, in <module>                                                                   ┤
Apr  3 11:56:21 mail uwsgi: from libs import mlmmj                                                                                                                              ┤
Apr  3 11:56:21 mail uwsgi: File "/var/www/iRedAdmin-Pro-SQL-2.9.0/libs/mlmmj/__init__.py", line 12, in <module>                                                                ┤
Apr  3 11:56:21 mail uwsgi: api_headers = {settings.MLMMJADMIN_API_AUTH_HEADER: settings.mlmmjadmin_api_auth_token}                                                             │
Apr  3 11:56:21 mail uwsgi: AttributeError: 'module' object has no attribute 'mlmmjadmin_api_auth_token'

----

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

2

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Did you upgrade iRedMail to the latest 0.9.8 first? It's required.
This is mentioned in iRedAdmin-Pro download page.

3 (edited by dsp3 2018-04-03 17:23:44)

Re: iRedAdmin-Pro 2.9.0 - Upgrade

ZhangHuangbin wrote:

Did you upgrade iRedMail to the latest 0.9.8 first? It's required.
This is mentioned in iRedAdmin-Pro download page.

I didn't know about 0.9.8 until after. iRedadmin only alerts to new versions of itself. My bad
I have since updated to 0.9.8 and re-run iRedadminPro update. No luck

4

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Ok, so no hints on how to fix iRedAdmin. Understood :-)
How about this one:

MariaDB [(none)]> mysql amavisd
    -> sql> SOURCE /tmp/amavisd.mysql;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'mysql amavisd
sql> SOURCE /tmp/amavisd.mysql' at line 1

5

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Have the same problems ! Internal server error. I followed all update steps!

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 416, in _delegate
    mod = __import__(mod, None, None, [''])
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/controllers/sql/basic.py", line 15, in <module>
    from libs.sqllib import utils as sql_lib_utils
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/sqllib/utils.py", line 11, in <module>
    from libs.sqllib import user as sql_lib_user
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/sqllib/user.py", line 17, in <module>
    from libs import mlmmj
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/mlmmj/__init__.py", line 12, in <module>
    api_headers = {settings.MLMMJADMIN_API_AUTH_HEADER: settings.mlmmjadmin_api_auth_token}
AttributeError: 'module' object has no attribute 'mlmmjadmin_api_auth_token'

6

Re: iRedAdmin-Pro 2.9.0 - Upgrade

dsp3 wrote:

How about this one:

MariaDB [(none)]> mysql amavisd
    -> sql> SOURCE /tmp/amavisd.mysql;

Run shell command "mysql amavisd" first, then it enters MySQL server with prompt character "mysql>" (or "mariadb >"), then run SQL command "SOURCE /tmp/amavisd.mysql;".

7

Re: iRedAdmin-Pro 2.9.0 - Upgrade

bootboy1 wrote:

Have the same problems ! Internal server error. I followed all update steps!

Did you upgrade iRedMail to the latest iRedMail-0.9.8?

In iRedMail-0.9.8, we introduce new components: mlmmj, and mlmmjadmin.
You must install mlmmj and mlmmjadmin by following our tutorials first.
https://docs.iredmail.org/upgrade.iredm … 0.9.8.html

8

Re: iRedAdmin-Pro 2.9.0 - Upgrade

ZhangHuangbin wrote:
dsp3 wrote:

How about this one:

MariaDB [(none)]> mysql amavisd
    -> sql> SOURCE /tmp/amavisd.mysql;

Run shell command "mysql amavisd" first, then it enters MySQL server with prompt character "mysql>" (or "mariadb >"), then run SQL command "SOURCE /tmp/amavisd.mysql;".

In the upgrade tutorial you said:

Connect to MySQL server as MySQL root user, and execute SQL commands:

Without root, it works ;-)

9 (edited by dsp3 2018-04-03 22:32:07)

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Ok, I can now login to iRedAdmin-Pro, but it looks like some of the js isn't working. I noticed from the upgrade, this:

Note: Nginx in iRedMail-0.9.7 loads modular config files from /etc/nginx/sites-conf.d/default/ and /etc/nginx/sites-conf.d/default-ssl/ instead of storing all configurations for default web hosts in one file, in this case you need to:

    rename file /etc/nginx/sites-conf.d/default/99-include-tmpl-misc.conf to /etc/nginx/sites-conf.d/default/1-include-tmpl-misc.conf.
    rename file /etc/nginx/sites-conf.d/default-ssl/99-include-tmpl-misc.conf to /etc/nginx/sites-conf.d/default-ssl/1-include-tmpl-misc.conf.

Restarting Nginx service is required.

I don't have these directories in Nginx /etc/nginx/sites-conf.d/default
Have I missed something?
Can I have links to missing files?

10

Re: iRedAdmin-Pro 2.9.0 - Upgrade

What's the iRedMail version you used for initial installation?

Only iRedMail server which was deployed by iRedMail-0.9.7 has such directories.

11 (edited by dsp3 2018-04-03 23:14:55)

Re: iRedAdmin-Pro 2.9.0 - Upgrade

ZhangHuangbin wrote:

What's the iRedMail version you used for initial installation?

Only iRedMail server which was deployed by iRedMail-0.9.7 has such directories.

Ok. Much earlier than 0.9.7

In Dashboard, info isn't displayed. For instance:

 Top Senders
103    <>
Top Recipients
121    <>

No names.

12

Re: iRedAdmin-Pro 2.9.0 - Upgrade

dsp3 wrote:

In Dashboard, info isn't displayed. For instance:

 Top Senders
103    <>
Top Recipients
121    <>

No names.

I was getting ready to open a separate topic on this exact issue. I was upgrading 0.9.7-Pro following all the steps and everything went ok except for I have no "Top Senders" and "Top Recipients".

Glad I am not the only one.

-Ron

13

Re: iRedAdmin-Pro 2.9.0 - Upgrade

dsp3 wrote:

In Dashboard, info isn't displayed. For instance:

 Top Senders
103    <>
Top Recipients
121    <>

No names.

Same problem here. FYI

14

Re: iRedAdmin-Pro 2.9.0 - Upgrade

dsp3 wrote:

In Dashboard, info isn't displayed. For instance:

 Top Senders
103    <>
Top Recipients
121    <>

No names.

This is expected. "<>" means null sender, usually it's the Postfix itself sent email like non-delivery notification, or bounce messages.

15

Re: iRedAdmin-Pro 2.9.0 - Upgrade

ZhangHuangbin wrote:
dsp3 wrote:

In Dashboard, info isn't displayed. For instance:

 Top Senders
103    <>
Top Recipients
121    <>

No names.

This is expected. "<>" means null sender, usually it's the Postfix itself sent email like non-delivery notification, or bounce messages.

No senders or receivers are displayed anymore even as the message counts increase. Previously, all sender and receiver stats were displayed in the dashboard. Now there is nothing.

16

Re: iRedAdmin-Pro 2.9.0 - Upgrade

ZhangHuangbin wrote:
bootboy1 wrote:

Have the same problems ! Internal server error. I followed all update steps!

Did you upgrade iRedMail to the latest iRedMail-0.9.8?

In iRedMail-0.9.8, we introduce new components: mlmmj, and mlmmjadmin.
You must install mlmmj and mlmmjadmin by following our tutorials first.
https://docs.iredmail.org/upgrade.iredm … 0.9.8.html


I still get a value error , so I can´t edit profiles. Followed every instruction step by step

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
    return handle_class(cls)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
    return tocall(*args)
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/controllers/sql/user.py", line 322, in GET
    _qr = mlmmj.get_subscribed_lists(mail=mail, query_all_lists=False)
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/mlmmj/__init__.py", line 328, in get_subscribed_lists
    qr = r.json()
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 793, in json
    return json.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

[pid: 4097|app: 0|req: 3/7] 213.173.72.10 () {52 vars in 1105 bytes} [Wed Apr  4 09:38:41 2018] GET /iredadmin/profile/user/general/hk@XX.at => generated 21 bytes in 79 msecs (HTTP/1.1 500) 2 headers in 165 bytes (2 switches on core 0)
[pid: 4096|app: 0|req: 5/8] 213.173.75.248 () {48 vars in 793 bytes} [Wed Apr  4 09:40:10 2018] GET /iredadmin/login?msg=LOGIN_REQUIRED => generated 5180 bytes in 271 msecs (HTTP/1.1 200) 2 headers in 146 bytes (2 switches on core 0)

17

Re: iRedAdmin-Pro 2.9.0 - Upgrade

I have the same problem!

Did the upgrade to iredmail 0.9.8.

On FreeBSD 11.1-RELEASE

18

Re: iRedAdmin-Pro 2.9.0 - Upgrade

I get "Internal Server Error" error too when I want to open the iRedadminPro Website.
I did the upgrade to iredmail 0.9.8 and upgraded iRedAdmin-Pro-SQL2.9.0 then.

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 16.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes

Thanks for a hint in advance! Let me know if you need mor information.

19 (edited by upnavigator 2018-04-05 01:25:33)

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Did a re-install of mlmmj. Must have missed something in the first place.

Removed the previous install of iRedAmdin-Pro 2.9.0 and reinstalled

Now it works!

.. but have the issue with no Top Sender and Top Recipients - I can live with that for now.

Top Senders
250    <>
Top Recipients
837    <>

20

Re: iRedAdmin-Pro 2.9.0 - Upgrade

bootboy1 wrote:

I still get a value error , so I can´t edit profiles. Followed every instruction step by step

Did you integrate mlmmj & mlmmjadmin by following iRedMail upgrade tutorial?
It's likely mlmmjadmin service is not running.

21

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Please allow me to explain the empty top senders/recipients in Dashboard issue:

iRedMail-0.9.8 introduces new SQL column 'maddr.email_raw' in Amavisd SQL db, all existing SQL records in 'maddr' table will not have a value in this column, but new records do. So two options now:

1) New iRedAdmin-Pro release hides non-local sender/recipients in the top senders/recipients list. If you want to show non-local, please add setting below in iRedAdmin-Pro config file:

AMAVISD_SHOW_NON_LOCAL_DOMAINS = True

2) If you don't want iRedAdmin-Pro to display non-local, please just wait for some time, after old records were removed by the daily cron job, you will get the top senders/recipients.

22

Re: iRedAdmin-Pro 2.9.0 - Upgrade

Znekar wrote:

I get "Internal Server Error" error too when I want to open the iRedadminPro Website.
I did the upgrade to iredmail 0.9.8 and upgraded iRedAdmin-Pro-SQL2.9.0 then.

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 16.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes

I found the problem. In the settings file /opt/www/iRedAdmin-Pro-SQL-2.9.0/settings.py the entry mlmmjadmin_api_auth_token looked like this:

mlmmjadmin_api_auth_token = '
43a89b7aa34354089e629ed9f9be0b3b'

I made one line for this entry and reinstalled iRedAdmin-Pro-SQL-2.9.0 again. Then the webinterface worked! smile

Hope this helps someone!

23

Re: iRedAdmin-Pro 2.9.0 - Upgrade

ZhangHuangbin wrote:
bootboy1 wrote:

I still get a value error , so I can´t edit profiles. Followed every instruction step by step

Did you integrate mlmmj & mlmmjadmin by following iRedMail upgrade tutorial?
It's likely mlmmjadmin service is not running.

Yes , i did! Just went through all those steps again, stil the same:

Apr  5 12:00:17 mail mlmmjadmin: *** no app loaded. going in full dynamic mode ***
Apr  5 12:00:17 mail mlmmjadmin: *** uWSGI is running in multiple interpreter mode ***
Apr  5 12:00:17 mail mlmmjadmin: spawned uWSGI master process (pid: 36536)
Apr  5 12:00:17 mail mlmmjadmin: spawned uWSGI worker 1 (pid: 36537, cores: 1)
Apr  5 12:00:17 mail mlmmjadmin: spawned uWSGI worker 2 (pid: 36538, cores: 1)
Apr  5 12:00:17 mail mlmmjadmin: spawned uWSGI worker 3 (pid: 36539, cores: 1)
Apr  5 12:00:17 mail mlmmjadmin: spawned uWSGI worker 4 (pid: 36540, cores: 1)
Apr  5 12:00:17 mail mlmmjadmin: spawned uWSGI worker 5 (pid: 36541, cores: 1)
Apr  5 12:01:07 mail mlmmjadmin: --- no python application found, check your startup logs for errors ---
Apr  5 12:01:07 mail mlmmjadmin: 127.0.0.1:7790 [pid: 36538|app: -1|req: -1/1] 127.0.0.1 () {32 vars in 596 bytes} [Thu Apr  5 12:01:07 2018] GET /api/subscriber/xx@xx.at/subscribed?query_all_lists=no&email_only=no => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)
Apr  5 12:02:27 mail mlmmjadmin: --- no python application found, check your startup logs for errors ---
Apr  5 12:02:27 mail mlmmjadmin: 127.0.0.1:7790 [pid: 36540|app: -1|req: -1/2] 127.0.0.1 () {32 vars in 588 bytes} [Thu Apr  5 12:02:27 2018] GET /api/subscriber/xx@xx.at/subscribed?query_all_lists=no&email_only=no => generated 21 bytes in 0 msecs (HTTP/1.1 500) 2 headers in 83 bytes (0 switches on core 0)

24

Re: iRedAdmin-Pro 2.9.0 - Upgrade

bootboy1 wrote:

Apr  5 12:02:27 mail mlmmjadmin: --- no python application found, check your startup logs for errors ---

mlmmjadmin is not running.
What's the full log in mlmmjadmin log file right after you restart mlmmjadmin service?

25 (edited by nuwinfo 2018-04-07 00:49:05)

Re: iRedAdmin-Pro 2.9.0 - Upgrade

My errors are different and yes, I was on iredmail 0.9.8:

Fri Apr  6 18:36:09 2018 - WSGI app 0 (mountpoint='ruhrmail.email|/iredadmin') ready in 1 seconds on interpreter 0x560752d3fe10 pid: 1364
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
    return self.handle()
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
    return self._delegate(fn, self.fvars, args)
  File "/usr/lib/python2.7/dist-packages/web/application.py", line 458, in _delegate
    mod = __import__(mod, None, None, [''])
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/controllers/sql/basic.py", line 15, in <module>
    from libs.sqllib import utils as sql_lib_utils
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/sqllib/utils.py", line 11, in <module>
    from libs.sqllib import user as sql_lib_user
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/sqllib/user.py", line 17, in <module>
    from libs import mlmmj
  File "/opt/www/iRedAdmin-Pro-SQL-2.9.0/libs/mlmmj/__init__.py", line 12, in <module>
    api_headers = {settings.MLMMJADMIN_API_AUTH_HEADER: settings.mlmmjadmin_api_auth_token}
AttributeError: 'module' object has no attribute 'mlmmjadmin_api_auth_token'

ruhrmail.email [pid: 1364|app: 0|req: 1/1] 46.81.48.139 () {52 vars in 864 bytes} [Fri Apr  6 18:36:08 2018] GET /verwaltung => generated 21 bytes in 1945 msecs (HTTP/1.1 500) 2 headers in 165 bytes (2 switches on core 0)

###
I have a redirect in iredadmin.tmpl (German) - this worked until the update:

# iRedAdmin: redirect /iredadmin to /iredadmin/
location = /verwaltung {
    rewrite ^ /iredadmin/;

calling ~/verwaltung or  ~/iredadmin/ produces the above error while ~/iredadmin and  ~/verwaltung/ lead to "not found" .