Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    cron complaining about haproxy

    Scheduled Pinned Locked Moved Cache/Proxy
    8 Posts 2 Posters 957 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J Offline
      j.koopmann
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • jimpJ Offline
        jimp Rebel Alliance Developer Netgate
        last edited by

        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 your PATH, but it is not in the PATH used by cron. So there is some script being called by cron in which haproxy is not run using its full path when it should be.

        Remember: Upvote with the πŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • J Offline
          j.koopmann
          last edited by

          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?

          jimpJ 1 Reply Last reply Reply Quote 0
          • jimpJ Offline
            jimp Rebel Alliance Developer Netgate @j.koopmann
            last edited by

            @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.

            Remember: Upvote with the πŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • J Offline
              j.koopmann
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • jimpJ Offline
                jimp Rebel Alliance Developer Netgate
                last edited by

                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.

                Remember: Upvote with the πŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 1
                • J Offline
                  j.koopmann
                  last edited by

                  You're the best. Great. Thanks a lot.

                  1 Reply Last reply Reply Quote 0
                  • jimpJ Offline
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    https://redmine.pfsense.org/issues/9922

                    https://github.com/pfsense/FreeBSD-ports/commit/47f4f91aa8159e47f24990eb2496784cb9ef07c6

                    https://github.com/pfsense/FreeBSD-ports/commit/e8bec3bf1a773bdc61ebb7555941a2b9e26db732

                    Remember: Upvote with the πŸ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.