To To It was normal at the beginning, and the server restarted nginx and it started automatically. Suddenly restarted the server today and found that the website could not be opened, systemctlstatusnginx, prompt ●nginx.service-TheNGINXHTTPandreverseproxyserver Loaded:loaded(/etc/systemd/system/nginx.service;enabled;vendorpreset:disabled) Active:failed(Result:exit-code)sinceWed2020-09-2300:27:22CST;1min17sago Process:1632ExecStop=/bin/kill-sQUIT$MAINPID(code=exited,status=1/FAILURE) MainPID: 1095(code=killed,signal=KILL) Sep2300:27:22web.novalocalkill[1632]:-q,--queue&lt;sig&gt; usesigqueue(2)ratherthankill(2) Sep2300:27:22web.novalocalkill[1632]:-p,--pid printpidswithoutsignalingthem Sep2300:27:22web.novalocalkill[1632]:-l,--list[=&lt;signal&gt;]listsignalnames,orconvertonetoaname Sep2300:27:22web.novalocalkill[1632]:-L,--table listsignalnamesandnumbers Sep2300:27:22web.novalocalkill[1632]:-h,--help displaythishelpandexit Sep2300:27:22web.novalocalkill[1632]:-V,--version outputversioninformationandexit Sep2300:27:22web.novalocalkill[1632]:Formoredetailsseekill(1). Sep2300:27:22web.novalocalsystemd[1]:nginx.service:controlprocessexited,code=exitedstatus=1 Sep2300:27:22web.novalocalsystemd[1]:Unitnginx.serviceenteredfailedstate. Sep2300:27:22web.novalocalsystemd[1]:nginx.servicefailed. Use nginx-t, check is no problem nginx:theconfigurationfile/usr/local/nginx/conf/nginx.confsyntaxisok nginx:configurationfile/usr/local/nginx/conf/nginx.conftestissuccessful Enter journalctl-xe, turn up a few pages, and see: Sep2300:27:22web.novalocalsystemd[1]:Starting(null)... --Subject:Unitselinux.servicehasbegunstart-up --Defined-By:systemd --Support:http://lists.freedesktop.org/mailman/listinfo/systemd-devel - --Unitselinux.servicehasbegunstartingup. Sep2300:27:22web.novalocalsystemd[1]:nginx.service:mainprocessexited,code=killed,status=9/KILL Sep2300:27:22web.novalocalkill[1632]:Usage: Sep2300:27:22web.novalocalkill[1632]:kill[options]&lt;pid|name&gt;[...] Sep2300:27:22web.novalocalkill[1632]:Options: Sep2300:27:22web.novalocalkill[1632]:-a,--all donotrestrictthename-to-pidconversiontoprocesses Sep2300:27:22web.novalocalkill[1632]:withthesameuidasthepresentprocess Sep2300:27:22web.novalocalkill[1632]:-s,--signal&lt;sig&gt; sendspecifiedsignal Sep2300:27:22web.novalocalkill[1632]:-q,--queue&lt;sig&gt; usesigqueue(2)ratherthankill(2) Sep2300:27:22web.novalocalkill[1632]:-p,--pid printpidswithoutsignalingthem Sep2300:27:22web.novalocalkill[1632]:-l,--list[=&lt;signal&gt;]listsignalnames,orconvertonetoaname Sep2300:27:22web.novalocalkill[1632]:-L,--table listsignalnamesandnumbers Sep2300:27:22web.novalocalkill[1632]:-h,--help displaythishelpandexit Sep2300:27:22web.novalocalkill[1632]:-V,--version outputversioninformationandexit Sep2300:27:22web.novalocalkill[1632]:Formoredetailsseekill(1). Sep2300:27:22web.novalocalsystemd[1]:nginx.service:controlprocessexited,code=exitedstatus=1 Sep2300:27:22web.novalocalsystemd[1]:Unitnginx.serviceenteredfailedstate. Sep2300:27:22web.novalocalsystemd[1]:nginx.servicefailed. Sep2300:27:22web.novalocalcloud-init[1605]:Cloud-initv.0.7.9runningmodules:finalatTue,22Sep202016:27:22 0000.Up12.09seconds. Sep2300:27:22web.novalocalsystemd[1]:StartedDynamicSystemTuningDaemon. --Subject:Unittuned.servicehasfinishedstart-up --Defined-By:systemd --Support:http://lists.freedesktop.org/mailman/listinfo/systemd-devel - --Unittuned.servicehasfinishedstartingup. - --Thestart-upresultisdone. Manually enter systemctlstartnginx, you can start, and the website can be opened normally, enter systemctlstatusnginx, prompt: ●nginx.service-TheNGINXHTTPandreverseproxyserver Loaded:loaded(/etc/systemd/system/nginx.service;enabled;vendorpreset:disabled) Active:active(running)sinceWed2020-09-2300:41:20CST;4sago Process:1632ExecStop=/bin/kill-sQUIT$MAINPID(code=exited,status=1/FAILURE) Process:2738ExecStart=/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf(code=exited,status=0/SUCCESS) MainPID: 2739 (nginx) Tasks: 5 Memory: 82.5M CGroup:/system.slice/nginx.service ├─2739nginx:masterprocess/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf ├─2740nginx:workerprocess ├─2741nginx:workerprocess ├─2742nginx:workerprocess └─2743nginx:workerprocess Sep2300:41:20web.novalocalsystemd[1]:StartingTheNGINXHTTPandreverseproxyserver... Sep2300:41:20web.novalocalsystemd[1]:StartedTheNGINXHTTPandreverseproxyserver. Does anyone know why? <br>
-------------------------------------------- ---------
Netizens reply: To To I didn’t look at your log. It’s dazzling to look at the log in this way. The system looks directly at it. Errors can be marked in red Try reactivating and see systemctlenablenginx.service
Netizens reply: To To systemctlenablenginx reboot systemctlstatusnginx See what happens, theoretically there should be no problem If not, check the log report
Netizens reply: To To Quote: caddy published on 2020-9-2301:20 I didn’t look at your log. It’s dazzling to look at the log in this way. The system looks directly at it. Errors can be marked in red Try to reactivate and see
Netizens reply: To To Quote: llyang published on 2020-9-2301:35 systemctlenablenginx reboot systemctlstatusnginx
Netizens reply: To To Quote: yxw886 published in 2020-9-2301:42 I tried it, but it still doesn't work. Is it to check /usr/local/nginx/logs/error.log?
Netizens reply: To To Look at the error log, look at the error log. It may also be a problem with nginxpid. Take a look at the port occupation, sometimes, nginx has been started, Normal use, but the status is still not started. In this case, it may be a pid problem. Look at the port occupation, If port 80 is occupied by nginx, then the problem is not big
Netizen reply: To To Debian system? I encountered this problem, but I couldn’t Change the system.
Netizen reply: To To Start command: lnmpnginxstart
Netizens reply: To To Quote: 1819 published in 2020-9-2309:44 Look at the error log, look at the error log. It may also be a problem with nginxpid. Take a look at the port occupancy. Sometimes, nginx has already started,
Netizens reply: To To Quote: biubiu published on 2020-9-2309:50 Debian system? I encountered this problem, but I couldn’t Change the system.
Netizen reply: To To Quote: yxw886 published on 2020-9-2310:01 How to check the error log? In that path. Port 80 is not occupied, the nginx process is not found, every time you have to manually systemctlstart...
Netizens reply: To To Quote: mjj is not me published at 2020-9-2309:59 Start command: lnmpnginxstart
Netizens reply: To To Quote: llyang published on 2020-9-2308:53 If there is this file, yes. If this file is not found, look for it in .conf. The file name and location are all defined here...
Netizens reply: To To Quote: Tang Wang Li Shimin published on 2020-9-2308:30 Check your nginx configuration or website configuration
Netizens reply: To To Quote: yxw886 published on 2020-9-2310:11 This can be started, but nginx will not be started automatically every time you boot, but mysql and php can
Netizens reply: To To Quote: mjj is not me published on 2020-9-2310:29 Then put the restart command into rc.local. It can be started automatically. The location of rc.local may be different for different Linux systems. echo"/etc/...
Netizens reply: To To Quote: 1819 published in 2020-9-2310:08 Look directly at nginx.conf, look at error.log If the error log is not configured, configure it yourself. It's hard to do without looking at the error log...
Netizens reply: To To Quote: yxw886 published on 2020-9-2310:31 I tried this method, but it still won’t boot up echo "/etc/init.d/nginxstart">>/etc/rc.local echo"/usr/loca...
Netizens reply: To To 2020/09/2220:33:35[notice]4536

Label: none