1

Topic: Problem with mlmmjadmin

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Debian GNU/Linux 7 (wheezy)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?  NO
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi!
When I start maillist_admin.py constantly get the error.
Example:
/opt/mlmmjadmin/tools# python maillist_admin.py create list@mydomain.xxx
Traceback (most recent call last):
  File "maillist_admin.py", line 135, in <module>
    _json = r.json()
TypeError: 'dict' object is not callable

or

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

----

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

2

Re: Problem with mlmmjadmin

Is mlmmjadmin service running?

3

Re: Problem with mlmmjadmin

ZhangHuangbin wrote:

Is mlmmjadmin service running?

Yes
# ps aux |grep [m]lmmj
mlmmj     3469  0.0  0.0 100384 11784 ?        S    09:21   0:00 uwsgi -d --ini /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid --log-syslog
mlmmj     3527  0.0  0.0 100384  8824 ?        S    09:21   0:00 uwsgi
mlmmj     3528  0.0  0.0 100384  8824 ?        S    09:21   0:00 uwsgi
mlmmj     3529  0.0  0.0 100384  8820 ?        S    09:21   0:00 uwsgi
mlmmj     3530  0.0  0.0 100384  8824 ?        S    09:21   0:00 uwsgi
mlmmj     3531  0.0  0.0 100384  8824 ?        S    09:21   0:00 uwsgi

# service --status-all
.........
[ + ]  mlmmjadmin
...........

4

Re: Problem with mlmmjadmin

It doesn't look like mlmmjadmin is running. Could you try to stop it first, then start it?

Make sure port 7790 is listening, also /var/log/mlmmjadmin/mlmmjadmin.log has some log.

5

Re: Problem with mlmmjadmin

ZhangHuangbin wrote:

It doesn't look like mlmmjadmin is running. Could you try to stop it first, then start it?

Make sure port 7790 is listening, also /var/log/mlmmjadmin/mlmmjadmin.log has some log.

Hi!

/opt# ll
...
lrwxrwxrwx  1 root  root     19 Окт 12 17:30 mlmmjadmin -> /opt/mlmmjadmin-1.7
...
/opt# service mlmmjadmin stop
mlmmjadmin is already stopped.
opt# service mlmmjadmin start
Starting mlmmjadmin ...
[uWSGI] getting INI configuration from /opt/mlmmjadmin/rc_scripts/uwsgi/debian.ini
/opt/mlmmjadmin/tools# service mlmmjadmin status
mlmmjadmin is running.
root@mail.atanor.ru:/opt/mlmmjadmin/tools# netstat -ntlp | grep 7790
tcp        0      0 127.0.0.1:7790          0.0.0.0:*               LISTEN      28969/uwsgi     
/opt# cd mlmmjadmin/tools/
/opt/mlmmjadmin/tools# python maillist_admin.py info list@mydomain.xx
Traceback (most recent call last):
  File "maillist_admin.py", line 119, in <module>
    _json = r.json()
TypeError: 'dict' object is not callable


*******
But in the log file operations for some reason are not recorded 8-0 
*********
# date -u
Fri Oct 12 14:44:20 UTC 2018
# ll /var/log/mlmmjadmin/
-rw-r----- 1 root adm 4803 Oct 10 17:52 mlmmjadmin.log
# tail -n 10 /var/log/mlmmjadmin/mlmmjadmin.log
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated: moderators -> postmaster@mydomain.xxx
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (list) parameter: moderators -> postmaster@mydomain.xxx
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (boolean) parameter: notifymod -> no
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (boolean) parameter: tocc -> yes
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated: owner -> postmaster@mydomain.xxx
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (list) parameter: owner -> ['postmaster@mydomain.xxx']
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (normal) parameter: smtpport -> 10027
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (boolean) parameter: subonlyget -> yes
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated: customheaders -> List-Unsubscribe: <mailto:list+unsubscribe@mydomain.xxx?subject=Unsubscribe>, Reply-To: list@mydomain.xxx, X-Mailing-List: list@mydomain.xxx, List-Subscribe: <mailto:list+subscribe@mydomain.xxx?subject=Subscribe>, Precedence: list
Oct 10 17:52:54 mail mlmmjadmin INFO [127.0.0.1] list@mydomain.xxx, updated (list) parameter: customheaders -> ['List-Unsubscribe: <mailto:list+unsubscribe@mydomain.xxx?subject=Unsubscribe>', 'Reply-To: list@mydomain.xxx', 'X-Mailing-List: list@mydomain.xxx', 'List-Subscribe: <mailto:list+subscribe@mydomain.xxx?subject=Subscribe>', 'Precedence: list']

6

Re: Problem with mlmmjadmin

imak wrote:

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

Is it possible to give me direct ssh access for troubleshooting?

7

Re: Problem with mlmmjadmin

>> Is it possible to give me direct ssh access for troubleshooting?

I'm sorry, but corporate policy forbids it. :-)

8

Re: Problem with mlmmjadmin

ok, it's harder for me to troubleshoot.

Try to turn on debug mode in /opt/mlmmjadmin/settings.py ("log_level =" parameter), restart mlmmjadmin.

9

Re: Problem with mlmmjadmin

after enabling debug mode and running

/opt/mlmmjadmin/tools# python maillist_admin.py info ...

the following entries appeared in the log file:

/var/log# cat mlmmjadmin/mlmmjadmin.log
Oct 17 14:54:11 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...
Oct 17 14:54:11 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...
Oct 17 14:54:11 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...
Oct 17 14:54:11 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...

10

Re: Problem with mlmmjadmin

Any mlmmjadmin log in /var/log/syslog or other log files?

11

Re: Problem with mlmmjadmin

# grep -r mlmmjadmin  /var/log/*
/var/log/debug:Oct 22 11:31:51 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...
....... (2 repeats)
/var/log/debug:Oct 22 11:31:51 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...

/var/log/messages:Oct 22 11:31:03 mail uwsgi: writing pidfile to /var/run/mlmmjadmin/mlmmjadmin.pid
/var/log/messages.1:Oct 17 13:56:23 mail uwsgi: current working directory: /opt/mlmmjadmin-1.7

/var/log/messages.1:Oct 17 13:56:23 mail uwsgi: writing pidfile to /var/run/mlmmjadmin/mlmmjadmin.pid
........ (2 repeats)
/var/log/messages.1:Oct 17 14:53:28 mail uwsgi: writing pidfile to /var/run/mlmmjadmin/mlmmjadmin.pid

/var/log/mlmmjadmin/mlmmjadmin.log:Oct 22 11:31:51 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...
... ( 2 repeats)
/var/log/mlmmjadmin/mlmmjadmin.log:Oct 22 11:31:51 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...

/var/log/syslog:Oct 22 11:31:03 mail uwsgi: writing pidfile to /var/run/mlmmjadmin/mlmmjadmin.pid
/var/log/syslog:Oct 22 11:31:51 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...
....  (2 repeats)
/var/log/syslog:Oct 22 11:31:51 mail mlmmjadmin DEBUG [127.0.0.1] API AUTH TOKEN: 206aa779...

12

Re: Problem with mlmmjadmin

Any uwsgi related error in log files?

13

Re: Problem with mlmmjadmin

ZhangHuangbin wrote:

Any uwsgi related error in log files?

No errors found, but after executing the script:
# python maillist_admin.py info list@mydomain.xxx
Traceback (most recent call last):
  File "maillist_admin.py", line 119, in <module>
    _json = r.json()
TypeError: 'dict' object is not callable

appears such an entry in the log:
# grep -r uwsgi /var/log/messages
Oct 29 20:23:45 mail uwsgi: mail.mydomain.xxx [pid: 17500|app: 0|req: 1/4] 127.0.0.1 () {28 vars in 426 bytes} [Mon Oct 29 20:23:45 2018] GET /api/list@mydomain.xxx => generated 1558 bytes in 426 msecs (HTTP/1.1 200) 1 headers in 51 bytes (2 switches on core 0)

14

Re: Problem with mlmmjadmin

Is it possible to give me direct ssh access for troubleshooting? Contact me: https://www.iredmail.org/contact.html

15

Re: Problem with mlmmjadmin

ZhangHuangbin wrote:

Is it possible to give me direct ssh access for troubleshooting? Contact me: https://www.iredmail.org/contact.html

Thank you!  I solved problem.
Debian Wheezy is installed on the server. I had a suspicion that the problem was in older versions of some packages. Today it is possible to update the server from the wheezy-backports repository. The update helped.
Thank you very much for iredmail and your desire to help!  :-)

P.S.
Sorry for my bad English.