How to restart spamassassin after failure


up vote
0
down vote
favorite
Periodically, I see the following in syslog:
systemd[1]: spamassassin.service: Main process exited, code=exited, status=255/n/a
systemd[1]: spamassassin.service: Unit entered failed state.
systemd[1]: spamassassin.service: Failed with result 'exit-code'.
but the service does not automatically restart. It does start successfully with:
sudo service spamassassin restart
Can I configure spamassassin to restart automatically after it fails?
systemd spamassassin
add a comment |Â
up vote
0
down vote
favorite
Periodically, I see the following in syslog:
systemd[1]: spamassassin.service: Main process exited, code=exited, status=255/n/a
systemd[1]: spamassassin.service: Unit entered failed state.
systemd[1]: spamassassin.service: Failed with result 'exit-code'.
but the service does not automatically restart. It does start successfully with:
sudo service spamassassin restart
Can I configure spamassassin to restart automatically after it fails?
systemd spamassassin
1
There is no component to 'restart' SpamAssassin by-default. You would have to configure some type of monitoring system that'd run to monitor software programs on the system and start them again if they are down. However, this is actually not going to solve the underlying problem of SpamAssassin occasionally closing or shutting off or crashing. The actual question you should be asking first is: "Why did SpamAssassin fail to start or fail to shut down gracefully?". Have you examined why it's dying first?
â Thomas Wardâ¦
Jun 4 at 23:02
You're right. But I was multi-tasking - addressing both the failure cause and the possibility of restart after failure at the same time.
â flymike
Jun 5 at 4:08
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Periodically, I see the following in syslog:
systemd[1]: spamassassin.service: Main process exited, code=exited, status=255/n/a
systemd[1]: spamassassin.service: Unit entered failed state.
systemd[1]: spamassassin.service: Failed with result 'exit-code'.
but the service does not automatically restart. It does start successfully with:
sudo service spamassassin restart
Can I configure spamassassin to restart automatically after it fails?
systemd spamassassin
Periodically, I see the following in syslog:
systemd[1]: spamassassin.service: Main process exited, code=exited, status=255/n/a
systemd[1]: spamassassin.service: Unit entered failed state.
systemd[1]: spamassassin.service: Failed with result 'exit-code'.
but the service does not automatically restart. It does start successfully with:
sudo service spamassassin restart
Can I configure spamassassin to restart automatically after it fails?
systemd spamassassin
asked Jun 4 at 22:52
flymike
1757
1757
1
There is no component to 'restart' SpamAssassin by-default. You would have to configure some type of monitoring system that'd run to monitor software programs on the system and start them again if they are down. However, this is actually not going to solve the underlying problem of SpamAssassin occasionally closing or shutting off or crashing. The actual question you should be asking first is: "Why did SpamAssassin fail to start or fail to shut down gracefully?". Have you examined why it's dying first?
â Thomas Wardâ¦
Jun 4 at 23:02
You're right. But I was multi-tasking - addressing both the failure cause and the possibility of restart after failure at the same time.
â flymike
Jun 5 at 4:08
add a comment |Â
1
There is no component to 'restart' SpamAssassin by-default. You would have to configure some type of monitoring system that'd run to monitor software programs on the system and start them again if they are down. However, this is actually not going to solve the underlying problem of SpamAssassin occasionally closing or shutting off or crashing. The actual question you should be asking first is: "Why did SpamAssassin fail to start or fail to shut down gracefully?". Have you examined why it's dying first?
â Thomas Wardâ¦
Jun 4 at 23:02
You're right. But I was multi-tasking - addressing both the failure cause and the possibility of restart after failure at the same time.
â flymike
Jun 5 at 4:08
1
1
There is no component to 'restart' SpamAssassin by-default. You would have to configure some type of monitoring system that'd run to monitor software programs on the system and start them again if they are down. However, this is actually not going to solve the underlying problem of SpamAssassin occasionally closing or shutting off or crashing. The actual question you should be asking first is: "Why did SpamAssassin fail to start or fail to shut down gracefully?". Have you examined why it's dying first?
â Thomas Wardâ¦
Jun 4 at 23:02
There is no component to 'restart' SpamAssassin by-default. You would have to configure some type of monitoring system that'd run to monitor software programs on the system and start them again if they are down. However, this is actually not going to solve the underlying problem of SpamAssassin occasionally closing or shutting off or crashing. The actual question you should be asking first is: "Why did SpamAssassin fail to start or fail to shut down gracefully?". Have you examined why it's dying first?
â Thomas Wardâ¦
Jun 4 at 23:02
You're right. But I was multi-tasking - addressing both the failure cause and the possibility of restart after failure at the same time.
â flymike
Jun 5 at 4:08
You're right. But I was multi-tasking - addressing both the failure cause and the possibility of restart after failure at the same time.
â flymike
Jun 5 at 4:08
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
The manpage for systemd.service has the answer. For my particular case, the simplest solution was to add:
Restart=always
RestartSec=3
to the [Service] section of /lib/systemd/system/spamassassin.service
But there are more sophisticated controls available to limit restarts, should a failure loop occur.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The manpage for systemd.service has the answer. For my particular case, the simplest solution was to add:
Restart=always
RestartSec=3
to the [Service] section of /lib/systemd/system/spamassassin.service
But there are more sophisticated controls available to limit restarts, should a failure loop occur.
add a comment |Â
up vote
1
down vote
The manpage for systemd.service has the answer. For my particular case, the simplest solution was to add:
Restart=always
RestartSec=3
to the [Service] section of /lib/systemd/system/spamassassin.service
But there are more sophisticated controls available to limit restarts, should a failure loop occur.
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The manpage for systemd.service has the answer. For my particular case, the simplest solution was to add:
Restart=always
RestartSec=3
to the [Service] section of /lib/systemd/system/spamassassin.service
But there are more sophisticated controls available to limit restarts, should a failure loop occur.
The manpage for systemd.service has the answer. For my particular case, the simplest solution was to add:
Restart=always
RestartSec=3
to the [Service] section of /lib/systemd/system/spamassassin.service
But there are more sophisticated controls available to limit restarts, should a failure loop occur.
answered Jun 5 at 4:02
flymike
1757
1757
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043646%2fhow-to-restart-spamassassin-after-failure%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
There is no component to 'restart' SpamAssassin by-default. You would have to configure some type of monitoring system that'd run to monitor software programs on the system and start them again if they are down. However, this is actually not going to solve the underlying problem of SpamAssassin occasionally closing or shutting off or crashing. The actual question you should be asking first is: "Why did SpamAssassin fail to start or fail to shut down gracefully?". Have you examined why it's dying first?
â Thomas Wardâ¦
Jun 4 at 23:02
You're right. But I was multi-tasking - addressing both the failure cause and the possibility of restart after failure at the same time.
â flymike
Jun 5 at 4:08