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

    Arpwatch pkg not starting….

    Scheduled Pinned Locked Moved pfSense Packages
    12 Posts 4 Posters 5.0k Views
    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.
    • D
      dgcom
      last edited by

      Hi!

      Why would arpwatch add /usr/sbin/sendmail (link to /usr/sbin/sm.php)? This causes ALL cron jobs to send email to configured email address and there might be many jobs configured.

      How this can be fixed?

      DG

      1 Reply Last reply Reply Quote 0
      • B
        bryan.paradis
        last edited by

        @dgcom:

        Hi!

        Why would arpwatch add /usr/sbin/sendmail (link to /usr/sbin/sm.php)? This causes ALL cron jobs to send email to configured email address and there might be many jobs configured.

        How this can be fixed?

        Can you give more information and example email or what not?

        1 Reply Last reply Reply Quote 0
        • D
          dgcom
          last edited by

          Hi!

          You can see plenty of email samples in this thread.

          As for more info - sure. If you read crontab(5) and other cron docs carefully, you will see, that cron will collect an output from all jobs (if any) and will email them - if it finds /usr/lib/sendmail.
          By default, there is no /usr/lib/sendmail in pfSense 2.1 install. When package arpwatch is installed, it will create one (by linking it to /usr/sbin/sm.php) - see here.
          Once arpwatch is installed, cron is able to find sendmail and send reports.

          There are several bad things with this:

          • This is configured during package install, but is NOT removed on uninstall

          • Change is done to the product (sendmail) which does not belong to arpwatch package

          I would consider arpwatch package broken right now (and it is, indeed - service will not start because of another bug).
          It is really sad, that packages, published for pfSense are not properly tested.

          If sendmail is needed for arpwatch, it has to be at least configurable.

          To fix - I am going to try and add empty MAILTO to crontab and see if mails stop.

          Thanks!

          DG

          1 Reply Last reply Reply Quote 0
          • D
            dgcom
            last edited by

            Just a quick update. Adding

            MAILTO=""
            

            to /etc/crontab resolved the issue.

            DG

            1 Reply Last reply Reply Quote 0
            • B
              bryan.paradis
              last edited by

              You may want to address this in that thread you referenced instead of here in this silo that has something to do with arpwatch not starting.

              1 Reply Last reply Reply Quote 0
              • D
                dgcom
                last edited by

                You are most probably right. I commented here because this is also related to recent changes to the package.
                I will post to that other thread with the reference to my post here.

                DG

                1 Reply Last reply Reply Quote 0
                • B
                  bryan.paradis
                  last edited by

                  @dgcom:

                  You are most probably right. I commented here because this is also related to recent changes to the package.
                  I will post to that other thread with the reference to my post here.

                  That would be great. I would say the recent changes are about 6 months old. Though the bugfix I posted above is a lot more recent.

                  https://github.com/pfsense/pfsense-packages/commits/master/config/arpwatch.xml

                  1 Reply Last reply Reply Quote 0
                  • A
                    angel2013
                    last edited by

                    OK.  Made this change, but it;s not starting via GUI.  It does start however via cmdline:

                    [2.1-RELEASE][root@pfsense]/(15): /usr/local/etc/rc.d/arpwatch start
                    meuh
                    prcmd
                    Starting arpwatch.
                    [2.1-RELEASE][root@pfsense]/(16): ps -aux | egrep arpwatch
                    root  62626  1.0  1.2  4472  2980  0  S    3:16PM  0:00.20 /usr/pbi/arpwatch-i386/sbin/arpwatch

                    @bryan.paradis:

                    This is because the latest commit to fix a email format introduced a bug. The fix is in my open merge request which also adds support for multiple interfaces.

                    Revert the following change in arpwatch.xml: https://github.com/pfsense/pfsense-packages/pull/608/files

                    
                    $start .= "/usr/local/sbin/arpwatch {$debug} -f {$log_file} \"{$mail}\" -i {$int} > /var/log/arpwatch.reports 2>&1 &";
                    
                    

                    Change back to the below code

                    
                    $start .= "/usr/local/sbin/arpwatch {$debug} -f {$log_file} {$mail} -i {$int} > /var/log/arpwatch.reports 2>&1 &";
                    
                    
                    1 Reply Last reply Reply Quote 0
                    • B
                      bryan.paradis
                      last edited by

                      @angel2013:

                      OK.  Made this change, but it;s not starting via GUI.  It does start however via cmdline:

                      [2.1-RELEASE][root@pfsense]/(15): /usr/local/etc/rc.d/arpwatch start
                      meuh
                      prcmd
                      Starting arpwatch.
                      [2.1-RELEASE][root@pfsense]/(16): ps -aux | egrep arpwatch
                      root  62626  1.0  1.2  4472  2980  0  S    3:16PM  0:00.20 /usr/pbi/arpwatch-i386/sbin/arpwatch

                      @bryan.paradis:

                      This is because the latest commit to fix a email format introduced a bug. The fix is in my open merge request which also adds support for multiple interfaces.

                      Revert the following change in arpwatch.xml: https://github.com/pfsense/pfsense-packages/pull/608/files

                      
                      $start .= "/usr/local/sbin/arpwatch {$debug} -f {$log_file} \"{$mail}\" -i {$int} > /var/log/arpwatch.reports 2>&1 &";
                      
                      

                      Change back to the below code

                      
                      $start .= "/usr/local/sbin/arpwatch {$debug} -f {$log_file} {$mail} -i {$int} > /var/log/arpwatch.reports 2>&1 &";
                      
                      

                      what does the arpwatch.sh have in it?

                      1 Reply Last reply Reply Quote 0
                      • F
                        floz
                        last edited by

                        Same problem here, arpwatch service won't start.

                        If I look inside <tt>/usr/local/etc/rc.d/arpwatch.sh</tt> I find

                        /usr/local/sbin/arpwatch -d -f /var/log/arp.dat  -i bce2 > /var/log/arpwatch.reports 2>&1 &
                        

                        But executing this on the command line only gives "<tt>Ambiguous output redirect.</tt>" (although this may just be a shell problem).

                        Anyway, arpwatch (2.1.a15_8 pkg v1.1.2) not working on pfSense 2.2-RELEASE (amd64) :(

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