lighttpd启动失败,提示lighttpd.service: main process exited, code=exited, status=255/n/a的解决方法

来自:互联网
时间:2018-09-23
阅读:

centos 7.3 64bit systemkcq免费资源网

------------------------------------------------------------------kcq免费资源网

Restart Lighttpd Server faildkcq免费资源网

Error message :kcq免费资源网

lighttpd.service: main process exited, code=exited, status=255/n/akcq免费资源网

How to fix 'lighttpd.service: main process exited, code=exited, status=255/n/a' error ?kcq免费资源网

1.u should check the directory whether permissions is 755 (not including log files within this directory)kcq免费资源网

2.check log files within the directory /var/log/lighttpd/ whether the group and user are 'lighttpd lighttpd'kcq免费资源网

(Pay attention to using the commend above......if u use different groups and users to compile Lighttpd code, u should use your Lighttpd's own group and user!!)kcq免费资源网

If not, use the following command to repair:kcq免费资源网

chown lighttpd:lighttpd /var/log/lighttpd/access.logkcq免费资源网

chown lighttpd:lighttpd /var/log/lighttpd/error.logkcq免费资源网

---------------------------------------------------------------------------------kcq免费资源网

lighttpd启动时提示:kcq免费资源网

Started Lightning Fast Webserver With Light System Requirements.
Starting Lightning Fast Webserver With Light System Requirements...
lighttpd.service: main process exited, code=exited, status=255/n/a
Unit lighttpd.service entered failed state.
lighttpd.service failed.

分析原因:由于日志文件不可写,造成lighttpd无法正常启动,解决办法如下:kcq免费资源网

首先检查目录/var/log/lighttpd的权限是否为755,组及用户是否为lighttpd lighttpdkcq免费资源网

其次,如果正确,继续检查目录下的日志文件组及用户是否为 lighttpd lighttpdkcq免费资源网

最后,排查到日志access.log和error.log的用户及组为root root 导致lighttpd无法写入日志文件kcq免费资源网

使用以下命令修改其为 lighttpd lighttpdkcq免费资源网

chown lighttpd:lighttpd /var/log/lighttpd/access.log
chown lighttpd:lighttpd /var/log/lighttpd/error.log

重启成功!kcq免费资源网

返回顶部
顶部