I've got a cron job that runs a perl script that check the status of apache:
my $status = `sudo apachectl status`;
The cron job is run every minute without a problem. Sooner or later, however, I'll start getting the following error emailed from the cronjob:
'www-browser --dump http://localhost:80/server-status' failed.
Maybe you need to install a package providing www-browser or you
need to adjust the APACHE_LYNX variable in /etc/apache2/envvars
The error can also be generated if I run this from the command line:
www-browser --dump http://localhost:80/server-status
What's particularly odd, though, is that the apache report gets generated just fine except it has the error shown above at the end of it.
Does anyone know what explains this behavior and how I might get apache to not generate this error?
a bit if stracing seems to indicate that this is message is produced because the awk idiom in
get_status()
ends up killing lynx prematurely with SIGPIPE, generating a non-zero exit code./usr/sbin/apache2ctl:
you can replicate the behavior with
which generates the message, vs
which does not