关于redis6.service: Can't open PID file /var/run/redis_6379.pid (yet?) after start: No such file or directory
近期安装了REDIS6 ,启动时发现提示redis6.service: Can't open PID file /var/run/redis_6379.pid (yet?) after start: No such file or directory!
更改权限发现不是权限问题。
最终找到问题是启动服务重写了/var/run/redis_6379.pid 删除掉在启动服务中的PIDFile,就可以正常启动了。
[Unit] Description=RedisService After=network.target [Service] Type=forking #PIDFile=/var/run/redis_6379.pid ExecStart=/usr/local/soft/redis6/bin/redis-server /usr/local/soft/redis6/conf/redis.conf ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s QUIT $MAINPID PrivateTmp=true [Install] WantedBy=multi-user.target