1 (edited by cvcvelo 2019-08-02 02:03:54)

Topic: Upgrade doesn't restart iredadmin on FreeBSD

==== 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 installer
- Linux/BSD distribution name and version: FreeBSD 12.0-RELEASE-p8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL (MariaDB)
- 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.
====

On the past few upgrades to iRedAdmin-Pro on FreeBSD the iredadmin service does not restart as part of the upgrade procedure, and must be manually restarted.

Here is the log output from an upgrade, followed by a manual restart of iredadmin. Note the response "iredadmin is already stopped" when trying to restart the iredadmin service. Without that manual start, the iRedAdmin-Pro interface isn't available.

root@mail:~/iRedAdmin-Pro-SQL-3.8/tools # bash upgrade_iredadmin.sh
* Detected Linux/BSD distribution: FREEBSD
* HTTP server root: /usr/local/www
* Found iRedAdmin directory: /usr/local/www/iredadmin, symbol link of iRedAdmin-Pro-SQL-3.7
* Found iRedAdmin config file: /usr/local/www/iredadmin/settings.py
* Copying new version to /usr/local/www/iRedAdmin-Pro-SQL-3.8
* Copy /usr/local/www/iredadmin/settings.py.
* Removing old symbol link /usr/local/www/iredadmin
* Creating symbol link /usr/local/www/iredadmin to /usr/local/www/iRedAdmin-Pro-SQL-3.8
* Delete all existing sessions to force all admins to re-login.
* Enable mlmmj integration.
mlmmjadmin_api_auth_token =  <obfuscated>
* Restarting service: mlmmjadmin.
Stopping mlmmjadmin.
Starting mlmmjadmin.
[uWSGI] getting INI configuration from /opt/mlmmjadmin/rc_scripts/uwsgi/freebsd.ini
* Check and install dependent Python modules:
  + [required] json or simplejson
  + [required] dnspython
  + [required] pycurl
  + [required] requests
* Check SQL tables, and add missed ones - if there's any
* Clean up.
* iRedAdmin has been successfully upgraded.
* Restarting uwsgi service.
Stopping uwsgi.
Waiting for PIDS: 688.
Starting uwsgi.
* Enable service: iredadmin
iredadmin_enable: YES -> YES
Stopping iredadmin.
Starting iredadmin.
[uWSGI] getting INI configuration from /usr/local/www/iredadmin/rc_scripts/uwsgi/freebsd.ini
* 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/
root@mail:~/iRedAdmin-Pro-SQL-3.8/tools # service iredadmin status
iredadmin is stopped.
root@mail:~/iRedAdmin-Pro-SQL-3.8/tools # service iredadmin restart
iredadmin is already stopped.
Starting iredadmin.
[uWSGI] getting INI configuration from /usr/local/www/iredadmin/rc_scripts/uwsgi/freebsd.ini
root@mail:~/iRedAdmin-Pro-SQL-3.8/tools # service iredadmin status
iredadmin is running.

2

Re: Upgrade doesn't restart iredadmin on FreeBSD

Sorry about this trouble. I will check this issue.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: Upgrade doesn't restart iredadmin on FreeBSD

ZhangHuangbin wrote:

Sorry about this trouble. I will check this issue.

Thanks, zhb!

Just upgraded to iRedAdmin-Pro 3.9-MySQL and am seeing the same issue.

..

* Enable service: iredadmin
iredadmin_enable: YES -> YES
Stopping iredadmin.
Starting iredadmin.
[uWSGI] getting INI configuration from /usr/local/www/iredadmin/rc_scripts/uwsgi/freebsd.ini
* 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/

root@mail:~/iRedAdmin-Pro-SQL-3.9/tools # bash

[root@mail ~/iRedAdmin-Pro-SQL-3.9/tools]# for i in mlmmjadmin uwsgi iredadmin ; do service $i status ; done

mlmmjadmin is stopped. # <- expected; I don't use mlmmjadmin
uwsgi is running as pid 29913.
iredadmin is stopped.

Everything works OK after manually starting iredadmin.

4

Re: Upgrade doesn't restart iredadmin on FreeBSD

cvcvelo wrote:

mlmmjadmin is stopped. # <- expected; I don't use mlmmjadmin

mlmmjadmin is a required component since iRedMail-0.9.8, and iRedAdmin-Pro. If you don't run it, iRedAdmin-Pro will raise error.

cvcvelo wrote:

* Enable service: iredadmin
iredadmin_enable: YES -> YES
Stopping iredadmin.
Starting iredadmin.

As you can see, the upgrade script enables and restarts the iredadmin service.
But not sure why iredadmin was not started. Did you see any error in log files under /var/log/?

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee