- changed status to closed
No PID and related status data after service restart
When explicitly restarting a service though monit that uses a PID file (check process .. with pidfile ..), the following problem was observed: The service was displayed as "Running" and "Monitored", but no PID and related data were shown (Just a "-" instead). Only after some extra time (a polling cycle or timeout time?) the PID and related data was shown. I think once the status is "Running" the PID should be valid and known.
Comments (7)
-
repo owner -
reporter So "Running" does not mean the process is running and has a PID (otherwise monit would know the PID), but "Starting" (start action perfomed successfully, but no status/monitor yet)? It's a bit confusing at least.
-
repo owner In "Running" state the process has PID and is really running, just the process info structure is populated later. I understand it is confusing, will fix.
-
repo owner - changed status to open
-
repo owner - changed status to resolved
Fix Issue
#367: When process is restarted, monit showed the process as Running, but no process info such as PID was displayed until the service passed regular validation cycle.→ <<cset 685e04d670cf>>
-
repo owner Issue
#349was marked as a duplicate of this issue. -
repo owner Issue #484 was marked as a duplicate of this issue.
- Log in to comment
When you restart the process, monit waits for the process to start (so it can display that the process is Running or to see if the restart failed), but the particular process properties and tests are not performed immediately - they are done per schedule (next monitoring cycle). Until the service goes through the validation cycle, there are no data to display (represented as "-").