Help Center/ CodeArts Deploy/ FAQs/ Custom Application Actions/ Starting or Stopping Nginx/ Deploying the Command for Stopping Nginx When Nginx Is Not Started
Updated on 2023-05-26 GMT+08:00

Deploying the Command for Stopping Nginx When Nginx Is Not Started

Symptoms

An error message containing nginx.pid is displayed.

"nginx: [error] open() \"/home/xxx/nginx/logs/nginx.pid\" failed (2: No such file or directory)"

Cause Analysis

After Nginx is started, the process ID is saved in nginx.pid. Nginx can be stopped based on the process ID. If the Nginx process does not exist, an error message indicating that the nginx.pid file cannot be found will be displayed when you deploy the stop and quit commands.

Solution

Do not deploy the command for stopping Nginx if it is not started.