1 (edited by ppnm 2018-05-14 17:31:44)

Topic: "internal server error" instead of the some page

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- 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.
======== Required information ====
- iRedMail version: 0.9.8
- Linux distribution name and version: CentOS Linux release 7.5.1804 (Core)
- Store mail accounts in which backend: MySQL
- Web server: nginx/1.12.2
- Manage mail accounts with iRedAdmin-Pro? iRedAdmin-Pro-SQL 2.9.0
====

Hi,
I updated iRedMail from version 0.9.7 to 0.9.8 in accordance with the tutorial.
Also IredAdmin-Pro was changed from version 2.8.0 to 2.9.0.
Actions were carried out in accordance with  https://docs.iredmail.org/integration.mlmmj.mysql.html


Now when I press the button "Edit" on the account I see the page "internal server error". The same page I see when press "Preferences" (https://MYSERVER.COM/iredadmin/profile/ … SERVER.COM)


# systemctl status  mlmmjadmin

● mlmmjadmin.service - RESTful API server used to manage mlmmj mailing list manager
   Loaded: loaded (/usr/lib/systemd/system/mlmmjadmin.service; enabled; vendor preset: disabled)
   Active: active (running) since Пн 2018-05-14 11:56:23 MSK; 33s ago
  Process: 447 ExecStopPost=/usr/bin/rm -rf /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
  Process: 446 ExecStop=/usr/sbin/uwsgi --stop /var/run/mlmmjadmin/mlmmjadmin.pid (code=exited, status=0/SUCCESS)
  Process: 454 ExecStartPre=/usr/bin/chmod 0755 /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
  Process: 452 ExecStartPre=/usr/bin/chown mlmmj:mlmmj /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
  Process: 451 ExecStartPre=/usr/bin/mkdir /var/run/mlmmjadmin (code=exited, status=0/SUCCESS)
Main PID: 456 (uwsgi)
   CGroup: /system.slice/mlmmjadmin.service
           ├─456 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
           ├─459 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
           ├─460 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
           ├─461 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
           ├─462 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
           └─463 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid

May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: unable to load app 0 (mountpoint='') (callable not found or import error)
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: *** no app loaded. going in full dynamic mode ***
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: dropping root privileges after application loading
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: *** uWSGI is running in multiple interpreter mode ***
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: spawned uWSGI master process (pid: 456)
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: spawned uWSGI worker 1 (pid: 459, cores: 1)
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: spawned uWSGI worker 2 (pid: 460, cores: 1)
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: spawned uWSGI worker 3 (pid: 461, cores: 1)
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: spawned uWSGI worker 4 (pid: 462, cores: 1)
May 14 11:56:24 relay.polyplast-nm.ru uwsgi[456]: spawned uWSGI worker 5 (pid: 463, cores: 1)


I have next strings in /opt/mlmmjadmin/settings.py

backend_api = 'bk_none'
backend_cli = 'bk_iredmail_sql'

iredmail_sql_db_type = 'mysql'
iredmail_sql_db_server = '127.0.0.1'
iredmail_sql_db_port = 3306
iredmail_sql_db_name = 'vmail'
iredmail_sql_db_user = 'vmail'
iredmail_sql_db_password = 'PASSWORD'

MLMMJ_SPOOL_DIR = '/data/vmail/mlmmj'
MLMMJ_ARCHIVE_DIR = '/data/vmail/mlmmj-archive'
MLMMJ_DEFAULT_PROFILE_SETTINGS.update({'smtp_port': 10027})

User vmail have the permissions on the database vmail, password is correct.

Where could I be mistaken and what can I do?
Please, tell me.

----

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

2 (edited by csem 2018-05-15 22:39:16)

Re: "internal server error" instead of the some page

Hey Guys,

i have the same issue with a python TypeError. Any help?


root@mail81:/var/log/apache2# less error.log

[Tue May 15 16:33:33 2018] [error] [client 2] Traceback (most recent call last):
[Tue May 15 16:33:33 2018] [error] [client 2]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 239, in process
[Tue May 15 16:33:33 2018] [error] [client 2]     return self.handle()
[Tue May 15 16:33:33 2018] [error] [client 2]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 230, in handle
[Tue May 15 16:33:33 2018] [error] [client 2]     return self._delegate(fn, self.fvars, args)
[Tue May 15 16:33:33 2018] [error] [client 2]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 420, in _delegate
[Tue May 15 16:33:33 2018] [error] [client 2]     return handle_class(cls)
[Tue May 15 16:33:33 2018] [error] [client 2]   File "/usr/lib/python2.7/dist-packages/web/application.py", line 396, in handle_class
[Tue May 15 16:33:33 2018] [error] [client 2]     return tocall(*args)
[Tue May 15 16:33:33 2018] [error] [client 2]   File "/usr/share/apache2/iredadmin/controllers/sql/user.py", line 322, in GET
[Tue May 15 16:33:33 2018] [error] [client 2]     _qr = mlmmj.get_subscribed_lists(mail=mail, query_all_lists=False)
[Tue May 15 16:33:33 2018] [error] [client 2]   File "/usr/share/apache2/iredadmin/libs/mlmmj/__init__.py", line 328, in get_subscribed_lists
[Tue May 15 16:33:33 2018] [error] [client 2]     qr = r.json()
[Tue May 15 16:33:33 2018] [error] [client 2] TypeError: 'NoneType' object is not callable

3

Re: "internal server error" instead of the some page

Hey Guys,


after reading that post here, https://forum.iredmail.org/topic14117-p … -user.html
my error has changed to:

root@xxx:/opt/mlmmjadmin/tools# python maillist_admin.py info ma_list@domain.com
Traceback (most recent call last):
  File "maillist_admin.py", line 119, in <module>
    _json = r.json()
TypeError: 'dict' object is not callable

it have to be something stupid but i dont get it. Anyone with help?

4 (edited by csem 2018-05-17 23:54:56)

Re: "internal server error" instead of the some page

Still not working, but some strange things are happening

root@xxxxx:~/tmp2# ls -la
insgesamt 8
drwxr-xr-x  2 root root 4096 Mai 17 17:49 .
drwx------ 18 root root 4096 Mai 17 17:49 ..

root@xxx:~/tmp2# /etc/init.d/mlmmjadmin start
Starting mlmmjadmin ...
[uWSGI] getting INI configuration from /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini

root@xxx:~/tmp2# ls -la
insgesamt 8
drwxr-xr-x  2 root root 4096 Mai 17 17:49 .
drwx------ 18 root root 4096 Mai 17 17:49 ..
-rw-r-----  1 root root    0 Mai 17 17:49 --ini      <<<<--- what?
root@xxx:~/tmp2# 

Why is that happening?

And if I change

   _json = r.json() 

to

  _json = r.json 

all works fine. But i am not going to change the hole project, its cheaper to delete it all and subscribe @google-mail-shit...

Really, if we do have here any active Mods oder Support - please help.

Thx.

5

Re: "internal server error" instead of the some page

Lets do it dirty... to get the iredadmin-panel working you just have to
repair  /usr/share/apache2/iredadmin/libs/mlmmj/__init__.py  on line 327.

Change (on line 327)

qr = r.json() 

to

qr = r.json

Mailing still not working, but ey.. maling-list.. really?

Cheers
CS

6

Re: "internal server error" instead of the some page

ppnm wrote:

iredmail_sql_db_user = 'vmail'

This SQL db user must have write permission to the "vmail" database, so you should use SQL user "vmailadmin".

Your change to "qr = r.json()" is wrong. I need the latest error message triggered in iRedAdmin-Pro.

7

Re: "internal server error" instead of the some page

Hi!
Thanks for your help.
I changed the user "vmail" to user "vmailadmin" in config-file (/opt/mlmmjadmin/settings.py)  and restart Server but the problem persisted.
I connect to SQL server by vmailadmin successfully. This is tha grants of user

MariaDB [vmail]> SHOW GRANTS FOR vmailadmin@localhost;
+-------------------------------------------------------------------------------------------------------------------+
| Grants for vmailadmin@localhost                                                                                   |
+-------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'vmailadmin'@'localhost' IDENTIFIED BY PASSWORD 'PASSWORD' |
| GRANT SELECT, INSERT, UPDATE, DELETE ON `vmail`.* TO 'vmailadmin'@'localhost' 
+-------------------------------------------------------------------------------------------------------------------+

It is right?

8

Re: "internal server error" instead of the some page

Try this:

*) Stop mlmmjadmin service:

service mlmmjadmin stop

*) Start mlmmjadmin service manually:

cd /opt/mlmmjadmin/
python mlmmjadmin.py

*) Login to iRedAdmin-Pro and trigger the issue.
*) Check the terminal you run "python mlmmjadmin.py", any error message?

9

Re: "internal server error" instead of the some page

ZhangHuangbin wrote:

Check the terminal you run "python mlmmjadmin.py", any error message?

Yes, i have an error after running the command

Traceback (most recent call last):
  File "mlmmjadmin.py", line 16, in <module>
    import settings
  File "/opt/mlmmjadmin-1.3/settings.py", line 44
    api_auth_tokens = [********]
                                                      ^
SyntaxError: invalid syntax.


I corrected the entry api_auth_tokens = [********]to api_auth_tokens = [' ******** '] (add symbol ' )/
It's my mistake. Thank you!