From 9f8fa63b6ae4fab61111846fac27ac36f4d88e3a Mon Sep 17 00:00:00 2001 From: Juan Jose Nicola Date: Thu, 12 Nov 2020 16:38:12 +0100 Subject: [PATCH] Add more information and problem resolution. The normal behavior of the pidfile is to prevent the daemon to be run twice. When the ospd-openvas daemon dies unexpectedly or it is killed with SIGKILL (-9) signal, leaves the pid file, which prevent the daemon to start again. If this is the case, the pidfile must be removed manually. --- ospd/misc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ospd/misc.py b/ospd/misc.py index d7b78f69..7c4db62e 100644 --- a/ospd/misc.py +++ b/ospd/misc.py @@ -104,7 +104,11 @@ def create_pid(pidfile: str) -> bool: pidpath = Path(pidfile) if pidpath.is_file(): - LOGGER.error("There is an already running process.") + LOGGER.error( + "There is an already running process. If no process is running, " + "please remove the pid file '%s' manually", + str(pidpath.absolute()), + ) return False try: