[Solved] Keepalived Start Error: default user does not exist & open() “/run/nginx.pid” failed

Error when starting keepalived

view log

tail  -fn 200  /var/log/messages

SECURITY VIOLATION – scripts are being executed but script_security not enabled

In the global_defs configuration add: enable_script_security

global_defs {
  router_id lb-master
  enable_script_security
}

The error “default user does not exist” is reported for kept..

WARNING – default user ‘keepalived_ script’ for script execution does not exist – please create.

Solution: add the user or group running the health check script to the configuration file

​
global_defs {
   router_id k8s
 
#Add
   script_user root
   enable_script_security 
 
}

The following error occurred when starting nginx:

open() "/run/nginx.pid" failed (2: No such file or directory)
[emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)

The general reason is that the nginx port is occupied

Solution 1

ps -ef|grep nginx
kill pad

Solution 2

Switch to nginx SBIN directory

-- Stop
sudo ./nginx -s stop
-- Start
./nginx

Similar Posts: