🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
8 messages
8 total messages Started by Sasko Stefanovski Sun, 18 Jan 2004 19:17
error in Daily Usenet report
#67709
Author: Sasko Stefanovski
Date: Sun, 18 Jan 2004 19:17
18 lines
1488 bytes
I am seeing the following in the Daily Usenet report:

Error in /usr/local/news/etc/innreport.conf line 12: must be 'section' 
instead of '#'
---------

But what is confusing is that line 12 of that file is correct:
     section default {

It used to work fine for this server which was promoted recently to from 
slave to master server.

Any ideas?

Sasko


Re: error in Daily Usenet report
#67712
Author: Patrick Schreurs
Date: Mon, 19 Jan 2004 20:59
23 lines
1568 bytes
On Sun, 18 Jan 2004, Sasko Stefanovski wrote:

> I am seeing the following in the Daily Usenet report:
>
> Error in /usr/local/news/etc/innreport.conf line 12: must be 'section'
> instead of '#'
> ---------
>
> But what is confusing is that line 12 of that file is correct:
>      section default {
>
> It used to work fine for this server which was promoted recently to from
> slave to master server.
>
> Any ideas?

Try adding a hard return before 'section default'.

Cheers,

Patrick Schreurs
Support.Net / News-Service.com
Re: error in Daily Usenet report
#67713
Author: Sasko Stefanovski
Date: Mon, 19 Jan 2004 23:07
31 lines
2131 bytes
I don't know what do you mean by 'hard return', but that line begins 
with 0x0a which is a newline char.

Sasko

Patrick Schreurs wrote:
> On Sun, 18 Jan 2004, Sasko Stefanovski wrote:
> 
> 
>>I am seeing the following in the Daily Usenet report:
>>
>>Error in /usr/local/news/etc/innreport.conf line 12: must be 'section'
>>instead of '#'
>>---------
>>
>>But what is confusing is that line 12 of that file is correct:
>>     section default {
>>
>>It used to work fine for this server which was promoted recently to from
>>slave to master server.
>>
>>Any ideas?
> 
> 
> Try adding a hard return before 'section default'.
> 
> Cheers,
> 
> Patrick Schreurs
> Support.Net / News-Service.com
Re: error in Daily Usenet report
#67714
Author: Sasko Stefanovski
Date: Mon, 19 Jan 2004 23:39
206 lines
8283 bytes
To locate the problem, I extracted the code from innreport that parses 
the configuration file as a separate script. The scripts is appended at 
the end of this posting.

1.
When I execute this script on a machine running RHEL AS 3.0 which has 
installed perl v5.8.0 (rpm perl-5.8.0-88.4) I'am getting the follwing 
output:

Error in /usr/local/news/etc/innreport.conf line 12: must be 'section' 
instead of '#'

2.
When executed on a machine running RH 7.2 with perl v5.6.1 everything is 
fine.

3.
When executed on RH 9 with perl v5.8.0 (rpm perl-5.8.0-88.3) the same 
error as in step 1.

It seems that the perl v5.8.0 has something to do with the above 
mentioned behavior.

Just to note that innreport.conf file that a was using is the one that 
comes with the distrubution of inn-2.4.0


Sasko


==========================================
#! /usr/bin/perl
sub Decode_Config_File {
   my $file = shift;
   my ($line, $section);
   my $linenum = 0;
   my $info;
   my @list;
   open (FILE, "$file") || die "Can\'t open config file \"$file\". 
Abort.\n";
   while (defined ($line = <FILE>)) {
     $linenum++;
     last if eof (FILE);
     ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
     die "Error in $file line $linenum: must be 'section' instead of 
'$info'\n"
       unless ($info eq 'section');
     ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
     die "Error in $file line $linenum: invalid section name '$info'\n"
       unless $info =~ /^\w+$/;
     print "section $info {\n" if $DEBUG;
     $section = $info;
     ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
     die "Error in $file line $linenum: must be a '{' instead of '$info'\n"
       unless ($info eq '{');
     ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
     push @list, $section;
     while ($info ne '}') { # it is a block
       last if eof (FILE);
       my $keyword = $info;
       ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
       my $value = $info;
       if ($info eq '{') { # it is a sub-block
	my @a;
	$output{$section}{$keyword} = \@a unless $output{$section}{$keyword};
	my %hash;
	print "\t$keyword {\n" if $DEBUG;
	($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	my @sublist; # to store the "data" blocks

	while ($info ne '}') {
	  last if eof (FILE);
	  my $subkeyword = $info;
	  ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	  my $subvalue = $info;
	  if ($info eq '{') {
	    # it is a sub-sub-block
	    my %subhash;
	    print "\t\t$subkeyword {\n" if $DEBUG;
	    my @b;
	    $hash{$subkeyword} = \@b unless ${hash}{$subkeyword};
	    ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	    while ($info ne '}') {
	      last if eof (FILE);
	      my $subsubkeyword = $info;
	      ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	      my $subsubvalue = $info;
	      if ($info eq '{') {
		die "Error in $file line $linenum: too many blocks.\n";
	      }
	      else {
		($info, $linenum, $line) =
		  &read_conf ($linenum, $line, \*FILE);
		die "Error in $file line $linenum: must be a ';' instead " .
		  "of '$info'\n" unless ($info eq ';');
		print "\t\t\t$subsubkeyword\t$subsubvalue;\n" if $DEBUG;
		$subhash{$subsubkeyword} = $subsubvalue;
		($info, $linenum, $line) =
		  &read_conf ($linenum, $line, \*FILE);
	      }
	    }
	    ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	    die "Error in $file line $linenum: must be a ';' instead of " .
	      "'$info'\n" unless $info eq ';';
	    push @{$hash{$subkeyword}} , \%subhash;
             ($info, $linenum, $line) = &read_conf ($linenum, $line, 
\*FILE);
	    print "\t\t};\n" if $DEBUG;
	  }
	  else {
	    ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	    die "Error in $file line $linenum: must be a ';' instead " .
	      "of '$info'\n" unless $info eq ';';
	    print "\t\t$subkeyword\t$subvalue;\n" if $DEBUG;
	    $hash{$subkeyword} = $subvalue;
	    ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	  }
	}
	($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
         die "Error in $file line $linenum: must be a ';' instead of 
'$info'\n"
	  unless $info eq ';';
	push @{$output{$section}{$keyword}}, \%hash;
	($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
	print "\t};\n" if $DEBUG;
       }
       else {
	($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
         die "Error in $file line $linenum: must be a ';' instead of 
'$info'\n"
	  unless $info eq ';';
	print "\t$keyword\t$value;\n" if $DEBUG;
	$output{$section}{$keyword} = $value;
	($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
       }
     }
     die "Error in $file line $linenum: must be a '}' instead of '$info'\n"
       unless $info eq '}';
     ($info, $linenum, $line) = &read_conf ($linenum, $line, \*FILE);
     die "Error in $file line $linenum: must be a ';' instead of '$info'\n"
       unless $info eq ';';
     print "};\n\n" if $DEBUG;
   }
   close FILE;
   $output{'_order_'} = \@list;
}

sub read_conf {
   my ($linenum, $line, $file) = @_;
   *FILE = *$file;

   $line =~ s,^\s+,,o;            # remove useless blanks
   $line =~ s,^(\#|//).*$,,o;     # remove comments (at the beginning)
   while (($line =~ m/^$/o || $line =~ m/^\"[^\"]*$/o) && !(eof (FILE))) {
     $line .= <FILE>;             # read one line
     $linenum++;
     $line =~ s,^\s*,,om;         # remove useless blanks
     $line =~ s,^(\#|//).*$,,om;  # remove comments (at the beginning)
   }
   $line =~ s/^(                  # at the beginning
	       [{};]             # match '{', '}', or ';'
	      |                  # OR
	       \"                # a double quoted string
                 (?:\\.|[^\"\\])*
                \"
	      |                  # OR
                [^{};\"\s]+       # a word
              )\s*//mox;
   my $info = $1;
   if (defined $info && $info) {
     chomp $info;
   }
   else {
     warn "Syntax error in conf file line $linenum.\n";
   }
   return ($info, $linenum, $line);
}

# The following lines are not part of the distribution and are added
# just to drive the above procedures

$file = "/usr/local/news/etc/innreport.conf";
&Decode_Config_File ($file);
==================================================

Sasko Stefanovski wrote:

> I am seeing the following in the Daily Usenet report:
> 
> Error in /usr/local/news/etc/innreport.conf line 12: must be 'section' 
> instead of '#'
> ---------
> 
> But what is confusing is that line 12 of that file is correct:
>     section default {
> 
> It used to work fine for this server which was promoted recently to from 
> slave to master server.
> 
> Any ideas?
> 
> Sasko
> 
> 
> 
Re: error in Daily Usenet report
#67717
Author: Russ Allbery
Date: Tue, 20 Jan 2004 00:45
13 lines
1661 bytes
Sasko Stefanovski <sstefano@richmond.edu> writes:

> I don't know what do you mean by 'hard return', but that line begins
> with 0x0a which is a newline char.

We've seen this error before, but I can't remember what caused it.  It
should be in Google Groups, though....

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Re: error in Daily Usenet report
#67720
Author: Jeffrey M. Vinocur
Date: Tue, 20 Jan 2004 02:20
16 lines
1610 bytes
In article <87brozla6z.fsf@windlord.stanford.edu>,
Russ Allbery  <rra@stanford.edu> wrote:
>
>We've seen this error before, but I can't remember what caused it.  It
>should be in Google Groups, though....

I was curious enough to go digging -- thread is:

http://groups.google.com/groups?threadm=bfj0eh%24jca%241%40bananasplit.info

The last article in the thread has a workaround.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: error in Daily Usenet report
#67725
Author: Sasko Stefanovski
Date: Tue, 20 Jan 2004 14:19
28 lines
2170 bytes
Thanks for your help.

But I am wondering if that is know bug in RedHat 9, why they (RH) 
haven't fixed that in their Enterprise product RHEL 3.0 which came out 
in October 2003, because as I can see from the posting the bug was known 
before July 22, 2003!?

Anyway thanks again. Works now.

Sasko


Jeffrey M. Vinocur wrote:
> In article <87brozla6z.fsf@windlord.stanford.edu>,
> Russ Allbery  <rra@stanford.edu> wrote:
> 
>>We've seen this error before, but I can't remember what caused it.  It
>>should be in Google Groups, though....
> 
> 
> I was curious enough to go digging -- thread is:
> 
> http://groups.google.com/groups?threadm=bfj0eh%24jca%241%40bananasplit.info
> 
> The last article in the thread has a workaround.
> 
> 
Re: error in Daily Usenet report
#67726
Author: Geoff Brozny
Date: Tue, 20 Jan 2004 19:04
22 lines
2079 bytes
"Sasko Stefanovski" <sstefano@richmond.edu> wrote in message
news:bujdco$kvl$1@rumor.richmond.edu...
> Thanks for your help.
>
> But I am wondering if that is know bug in RedHat 9, why they (RH)
> haven't fixed that in their Enterprise product RHEL 3.0 which came out
> in October 2003, because as I can see from the posting the bug was known
> before July 22, 2003!?
>
> Anyway thanks again. Works now.


I'm running RH9, the only thing I have done to innreport was change the
config to make html output,  it works fine on my main news server, and works
on my spare box as well. However I did see that error once in my daily
report, and did not have a chance to look into it, but it never did it
again.

geoff

Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads