1

Topic: New problem with iredadmin pro

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: OpenBSD 6.8 GENERIC.MP#1 amd64
- 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.
====

To my knowledge there have been no updates to the server since installed.

Strange problem cropped up this week so I started a debug instance, when I go to edit any user profile (say to change the password) I get the following:

[10/Dec/2020 22:30:07] "HTTP/1.1 GET /profile/user/general/user@example.com" - 303 See Other

In the browser I get:
Error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)') 
as an error message as it send me back to the domain users screen.

I tried reinstalling iRedAdmin-Pro. It reinstalled without issue but the error remains.

2

Re: New problem with iredadmin pro

Is mlmmjadmin service running?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: New problem with iredadmin pro

It appears to be:

mail0# /etc/rc.d/mlmmjadmin check                                                                                                                   
mlmmjadmin(ok)
mail0# ps -ax | grep mlmm
91673 ??  S        0:03.11 /usr/local/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini --log-syslog --pidfile /var/run/mlmmjadmin/mlmmja
81014 ??  I        0:00.03 /usr/local/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini --log-syslog --pidfile /var/run/mlmmjadmin/mlmmja
14371 ??  I        0:00.02 /usr/local/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini --log-syslog --pidfile /var/run/mlmmjadmin/mlmmja
49493 ??  I        0:00.04 /usr/local/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini --log-syslog --pidfile /var/run/mlmmjadmin/mlmmja
71941 ??  I        0:00.03 /usr/local/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini --log-syslog --pidfile /var/run/mlmmjadmin/mlmmja
9368 ??  I        0:00.03 /usr/local/bin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini --log-syslog --pidfile /var/run/mlmmjadmin/mlmmja

mail0# more /opt/mlmmjadmin/rc_scripts/uwsgi/openbsd.ini                                                                                           
[uwsgi]
master = true
vhost = true
enable-threads = true
processes = 5
logger = syslog:mlmmjadmin,local5
log-format = [%(addr)] %(method) %(uri) %(status) %(size) "%(referer)"

http-socket = 127.0.0.1:7790

# rc script will run program as mlmmj user, so no need to set uid/gid here.
#uid = mlmmj
#gid = mlmmj

chdir = /opt/mlmmjadmin
wsgi-file = mlmmjadmin.py
mail0# netstat -na | grep 779
tcp          0      0  127.0.0.1.7791         *.*                    LISTEN
tcp          0      0  127.0.0.1.7790         *.*                    LISTEN
tcp          0      0  127.0.0.1.7779         *.*                    LISTEN

4 (edited by hopp 2020-12-11 23:40:17)

Re: New problem with iredadmin pro

I upgraded to 4.7 but the problem still persists:

mail0# bash upgrade_iredadmin.sh                                                                                                                   
* Detected Linux/BSD distribution: OPENBSD
* HTTP server root: /opt/www
* Found iRedAdmin directory: /opt/www/iredadmin, symbol link of iRedAdmin-Pro-SQL-4.6
* Found iRedAdmin config file: /opt/www/iredadmin/settings.py
* Copying new version to /opt/www/iRedAdmin-Pro-SQL-4.7
* Copy /opt/www/iredadmin/settings.py.
* Removing old symbol link /opt/www/iredadmin
* Creating symbol link /opt/www/iredadmin to /opt/www/iRedAdmin-Pro-SQL-4.7
* Enable mlmmj integration.
* Restarting service: mlmmjadmin.
mlmmjadmin(ok)
mlmmjadmin(ok)
* Check and install required packages.
* Check SQL tables, and add missed ones - if there's any
* Replace py2 by py3 in cron jobs.
* Clean up.
* Delete all existing sessions to force all admins to re-login.
* iRedAdmin has been successfully upgraded.
* Restarting iredadmin service.
iredadmin(ok)
iredadmin(ok)
* Enable service: iredadmin
iredadmin(failed)
Failed, please restart service manually and check its log file.
* Upgrading completed.
<<< NOTE >>> If iRedAdmin doesn't work as expected, please post your issue in
<<< NOTE >>> our online support forum: http://www.iredmail.org/forum/

5

Re: New problem with iredadmin pro

Try this:

cd /opt/www/iredadmin/
python3 iredadmin.py

Any error?

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

6 (edited by hopp 2020-12-16 11:45:45)

Re: New problem with iredadmin pro

Not that I can see.

mail0# python3 iredadmin.py                                                                                                                                                                                                               
http://0.0.0.0:8080/
x.x.x.x:59315 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /" - 200 OK
x.x.x.x:59315 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/css/reset.css" - 200
x.x.x.x:59317 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/css/screen.css" - 200
x.x.x.x:59317 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/images/header.png" - 200
x.x.x.x:59315 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/images/bck_white_10.png" - 200
x.x.x.x:59318 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/images/login.jpg" - 200
x.x.x.x:59319 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/images/login_header.png" - 200
x.x.x.x:59321 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/images/bck_black_70.png" - 200
x.x.x.x:59320 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/default/images/gear.png" - 200
x.x.x.x:59317 - - [15/Dec/2020 13:12:46] "HTTP/1.1 GET /static/favicon.ico" - 200
x.x.x.x:59318 - - [15/Dec/2020 13:12:47] "HTTP/1.1 POST /login" - 303 See Other
x.x.x.x:59318 - - [15/Dec/2020 13:12:51] "HTTP/1.1 GET /dashboard" - 200 OK
x.x.x.x:59319 - - [15/Dec/2020 13:12:51] "HTTP/1.1 GET /static/fontawesome/css/fontawesome-all.min.css" - 200
x.x.x.x:59320 - - [15/Dec/2020 13:12:51] "HTTP/1.1 GET /static/default/css/fancybox.css" - 200
x.x.x.x:59315 - - [15/Dec/2020 13:12:51] "HTTP/1.1 GET /static/js/jquery.tooltip.js" - 304 Not Modified
x.x.x.x:59321 - - [15/Dec/2020 13:12:51] "HTTP/1.1 GET /static/js/jquery.idtabs.js" - 304 Not Modified
x.x.x.x:59320 - - [15/Dec/2020 13:12:51] "HTTP/1.1 GET /static/js/jquery-1.12.4.min.js" - 304 Not Modified
x.x.x.x:59318 - - [15/Dec/2020 13:12:52] "HTTP/1.1 GET /static/js/jquery.fancybox.js" - 304 Not Modified
x.x.x.x:59319 - - [15/Dec/2020 13:12:52] "HTTP/1.1 GET /static/js/jquery.quickfilter.js" - 304 Not Modified
x.x.x.x:59327 - - [15/Dec/2020 13:12:52] "HTTP/1.1 GET /static/js/stupidtable.min.js" - 304 Not Modified
x.x.x.x:59320 - - [15/Dec/2020 13:12:52] "HTTP/1.1 GET /static/fontawesome/webfonts/fa-solid-900.woff2" - 200
x.x.x.x:59337 - - [15/Dec/2020 13:13:14] "HTTP/1.1 GET /domains" - 200 OK
x.x.x.x:59337 - - [15/Dec/2020 13:13:15] "HTTP/1.1 GET /static/fontawesome/webfonts/fa-regular-400.woff2" - 200
x.x.x.x:59340 - - [15/Dec/2020 13:13:15] "HTTP/1.1 GET /static/default/images/page_active.gif" - 304 Not Modified
x.x.x.x:59337 - - [15/Dec/2020 13:13:24] "HTTP/1.1 GET /profile/domain/general/domain.com" - 200 OK
x.x.x.x:59340 - - [15/Dec/2020 13:13:25] "HTTP/1.1 GET /static/default/images/rule2.gif" - 200
x.x.x.x:59337 - - [15/Dec/2020 13:13:37] "HTTP/1.1 GET /users/domain.com" - 200 OK
x.x.x.x:59337 - - [15/Dec/2020 13:13:41] "HTTP/1.1 GET /profile/user/general/testfoo@domain.com" - 303 See Other
x.x.x.x:59337 - - [15/Dec/2020 13:13:44] "HTTP/1.1 GET /users/domain.com" - 200 OK


Also since the error is "Error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)') "

My python is:
python-3.8.6p0      interpreted object-oriented programming language
and json related pkgs:
json-c-0.13.1p0     JSON implementation in C
py3-simplejson-3.17.2 JSON encoder/decoder

I also see the same error when I create a user. The user is created but I'm sent to the domain screen with the "Error: JSONDecodeError('Expecting value: line 1 column 1 (char 0)') " and can no longer edit the user.

I also noticed the same error when trying to create a mailing list and seem unable to do so.

Edit:
Should backend_api = "bk_none" in mlmmjadmin settings.py be set differently when running iRedAdmin-Pro?

7

Re: New problem with iredadmin pro

This is the SQL debugging I see when I enable debugging on iredadmin. This is after the domain user list screen has been created when I click on a link to edit a user.

0.0 (1): SELECT * FROM sessions WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.0 (2): SELECT * FROM sessions WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.0 (3): UPDATE sessions SET atime = '2020-12-16T22:30:33.723669' WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.01 (1):
            SELECT
            mailbox.*,
            sbcc.bcc_address AS sender_bcc_address,
            sbcc.active AS sbcc_active,
            rbcc.bcc_address AS recipient_bcc_address,
            rbcc.active AS rbcc_active
            FROM mailbox
            LEFT JOIN sender_bcc_user AS sbcc ON (mailbox.username = sbcc.username)
            LEFT JOIN recipient_bcc_user AS rbcc ON (mailbox.username = rbcc.username)
            WHERE mailbox.username = 'redacted@domain.com'
            LIMIT 1

0.0 (2): SELECT address FROM forwardings WHERE forwarding='redacted@domain.com' AND is_list=1 GROUP BY address
0.0 (4): SELECT * FROM sessions WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.0 (5): UPDATE sessions SET atime = '2020-12-16T22:30:33.748189', data = 'gASVFQI0A0AAAAB9lCiMCnNlc3Npb25faWSUjCg2NjczOWU2MTYxNmFlODY1NTQ2ZWM3MWQxMzgy\nYTlhNDQ5ZDlhMzAylIwJd2VibWFzdGVylIwSanJob3BwZXJAcGFzdHkuY29tlIwIdXNlcm5hbWWU\njBJqcmhvcHBlckBwYXN0eS5jb22UjAZsb2dnZWSUiIwPaXNfZ2xvYmFsX2FkbWlulIiMD2lzX25v\ncm1hbF9hZG1pbpSJjBRhY2NvdW50X2lzX21haWxfdXNlcpSJjAxmYWlsZWRfdGltZXOUSwCMBGxh\nbmeUjAVlbl9VU5SMD3Nob3dfdXNlZF9xdW90YZSIjBlhbWF2aXNkX2VuYWJsZV9xdWFyYW50aW5l\nlIiMFmFtYXZpc2RfZW5hYmxlX2xvZ2dpbmeUiIwcYW1hdmlzZF9lbmFibGVfcG9saWN5X2xvb2t1\ncJSIjA9pcmVkYXBkX2VuYWJsZWSUiIwQZmFpbDJiYW5fZW5hYmxlZJSIjAJpcJSMCzIwOC42NS4y\nNy42lIwSYWRtaW5faXNfbWFpbF91c2VylIiMCHRpbWV6b25llIwDR01UlIwVbmV3X3ZlcnNpb25f\nYXZhaWxhYmxllE6MF25ld192ZXJzaW9uX2NoZWNrX2Vycm9ylE6MCmNzcmZfdG9rZW6UjCBTUXk5\nNnhTNzhCejM2NWtVUTRyNlVZODlmRDlXTWpSUJR1Lg==\n' WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
x.x.x.x:52264 - - [16/Dec/2020 22:30:33] "HTTP/1.1 GET /profile/user/general/redacted@domain.com" - 303 See Other
0.0 (1): SELECT * FROM sessions WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.0 (2): SELECT * FROM sessions WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.0 (3): UPDATE sessions SET atime = '2020-12-16T22:30:33.847091' WHERE session_id='66739e61616ae865546ec71d1382a9a449d9a302'
0.0 (1): SELECT COUNT(username) AS total FROM mailbox WHERE domain IN ('domain.com')


It ends by drawing the domain user list screen again. For safety in this post, I have altered the session id and session info.

8

Re: New problem with iredadmin pro

Is mlmmjadmin service running? Try this:

cd /opt/mlmmjadmin/tools/
python3 maillist_admin.py create test-ml@domain.com
python3 maillist_admin.py delete test-ml@domain.com archive=no

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

9

Re: New problem with iredadmin pro

Finally, a more detailed error message:

mail0# python3 maillist_admin.py create test-ml@domain.com
Traceback (most recent call last):
  File "maillist_admin.py", line 140, in <module>
    _json = r.json()
  File "/usr/local/lib/python3.8/site-packages/requests/models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/simplejson/__init__.py", line 525, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python3.8/site-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

10

Re: New problem with iredadmin pro

Could you please show me output of commands below?

python3 -c "import web; print(web.__version__)"

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

11 (edited by hopp 2020-12-24 08:20:24)

Re: New problem with iredadmin pro

mail0$ python3 -c "import web; print(web.__version__)"
0.61
mail0$ pkg_info | grep webpy                                                   
py3-webpy-0.61      web framework for python

Is it a locale issue perhaps?
mail0$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_MESSAGES="C"
LC_ALL=
mail0$

12

Re: New problem with iredadmin pro

Seems a mlmmjadmin issue, but i cannot figure it out directly.

- Which mlmmjadmin version are you running? Please show me output of command "ls -dl /opt/mlmmjadmin".
- Is it possible to give me direct ssh access with root privilege for testing? Contact me: zhb _at_ iredmail.org

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee