Hi Peter,

Yeah that was it.  I'm not at all sure why this occurs, but I had to do this 
for nfdump:

------------------------------------------------------------------------
--- Makefile.in.org     2007-10-14 23:34:23.000000000 -0700
+++ Makefile.in 2008-02-15 14:25:49.000000000 -0800
@@ -72,7 +72,7 @@
 all: $(OBJECTS)

 nfcapd:        $(NFCAPD_OBJ)
-       $(CC) $(CFLAGS) -o $@ $(NFCAPD_OBJ) $(LDFLAGS) $(LIBS)
+       $(CC) $(CFLAGS) -o $@ $(NFCAPD_OBJ) $(LDFLAGS)

 sfcapd: $(SFCAPD_OBJ)
        $(CC) $(CFLAGS) -o $@ $(SFCAPD_OBJ) $(LDFLAGS) $(LIBS)
-------------------------------------------------------------------------

The -lrrd is not necessary and seemed to cause the runtime failure.  At least 
some of the other utilities in the nfdump suite need the -lrrd on it or the 
build fails.  But since I'm just starting to use nfsen, I won't know for awhile 
if any of the other utilities have a similar problem.  Or does nfsen use only 
nfcapd?  Anyway, the nfsen now starts nfcapd and that's a start.

Thanks for your help.

Mark

________________________________________
From: Peter Haag [EMAIL PROTECTED]
Sent: Friday, February 15, 2008 4:09 AM
To: Mark Duling; [email protected]
Subject: Re: [Nfsen-discuss] nfsen crashing

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- --On February 13, 2008 10:47:58 -0800 Mark Duling <[EMAIL PROTECTED]> wrote:

| - --On February 13, 2008 9:50:21 AM -0800 Mark Duling <[EMAIL PROTECTED]> 
wrote:
|
| |
| |
| | >> Hi Mark,
| |
| | | Hello,
| | |
| | | When I start nfsen (I have the latest version of nfsen and nfdump with
| | | -enable-nfprofile) and nfcapd is crashing for me at startup before any
| | | information can be logged to syslog as far as I can tell.  RRD is linked
| |
| | >> crashing?? I'm not aware of any nfcapd crashes. What system/OS are you 
using?
| | >> btw. nfcapd is not related to rrd or Perl, and can be independently 
started.
| |
| | >> How does your nfsen.conf file looks like?
| |
| | Hi Peter,
| |
| | I'm on OS X.  It weird because nfcapd starts on its own ok.  But it won't 
start via nfsen.  My nfsen.conf has PREFIX set to
| | the right path.  I don't get it either.  The "crash" is reported through OS 
X's reporting facility.  Perhaps it is some
| | weird platform issue.  I'll investigate more.
|
| >> Entire NfSen itself does not start properly on MacOSX as Apple's Perl does 
not support
| >> dropping user privileges. You need to check for a 3rd party Perl allowing 
these
| >> privileges settings:
|
| >>    $( = $www_gid;
| >>    $) = "$www_gid $(";
|
| >>    $> = $nf_uid;
|
| >> Not sure, but fin's Perl might .. unsure ..
|
| Ah, I forgot to mention that I thought I'd worked around that by commenting 
out these lines in nfsend:
|
| =======
| if ( !NfSen::DropPriv($NfConf::USER) ) {
| die "$Log::ERROR\n";
| }
| =======
|
| Then I changed NfSenRC.pm from this:
|
| system "$NfConf::BINDIR/nfsend";
|
| to this:
|
| system "/usr/bin/su netflow -c $NfConf::BINDIR/nfsend";
|
| That was the attempt to work around the droppriv deficiency in OS X perl.  
Sorry I didn't mention that.  I may have gone
| beyond what you can support.

I remember a case dealing with recently, where somebode else had trouble with 
macosx. It turned out be be some oddities in the
order of linking. This may apply to your problem:

==============
when the build is running you see this
gcc -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes
- - -Wmissing-declarations -Wmissing-noreturn -o nfdump nfdump.o minilzo.o
nffile.o nf_common.o util.o flist.o panonymizer.o rijndael.o grammar.o
scanner.o nftree.o ipconv.o nfstat.o nfprof.o -L/util_macos//lib -lrrd
this is linking nfdump
if you add a '-v' to that command, gcc will reveal how it does the linking
3:12 PM
in this case,
/usr/libexec/gcc/i686-apple-darwin9/4.0.1/collect2 -dynamic -arch i386
- - -macosx_version_min 10.5.1 -weak_reference_mismatches non-weak -o nfdump
- - -lcrt1.10.5.o -L/util_macos//lib -L/usr/lib/i686-apple-darwin9/4.0.1
- - -L/usr/lib/gcc/i686-apple-darwin9/4.0.1
- - -L/usr/lib/gcc/i686-apple-darwin9/4.0.1
- - -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../../i686-apple-darwin9/4.0.1
- - -L/usr/lib/gcc/i686-apple-darwin9/4.0.1/../../.. nfdump.o minilzo.o
nffile.o nf_common.o util.o flist.o panonymizer.o rijndael.o grammar.o
scanner.o nftree.o ipconv.o nfstat.o nfprof.o -lrrd -lgcc_s.10.5 -lgcc
- - -lSystem
the problem is -lrrd -lgcc_s.10.5 -lgcc -lSystem
so if we cut and paste and change '-lrrd -lgcc_s.10.5 -lgcc -lSystem' to
'-lgcc_s.10.5 -lgcc -lSystem -lrrd'
everything works 'just fine'
=================


    - Peter

|
| Mark
|
| -------------------------------------------------------------------------
| This SF.net email is sponsored by: Microsoft
| Defy all challenges. Microsoft(R) Visual Studio 2008.
| http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
| _______________________________________________
| Nfsen-discuss mailing list
| [email protected]
| https://lists.sourceforge.net/lists/listinfo/nfsen-discuss



- --
_______ SWITCH - The Swiss Education and Research Network ______
Peter Haag,  Security Engineer,  Member of SWITCH CERT
PGP fingerprint: D9 31 D5 83 03 95 68 BA  FB 84 CA 94 AB FC 5D D7
SWITCH, Werdstrasse 2, P.O. Box,  CH-8021   Zurich, Switzerland
E-mail: [EMAIL PROTECTED] Web: http://www.switch.ch/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iQCVAwUBR7WA8/5AbZRALNr/AQKL4wP/YvJtLYdlzIz1wurDRNjl5DTzN1FT73r8
GbMfXHhr/+yzn9afcPXGflbeayKq/5KYa86AFJ5S3oX7dRoJ2B268HtmLgOQYZ/H
g3R3l6OX7D5/KUCT9Pk9APiKX8unZoGZjoOrj3JvHa6G/5f7V5HtAY8UyxT81utp
Z2SyhvDbKuU=
=RELs
-----END PGP SIGNATURE-----


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nfsen-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss

Reply via email to