1 (edited by jstewart 2019-02-20 00:57:47)

Topic: internal server error

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloadable
- Linux/BSD distribution name and version: Centos 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- 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 iRedAdminPro to 3.4, and I getting an internal server error when trying to access any account. From the nginx log:
GET /admin/profile/user/general/user@domain.com HTTP/1.1" 500 32 "https://cordelia.cyg.net/admin/search"

Looks like it has to do with mlmmjadmin

I also updated mlmmjadmin to 2.1. If it is started as a service, the error happens. If I run python mlmmjadmin.py from the CLI, it works.

----

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

2

Re: internal server error

Any relevant error in /var/log/messages and /var/log/nginx/error.log when you got "internal server error" in iRedAdmin-Pro?

3 (edited by labasus 2019-02-20 19:32:30)

Re: internal server error

Try:
systemctl  restart mlmmjadmin
systemctl  restart nginx

4 (edited by jstewart 2019-02-20 20:28:48)

Re: internal server error

There is no output in either of those logs when the error is generated. The only log entry that happens is the one I sent:
GET /admin/profile/user/general/user@domain.com HTTP/1.1" 500 32 "https://cordelia.cyg.net/admin/search"
in the nginx access log.

Thanks labasus, I have tried starting, stopping then starting, and restarting all services with the same results.

when mlmjadmin is running interactively, called from the CLI with "python mlmmjadmin.py" all works as it should, but if I exit the interactive session, and start mlmmjadim with systemctl  restart mlmmjadmin, or systemctl  stop mlmmjadmin, systemctl start mlmmjadmin I get the error.

[root@mail mlmmjadmin]# ps ax | grep mlmm
6601 ?        Ss     0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
6603 ?        S      0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
6604 ?        S      0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
6605 ?        S      0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
6606 ?        S      0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid
6607 ?        S      0:00 /usr/sbin/uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini --pidfile /var/run/mlmmjadmin/mlmmjadmin.pid

5

Re: internal server error

jstewart wrote:

when mlmjadmin is running interactively, called from the CLI with "python mlmmjadmin.py" all works as it should, but if I exit the interactive session, and start mlmmjadim with systemctl  restart mlmmjadmin, or systemctl  stop mlmmjadmin, systemctl start mlmmjadmin I get the error.

Try to restart mlmmjadmin service, then check /var/log/messages immediately.
I expect uwsgi program to log some error in this log file.

6 (edited by jstewart 2019-02-21 01:01:20)

Re: internal server error

This is the only entry immediately after a start:

Feb 20 11:55:30 mail systemd: Starting RESTful API server used to manage mlmmj mailing list manager...
Feb 20 11:55:30 mail systemd: Started RESTful API server used to manage mlmmj mailing list manager.
Feb 20 11:55:30 mail uwsgi: [uWSGI] getting INI configuration from /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini

no entry anywhere for the internal server error exept for the one entry in the access_log as indicated before.



ZhangHuangbin wrote:
jstewart wrote:

when mlmjadmin is running interactively, called from the CLI with "python mlmmjadmin.py" all works as it should, but if I exit the interactive session, and start mlmmjadim with systemctl  restart mlmmjadmin, or systemctl  stop mlmmjadmin, systemctl start mlmmjadmin I get the error.

Try to restart mlmmjadmin service, then check /var/log/messages immediately.
I expect uwsgi program to log some error in this log file.

7

Re: internal server error

Any error if you start the service manually like below?

uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini

8

Re: internal server error

This is all I get:
[root@mail mlmmjadmin]# uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini
[uWSGI] getting INI configuration from /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini

nothing in /var/log/messages

restarting the uwsgi service:

Feb 21 07:07:25 mail systemd: Starting uWSGI Emperor Service...
Feb 21 07:07:25 mail uwsgi: [uWSGI] getting INI configuration from /etc/uwsgi.ini
Feb 21 07:07:25 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** Starting uWSGI 2.0.17.1 (64bit) on [Thu Feb 21 07:07:25 2019] ***
Feb 21 07:07:25 mail uwsgi: Thu Feb 21 07:07:25 2019 - compiled with version: 4.8.5 20150623 (Red Hat 4.8.5-28) on 09 July 2018 03:58:51
Feb 21 07:07:25 mail uwsgi: Thu Feb 21 07:07:25 2019 - os: Linux-3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018
Feb 21 07:07:25 mail uwsgi: Thu Feb 21 07:07:25 2019 - nodename: mail.cyg.net
Feb 21 07:07:25 mail uwsgi: Thu Feb 21 07:07:25 2019 - machine: x86_64
Feb 21 07:07:25 mail uwsgi: Thu Feb 21 07:07:25 2019 - clock source: unix
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - pcre jit disabled
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - detected number of CPU cores: 4
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - current working directory: /
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - writing pidfile to /run/uwsgi/uwsgi.pid
Feb 21 07:07:26 mail systemd: Started uWSGI Emperor Service.
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - detected binary path: /usr/sbin/uwsgi
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - your processes number limit is 127957
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - your memory page size is 4096 bytes
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - detected max file descriptor number: 1024
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - lock engine: pthread robust mutexes
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** starting uWSGI Emperor ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - thunder lock: disabled (you can enable it with --thunder-lock)
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - uwsgi socket 0 bound to UNIX address /var/run/uwsgi.socket fd 4
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - your server socket listen backlog is limited to 100 connections
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - your mercy for graceful operations on workers is 60 seconds
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - mapped 218760 bytes (213 KB) for 2 cores
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** Operational MODE: preforking ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** no app loaded. going in full dynamic mode ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - uWSGI running as root, you can use --uid/--gid/--chroot options
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - *** uWSGI is running in multiple interpreter mode ***
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - spawned uWSGI master process (pid: 16718)
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - spawned uWSGI worker 1 (pid: 16720, cores: 1)
Feb 21 07:07:26 mail uwsgi: Thu Feb 21 07:07:25 2019 - spawned uWSGI worker 2 (pid: 16721, cores: 1)


ZhangHuangbin wrote:

Any error if you start the service manually like below?

uwsgi --ini /opt/mlmmjadmin/rc_scripts/uwsgi/rhel.ini

9

Re: internal server error

All is good now. I did a yum update and a server reboot and it cam back working properly again.

Thanks.