cron complaining about haproxy
-
After installing arpwatch I am receiving cron-errors via mail (I do know why). The specific error I am getting from /etc/rc.filter_configure_sync is
X-Cron-Env: <SHELL=/bin/sh> X-Cron-Env: <PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin> X-Cron-Env: <HOME=/root> X-Cron-Env: <LOGNAME=root> X-Cron-Env: <USER=root> sh: haproxy: not found sh: haproxy: not found sh: haproxy: not found sh: haproxy: not found
If I run that script from the shell I do not get any errors. haproxy is installed and alive (haproxy-devel to be exact). Any ideas where to look for and how to get rid of these errors without simply deleting them via e-mail rule?
Regards,
JP -
haproxy
is located at/usr/local/sbin/haproxy
@j-koopmann said in cron complaining about haproxy:
X-Cron-Env: <PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin>
When you go to the shell,
/usr/local/sbin
is in yourPATH
, but it is not in thePATH
used bycron
. So there is some script being called by cron in whichhaproxy
is not run using its full path when it should be. -
Makes sense. Looks as if adding the path to cron should do the trick then.
The βscriptβ is clearly stated however it looks as if there are php based scripts being run and I do far have not followed all those scripts. Would this then not be a problem of the haproxy package?
-
@j-koopmann said in cron complaining about haproxy:
Would this then not be a problem of the haproxy package?
Most likely, yes. But without seeing the exact contents of your cron jobs it's difficult to say with certainty.
-
Hi,
but I already mentioned that
0,15,30,45 * * * * root /etc/rc.filter_configure_sync
triggers the problem. Nothing else. What else in my cronjobs do you need. I would expect this to be the same for all installations with the haproxy-devel script installed.
<?php require_once("config.inc"); require_once("functions.inc"); require_once("filter.inc"); require_once("shaper.inc"); require_once("ipsec.inc"); require_once("vpn.inc"); filter_configure_sync();
Where should I go from there to find the incorrect part? Let me know and I will gladly investigate.
Regards,
JP -
OK I overlooked that before. I was able to reproduce it
: env PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin /etc/rc.filter_configure_sync sh: haproxy: not found sh: haproxy: not found sh: haproxy: not found sh: haproxy: not found
I found the problem and I'll commit a fix shortly. You should see a new version of the haproxy package in a while.
-
You're the best. Great. Thanks a lot.
-
https://redmine.pfsense.org/issues/9922
https://github.com/pfsense/FreeBSD-ports/commit/47f4f91aa8159e47f24990eb2496784cb9ef07c6
https://github.com/pfsense/FreeBSD-ports/commit/e8bec3bf1a773bdc61ebb7555941a2b9e26db732