buobuk 发表于 2022-2-13 20:01:39

debian10 service nginx force-reload 报错

root@debian:~# lnmp restart
Stoping LNMP...
Stoping nginx...done
Stopping mysql (via systemctl): mysql.service.
Gracefully shutting down php-fpm . done
Starting LNMP...
Starting nginx...done
Starting mysql (via systemctl): mysql.service.
Starting php-fpmdone
root@debian:~# service nginx force-reload
nginx.service is not active, cannot reload.
root@debian:~# /etc/init.d/nginx restart
Stoping nginx...done
Starting nginx...done
root@debian:~# service nginx force-reload
nginx.service is not active, cannot reload.
root@debian:~# service nginx restart
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
root@debian:~#

memcached也有类似的问题, 如果执行 /etc/init.d/memcached restart则service memcached 则不能成功启动

licess 发表于 2022-2-14 09:12:47

比较新的linux发行版 service 等于 systemctl,使用/etc/init.d/xxx 或 service 是两种不一样的方式,不同的方式是无法判断其正确状态

buobuk 发表于 2022-2-13 20:06:04

lnmp nginx reload可以正常使用,但不知道能否正常重截证书,acme.sh提示要用service nginx force-reload

buobuk 发表于 2022-2-13 20:25:50

貌似是因为service 或systemctl stop并不会关掉/etc/init.d/nginx start 开启的进程?

buobuk 发表于 2022-2-14 14:10:15

licess 发表于 2022-2-14 09:12
比较新的linux发行版 service 等于 systemctl,使用/etc/init.d/xxx 或 service 是两种不一样的方式,不同 ...

由于service nginx force-reload有时候会报错,我把acme.sh的安装命令最后一步重载换成了 lnmp nginx reload,请教大佬, lnmp nginx reload 会重载证书吗?怕影响了60以后在的自动更新

licess 发表于 2022-2-15 08:49:11

buobuk 发表于 2022-2-14 14:10
由于service nginx force-reload有时候会报错,我把acme.sh的安装命令最后一步重载换成了 lnmp nginx rel ...

不影响续期,默认就会reload不需要自行reload
没必要替换,lnmp nginx reload 就是调用的 /etc/init.d/nginx reload
页: [1]
查看完整版本: debian10 service nginx force-reload 报错