主题: 0.92 uwsgi 还是启动失败

==== 必填信息。没有填写将不予回复 ====
- iRedMail 版本号:
- 使用哪个数据库存储用户帐号(OpenLDAP,MySQL,PostgreSQL):
- 使用的 Linux/BSD 发行版名称及版本号:
- 与您的问题相关的日志信息:
==== ==== 必填信息。没有填写将不予回复 ====

- iRedMail 版本号:iRedMail-0.9.2.tar.bz
- 使用哪个数据库存储用户帐号 MySQL
- 使用的 Linux/BSD 发行版名称及版本号:CentOS Linux release 7.1.1503
- 与您的问题相关的日志信息:

无法访问域名/iredadmin,域名/mail可以访问,uwsgi启动失败,查询到好像0.91有这个问题,已经修复,在iRedMail-0.9.2/ChangeLog里面有记录- uwsgi service doesn't work on RHEL/CentOS.......但还是访问失败,报错如下:

[root@mx run]# systemctl status uwsgi.service
uwsgi.service - uWSGI Emperor Service
   Loaded: loaded (/usr/lib/systemd/system/uwsgi.service; enabled)
   Active: failed (Result: start-limit) since 一 2015-08-24 10:44:01 CST; 762ms ago
  Process: 1611 ExecStart=/usr/sbin/uwsgi --ini /etc/uwsgi.ini (code=exited, status=0/SUCCESS)
  Process: 1609 ExecStartPre=/bin/chown uwsgi:uwsgi /run/uwsgi (code=exited, status=0/SUCCESS)
  Process: 1608 ExecStartPre=/bin/mkdir -p /run/uwsgi (code=exited, status=0/SUCCESS)
Main PID: 1611 (code=exited, status=0/SUCCESS)
   Status: "initializing uWSGI"

8月 24 10:44:01域名 systemd[1]: Started uWSGI Emperor Service.
8月 24 10:44:01 域名systemd[1]: uwsgi.service holdoff time over, scheduling restart.
8月 24 10:44:01 域名systemd[1]: Stopping uWSGI Emperor Service...
8月 24 10:44:01 域名 systemd[1]: Starting uWSGI Emperor Service...
8月 24 10:44:01  域名systemd[1]: uwsgi.service start request repeated too quickl...rt.
8月 24 10:44:01 域名 systemd[1]: Failed to start uWSGI Emperor Service.
8月 24 10:44:01 域名systemd[1]: Unit uwsgi.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
====

系统日志:
Aug 24 10:44:00 localhost systemd: Starting uWSGI Emperor Service...
Aug 24 10:44:01 localhost uwsgi: [uWSGI] getting INI configuration from /etc/uwsgi.ini
Aug 24 10:44:01 localhost systemd: Started uWSGI Emperor Service.
Aug 24 10:44:01 localhost systemd: uwsgi.service holdoff time over, scheduling restart.
Aug 24 10:44:01 localhost systemd: Stopping uWSGI Emperor Service...
Aug 24 10:44:01 localhost systemd: Starting uWSGI Emperor Service...
Aug 24 10:44:01 localhost uwsgi: [uWSGI] getting INI configuration from /etc/uwsgi.ini
Aug 24 10:44:01 localhost systemd: Started uWSGI Emperor Service.
Aug 24 10:44:01 localhost systemd: uwsgi.service holdoff time over, scheduling restart.
Aug 24 10:44:01 localhost systemd: Stopping uWSGI Emperor Service...
Aug 24 10:44:01 localhost systemd: Starting uWSGI Emperor Service...
Aug 24 10:44:01 localhost uwsgi: [uWSGI] getting INI configuration from /etc/uwsgi.ini
Aug 24 10:44:01 localhost systemd: Started uWSGI Emperor Service.
Aug 24 10:44:01 localhost systemd: uwsgi.service holdoff time over, scheduling restart.
Aug 24 10:44:01 localhost systemd: Stopping uWSGI Emperor Service...
Aug 24 10:44:01 localhost systemd: Starting uWSGI Emperor Service...
Aug 24 10:44:01 localhost uwsgi: [uWSGI] getting INI configuration from /etc/uwsgi.ini
Aug 24 10:44:01 localhost systemd: Started uWSGI Emperor Service.
Aug 24 10:44:01 localhost systemd: uwsgi.service holdoff time over, scheduling restart.
Aug 24 10:44:01 localhost systemd: Stopping uWSGI Emperor Service...
Aug 24 10:44:01 localhost systemd: Starting uWSGI Emperor Service...
Aug 24 10:44:01 localhost uwsgi: [uWSGI] getting INI configuration from /etc/uwsgi.ini
Aug 24 10:44:01 localhost systemd: Started uWSGI Emperor Service.
Aug 24 10:44:01 localhost systemd: uwsgi.service holdoff time over, scheduling restart.
Aug 24 10:44:01 localhost systemd: Stopping uWSGI Emperor Service...
Aug 24 10:44:01 localhost systemd: Starting uWSGI Emperor Service...
Aug 24 10:44:01 localhost systemd: uwsgi.service start request repeated too quickly, refusing to start.
Aug 24 10:44:01 localhost systemd: Failed to start uWSGI Emperor Service.
Aug 24 10:44:01 localhost systemd: Unit uwsgi.service entered failed state.

求大神帮助,谢谢

回复: 0.92 uwsgi 还是启动失败

手工执行 "uwsgi --ini /etc/uwsgi.ini" 命令有什么输出?

回复: 0.92 uwsgi 还是启动失败

OK!!!
启动成功了,/iredadmin也能登录

[root@mx system]#/usr/sbin/uwsgi --ini /etc/uwsgi.ini
[uWSGI] getting INI configuration from /etc/uwsgi.ini

系统没有报错

[root@mx system]# ps -ef|grep uwsgi
root      1831     1  0 11:09 ?        00:00:00 /usr/sbin/uwsgi --ini /etc/uwsgi.ini
root      1832  1831  0 11:09 ?        00:00:00 /usr/sbin/uwsgi --ini /etc/uwsgi.ini
root      1833  1831  0 11:09 ?        00:00:00 /usr/sbin/uwsgi --ini /etc/uwsgi.ini
root      1834  1831  0 11:09 ?        00:00:00 /usr/sbin/uwsgi --ini /etc/uwsgi.ini
iredadm+  1835  1832  0 11:09 ?        00:00:00 /usr/sbin/uwsgi --ini iredadmin.ini
iredadm+  1836  1835  1 11:09 ?        00:00:01 /usr/sbin/uwsgi --ini iredadmin.ini

我尝试用systemctl stop它,不生效,是不兼容systemctl吗?

还有额外反馈一下,我使用360浏览器登录/mail,有很多功能键点不开,用google浏览器就正常的,有这样的情况吗,谢谢张大神的指导

4 最后由 113998274 (2015-08-27 11:37:59) 编辑

回复: 0.92 uwsgi 还是启动失败

问题已经解决了,记录一下希望帮助到项目组和各位

systemctl启动uwsgi失败,应该是systemctl的启动类型错误,应该设置为后台启动forking

修改uwsgi.service

Type=notify 修改为
Type=forking

添加
PIDFile=/run/uwsgi/uwsgi.pid
保存退出

刷新systemctl,运行
systemctl daemon-reload

OK了
也谢谢张大神给与解决方向

回复: 0.92 uwsgi 还是启动失败

113998274 写道:

问题已经解决了,记录一下希望帮助到项目组和各位

systemctl启动uwsgi失败,应该是systemctl的启动类型错误,应该设置为后台启动forking

修改uwsgi.service

Type=notify 修改为
Type=forking

添加
PIDFile=/run/uwsgi/uwsgi.pid
保存退出

刷新systemctl,运行
systemctl daemon-reload

OK了
也谢谢张大神给与解决方向

我按这个改还是不行...
最后我是把 uwsgi.service 里面的 /etc/uwsgi.ini 改成 /etc/uwsgi.d/iredadmin.ini 就可以了.
...

回复: 0.92 uwsgi 还是启动失败

你的系统跟使用的后端也跟我一样吗?我在centos7.0 和 7.1试过也是可以

回复: 0.92 uwsgi 还是启动失败

113998274 写道:

你的系统跟使用的后端也跟我一样吗?我在centos7.0 和 7.1试过也是可以

一样的...也是 centos 7.1 ... 64位 ... linode 的 vps ...

回复: 0.92 uwsgi 还是启动失败

[root@mail ~]# systemctl status uwsgi.service
uwsgi.service - uWSGI Emperor Service
   Loaded: loaded (/usr/lib/systemd/system/uwsgi.service; enabled)
   Active: failed (Result: start-limit) since Thu 2015-08-27 13:39:58 UTC; 17s ago
Main PID: 3962 (code=exited, status=0/SUCCESS)

Aug 27 13:39:58 mail.apcube.com systemd[1]: Failed to load environment files: No such file or directory
Aug 27 13:39:58 mail.apcube.com systemd[1]: uwsgi.service failed to run 'start-pre' task: No such file or directory
Aug 27 13:39:58 mail.apcube.com systemd[1]: Failed to start uWSGI Emperor Service.
Aug 27 13:39:58 mail.apcube.com systemd[1]: Unit uwsgi.service entered failed state.
Aug 27 13:39:58 mail.apcube.com systemd[1]: uwsgi.service holdoff time over, scheduling restart.
Aug 27 13:39:58 mail.apcube.com systemd[1]: Stopping uWSGI Emperor Service...
Aug 27 13:39:58 mail.apcube.com systemd[1]: Starting uWSGI Emperor Service...
Aug 27 13:39:58 mail.apcube.com systemd[1]: uwsgi.service start request repeated too quickly, refusing to start.
Aug 27 13:39:58 mail.apcube.com systemd[1]: Failed to start uWSGI Emperor Service.
Aug 27 13:39:58 mail.apcube.com systemd[1]: Unit uwsgi.service entered failed state.

回复: 0.92 uwsgi 还是启动失败

重新布署... 按上面方法搞定...