簡體   English   中英

Nginx 無法啟動

[英]Nginx doesn't start

   Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; vendor preset: disabled)
   Active: failed (Result: timeout) since Tue 2020-03-10 16:35:07 UTC; 9min ago
  Process: 5027 ExecStart=/usr/sbin/nginx (code=exited, status=0/SUCCESS)
  Process: 5023 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=0/SUCCESS)
  Process: 5021 ExecStartPre=/usr/bin/rm -f /run/nginx.pid (code=exited, status=0/SUCCESS)
 Main PID: 25158 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nginx.service
           ├─5029 nginx: master process /usr/sbin/nginx
           ├─5030 nginx: worker process
           ├─5031 nginx: worker process
           ├─5032 nginx: worker process
           ├─5033 nginx: worker process
           ├─5034 nginx: worker process
           ├─5035 nginx: worker process
           ├─5036 nginx: worker process
           ├─5037 nginx: worker process
           ├─5038 nginx: worker process
           ├─5039 nginx: worker process
           ├─5040 nginx: worker process
           ├─5041 nginx: worker process
           ├─5042 nginx: worker process
           ├─5043 nginx: worker process
           ├─5044 nginx: worker process
           ├─5045 nginx: worker process
           ├─5046 nginx: worker process
           ├─5047 nginx: worker process
           ├─5048 nginx: worker process
           ├─5049 nginx: worker process
           ├─5050 nginx: worker process
           ├─5051 nginx: worker process
           ├─5052 nginx: worker process
           └─5053 nginx: worker process

Mar 10 16:33:37 ip-172-31-36-184.us-west-2.compute.internal systemd[1]: Starting The nginx HTTP and reverse proxy server...
Mar 10 16:33:37 ip-172-31-36-184.us-west-2.compute.internal nginx[5023]: nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
Mar 10 16:33:37 ip-172-31-36-184.us-west-2.compute.internal nginx[5023]: nginx: configuration file /etc/nginx/nginx.conf test is successful
Mar 10 16:33:37 ip-172-31-36-184.us-west-2.compute.internal systemd[1]: PID file /run/nginx.pid not readable (yet?) after start.
Mar 10 16:35:07 ip-172-31-36-184.us-west-2.compute.internal systemd[1]: nginx.service start operation timed out. Terminating.
Mar 10 16:35:07 ip-172-31-36-184.us-west-2.compute.internal systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
Mar 10 16:35:07 ip-172-31-36-184.us-west-2.compute.internal systemd[1]: Unit nginx.service entered failed state.
Mar 10 16:35:07 ip-172-31-36-184.us-west-2.compute.internal systemd[1]: nginx.service failed.

我有這樣的錯誤,我不知道如何解決這個問題。 我做了所有配置,但它仍然無法運行。

這是問題的根本原因

PID file /run/nginx.pid not readable (yet?) after start.

您可能需要以 root 權限啟動 NGINX 服務器或更新服務文件以將 pid 文件放在 Nginx 可讀的另一個位置

PIDFile=/usr/local/nginx/logs/nginx.pid

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM