Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 392289 - app-admin/monit should be started as last service
Summary: app-admin/monit should be started as last service
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Low normal
Assignee: Patrick Lauer
URL:
Whiteboard:
Keywords: PATCH, PullRequest
Depends on:
Blocks:
 
Reported: 2011-11-28 16:49 UTC by Marc Schiffbauer
Modified: 2023-02-17 13:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
monit patch (monit.patch,193 bytes, patch)
2016-11-21 12:41 UTC, INODE64 Sistemas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer gentoo-dev 2011-11-28 16:49:52 UTC
I am not really sure how this can be done with openrc but I think it would be a good idea to start the monit service after all other services have been startet on startup.

Otherwise it will interfere with the normal system startup or runlevel change.
At least it looked like that at the last startup of one of my servers where nearly everything is monitored via monit.

For example my sshd was too early I guess (it did not bind to all ips it should have done...):

Part of logs form last system startup:

Nov 28 14:48:12 pluto monit[4134]: 'sshd' process is not running
Nov 28 14:48:12 pluto monit[4134]: Cannot open a connection to the mailserver 'localhost:25' -- Transport endpoint is not connected
Nov 28 14:48:12 pluto monit[4134]: No mail servers are available
Nov 28 14:48:12 pluto monit[4134]: Aborting event
Nov 28 14:48:12 pluto monit[4134]: 'sshd' trying to restart
Nov 28 14:48:12 pluto monit[4134]: 'sshd' start: /etc/init.d/sshd
Nov 28 14:48:12 pluto /etc/init.d/sshd[4282]: WARNING: sshd is already starting



What do you think?
Comment 1 Patrick Lauer gentoo-dev 2011-11-29 01:52:07 UTC
That's a mostly reasonable suggestion.

What you could do as a temporary improvement is to delay monit - as far as I remember it has a startup timeout that can be set in the config, set that to maybe 5 minutes and it won't interfere with normal startup.
Comment 2 Marc Schiffbauer gentoo-dev 2015-03-10 01:47:49 UTC
The delay in monitrc seems to be good solution. Feel free to close this bug. And thanks for the suggestion.
Comment 3 INODE64 Sistemas 2016-11-21 12:41:18 UTC
Created attachment 453974 [details, diff]
monit patch

Start after all services
Comment 4 INODE64 Sistemas 2016-11-21 12:45:24 UTC
I changed init.d to start after all services and it stop fisrt by when shutdown of server, the monit start again the services when stopped