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

Hi Adrian,
Yes - this is a know bug of the snapshot. Apply the patch appended.

    - Peter

- --On February 26, 2007 10:52:45 +0200 Adrian Popa <[EMAIL PROTECTED]> wrote:

| Hello everybody.
|
| I've ran into problems while trying to add a new source to my nfsen
| installation. This is how my %sources looked like before and after
| adding a new source:
|
| BEFORE:
| %sources = (
|     '7304bcnt2'    => { 'port'    => '9901', 'col' => '#0000ff', 'type'
| => 'netflow' },
|     '7304bb2'        => { 'port'    => '9900', 'col' => '#ff0000',
| 'type' => 'netflow' },
| );
|
| AFTER:
| %sources = (
|     '7304bcnt2'    => { 'port'    => '9901', 'col' => '#0000ff', 'type'
| => 'netflow' },
|     '7304bb2'        => { 'port'    => '9900', 'col' => '#ff0000',
| 'type' => 'netflow' },
|     '12410bcnt2'   => { 'port' => '9903', 'col' => '#00ff00', 'type' =>
| 'netflow'},
| );
|
| The first two sources were working ok and were added when I installed
| nfsen.
|
| I did a nfsen reconfig and I got these errors:
|
| [EMAIL PROTECTED] bin]# ./nfsen reconfig
| New sources to configure : 12410bcnt2
| Continue? [y/n] y
|
| Add source(s): 12410bcnt2:
| Add source '12410bcnt2'Argument "12410bcnt2" isn't numeric in
| subtraction (-) at /data/nfsen/libexec/NfProfile.pm line 1042.
| Unable to create DB file: No such file or directory
| Use of uninitialized value in unlink at /data/nfsen/libexec/NfProfile.pm
| line 1045.
| Error while setting up channel '12410bcnt2': Creating RRD failed for
| channel '12410bcnt2': ERROR while creating RRD DB 12410bcnt2.rrd: start
| time: did you really mean month 12110?
| No collector started!
|
|
| No pid file found for nfsend - please restart manually
|
| I tried to delete it and add it again, but nomatter what I did, I got
| the same error.
|
| [EMAIL PROTECTED] bin]# ./nfsen reconfig
| Remove configured sources: 12410bcnt2
| Continue? [y/n] y
|
| Delete source(s): 12410bcnt2:
| Delete source '12410bcnt2'
|
| No pid file found for nfsend - please restart manually
|
| I didn't get any other messages in syslog.
| The only way I managed to install this source was to delete my whole
| installation and reinstall it with the updated nfsen.conf file.
|
| Any idea why this happened?
|
| Thank you kindly for your help.
|
| --
| Adrian Popa
|
|
|
|
|
| -------------------------------------------------------------------------
| Take Surveys. Earn Cash. Influence the Future of IT
| Join SourceForge.net's Techsay panel and you'll get the chance to share your
| opinions on IT & business topics through brief surveys-and earn cash
| http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
| _______________________________________________
| 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,  Limmatquai 138,  CH-8001 Zurich,  Switzerland
E-mail: [EMAIL PROTECTED] Web: http://www.switch.ch/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iQCVAwUBReLg0P5AbZRALNr/AQLBRAP6AvTkANnhvfZ3r6fhhSeBr55VdBCohL6T
8I/g3K86qOKJfm19eTTPjs2FR+gQ0Mym2MKB2btH2iffVrjuFcy+udckb2ykl6Yu
IW6YxW95cPZwNz+yBje3jp2LpOfhwoxU49y4QOrFim+njkbJADj01Dz+qG5GJ/db
o3q1/6VXSLo=
=4mkD
-----END PGP SIGNATURE-----
--- NfProfile.pm        2007-02-08 13:01:02.000000000 +0100
+++ /Users/peter/nfsen-current/libexec/NfProfile.pm     2007-02-20 
10:49:19.000000000 +0100
@@ -962,18 +903,18 @@
 } # end of ProfileHistory
 
 sub AddChannel {
-       my $profileref = shift;
-       my $channel = shift;
-       my $sign        = shift;
-       my $order       = shift;
-       my $colour      = shift;
-       my $tstart      = shift;
-       my $sourcelist = shift;
-       my $filter      = shift;        # array ref to lines for filter
+       my $profileref  = shift;
+       my $channel     = shift;
+       my $sign                = shift;
+       my $order               = shift;
+       my $colour              = shift;
+       my $sourcelist  = shift;
+       my $filter              = shift;        # array ref to lines for filter
 
        my $profile      = $$profileref{'name'};
        my $profilegroup = $$profileref{'group'};
        my $profilepath  = ProfilePath($profile, $profilegroup);
+       my $tstart               = $$profileref{'tstart'};
 
        # name is already validated from calling routine
 
@@ -990,7 +931,7 @@
        # setup channel directory
        my $dir = "$NfConf::PROFILEDATADIR/$profilepath/$channel";
        mkdir "$dir" or
-                       return "Can't create channel directory: '$dir' $!\n";
+               return "Can't create channel directory: '$dir' $!\n";
 
        if ( !chmod 0775, $dir ) {
                rmdir "$dir";
@@ -1001,7 +942,7 @@
                return "Can't chown '$dir': $! ";
        }
 
-       if ( $profile ne 'live' ) {
+       if ( $profile ne 'live' || $profilegroup ne '.') {
                # setup channel filter
                my $filterfile = 
"$NfConf::PROFILESTATDIR/$profilepath/$channel-filter.txt";
        
@@ -1009,7 +950,7 @@
                        rmdir "$dir",
                        return "Can't open filter file '$filter': $!";
        
-               print FILTER @$filter;
+               print FILTER map "$_\n", @$filter;
                close FILTER;
        }
 
@@ -1040,13 +981,14 @@
        # $tstart is the first value we need in the RRD DB, therefore specify 
        # $tstart - 300 ( 1 slot )
        NfSenRRD::SetupRRD("$NfConf::PROFILESTATDIR/$profilepath", $channel, 
$tstart - 300, 1);
-
        if ( defined $Log::ERROR ) {
                rmdir "$NfConf::PROFILEDATADIR/$profilepath/$channel",
                unlink $filter;
                return "Creating RRD failed for channel '$channel': 
$Log::ERROR\n";
        }
 
+       chown $uid, $gid, "$NfConf::PROFILESTATDIR/$profilepath/$channel.rrd";
+
        return "ok";
 
 } # End of AddChannel

Attachment: pgpofcdsud4xP.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Nfsen-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nfsen-discuss

Reply via email to