🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
7 messages
7 total messages Started by ktso Fri, 29 Nov 2002 02:45
INN 2.3.3 tradspool problem
#62164
Author: ktso
Date: Fri, 29 Nov 2002 02:45
19 lines
1856 bytes
I have tried to search similar problems with INN at Google.  It seems
that most of us suffered such problem after a crash.

Nov 29 09:44:01 helium innd: localhost connected 53
Nov 29 09:44:01 helium innd: tradspool: could not open /usr/local/news/spool/articles/local/test/2 File exists
Nov 29 09:44:01 helium innd: SERVER cant store article: File exists

It is not the only cause of problem.  If I create a tradspool group and
post a few messages in it and then remove the group, the problem will
arise when I post articles to it again.  In the past when we do not have
tradspool storage API, we can renumber the group and the old articles
can re-appear again.  Old articles will also be expired during
news.daily even if the group does not exist.

So, it seems that the current solution is that we have to remove the
files in a group after we rmgroup a tradspool group.  Any better
approach?

Re: INN 2.3.3 tradspool problem
#62165
Author: Russ Allbery
Date: Fri, 29 Nov 2002 02:52
72 lines
4223 bytes
ktso <ktso@cuRemov-mEhk.edu.hk> writes:

> I have tried to search similar problems with INN at Google.  It seems
> that most of us suffered such problem after a crash.

> Nov 29 09:44:01 helium innd: localhost connected 53
> Nov 29 09:44:01 helium innd: tradspool: could not open /usr/local/news/spool/articles/local/test/2 File exists
> Nov 29 09:44:01 helium innd: SERVER cant store article: File exists

> It is not the only cause of problem.  If I create a tradspool group and
> post a few messages in it and then remove the group, the problem will
> arise when I post articles to it again.  In the past when we do not have
> tradspool storage API, we can renumber the group and the old articles
> can re-appear again.  Old articles will also be expired during
> news.daily even if the group does not exist.

URL: <http://www.eyrie.org/~eagle/faqs/inn.html#S4.4>

Subject: 4.4. tradspool: could not open ... File exists

This error generally happens after a crash or unclean shutdown of innd
using the tradspool storage method, and is caused by overview information
being out of sync with what articles are in the spool.  When innd was
restarted, it renumbered its active file (which determines the range of
existing articles in each group and therefore what article number is
assigned to new articles) based on the overview information.  If there are
newer articles already on disk that aren't mentioned in the overview
(because the overview information for those articles hasn't been flushed
to disk yet), new incoming articles will get assigned the same number as
the existing article and then innd will fail to store the article and
throttle with this error.

One way to correct this error is to rebuild the entire overview database
with:

    makehistory -O -x -F

but this takes a long time and is to some degree overkill.  A better
solution in some cases is to just remove all articles in the spool that
have higher numbers than the numbers in the active file.

Here's a Perl script that will do that.  Just save this to a file, make it
executable, and run it, giving it the path to the active file as the first
argument and the path to the top of your tradspool news spool as the
second argument:

    #!/usr/bin/perl
    die "Usage: <name> <active> <spool-path>\n" unless @ARGV == 2;
    open (ACTIVE, $ARGV[0]) or die "Can't open $ARGV[0]: $!\n";
    while (<ACTIVE>) {
        my ($group, $hi, $lo, $flag) = split;
        my $directory = $group;
        next if ($hi == 0 and $lo <= 1);
        $directory =~ tr%.%/%;
        $directory = $ARGV[1] . '/' . $directory;
        opendir (DIR, $directory) or die "Can't open $directory: $!\n";
        while (defined ($_ = readdir DIR)) {
            unlink "$directory/$_" if ($_ > $hi);
        }
        closedir DIR;
    }

INN 2.4 is expected to have better recovery tools to deal with problems
like this, and to be less vulnerable to losing overview information in
system crashes.

-- 
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: INN 2.3.3 tradspool problem
#62166
Author: Jeffrey M. Vinocur
Date: Fri, 29 Nov 2002 05:16
32 lines
2007 bytes
In article <as6kcs$2r79$1@ijustice.itsc.cuhk.edu.hk>,
 <ktso@cuRemov-mEhk.edu.hk> wrote:
>
>Nov 29 09:44:01 helium innd: SERVER cant store article: File exists
>
>It is not the only cause of problem.  If I create a tradspool group and
>post a few messages in it and then remove the group, the problem will
>arise when I post articles to it again.

That's true.  If you want to delete all the articles in the group
when you delete it, you can do so at your own discretion.


>In the past when we do not have tradspool storage API, we can
>renumber the group and the old articles can re-appear again.

If you want the old articles, I'm not sure why you're removing
the group in the first place.  Why not just make it invisible by
configuring readers.conf not to display it to users.


>So, it seems that the current solution is that we have to remove the
>files in a group after we rmgroup a tradspool group.  Any better
>approach?

I'm not sure exactly what your goals are.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: INN 2.3.3 tradspool problem
#62223
Author: ktso
Date: Thu, 05 Dec 2002 03:41
42 lines
2706 bytes
Jeffrey M. Vinocur <jeff@litech.org> wrote:
> In article <as6kcs$2r79$1@ijustice.itsc.cuhk.edu.hk>,
>  <ktso@cuRemov-mEhk.edu.hk> wrote:
>>
>>Nov 29 09:44:01 helium innd: SERVER cant store article: File exists
>>
>>It is not the only cause of problem.  If I create a tradspool group and
>>post a few messages in it and then remove the group, the problem will
>>arise when I post articles to it again.

> That's true.  If you want to delete all the articles in the group
> when you delete it, you can do so at your own discretion.


>>In the past when we do not have tradspool storage API, we can
>>renumber the group and the old articles can re-appear again.

> If you want the old articles, I'm not sure why you're removing
> the group in the first place.  Why not just make it invisible by
> configuring readers.conf not to display it to users.

It is mainly due to our mechanism of local newsgroups.  Some societies
in our school forgot to renew their newsgroups and so the groups were
removed after the expiry date.  Then, when they aware that, they apply
for the group again.  So, if they do that just a few days after the
removal, it is better if they can continue to view the old articles
again and they can continue use the current himark.

>>So, it seems that the current solution is that we have to remove the
>>files in a group after we rmgroup a tradspool group.  Any better
>>approach?

> I'm not sure exactly what your goals are.

Well, at least I hope that when I newgroup after rmgroup, I don't need
to take care of those old files that cause the problems.  Do you agree?


> -- 
> Jeffrey M. Vinocur
> jeff@litech.org
Re: INN 2.3.3 tradspool problem
#62224
Author: Jeffrey M. Vinocur
Date: Thu, 05 Dec 2002 03:55
41 lines
2554 bytes
In article <asmhtc$b77$1@ijustice.itsc.cuhk.edu.hk>,
 <ktso@cuRemov-mEhk.edu.hk> wrote:
>
>It is mainly due to our mechanism of local newsgroups.  Some societies
>in our school forgot to renew their newsgroups and so the groups were
>removed after the expiry date.  Then, when they aware that, they apply
>for the group again.  So, if they do that just a few days after the
>removal, it is better if they can continue to view the old articles
>again and they can continue use the current himark.

I suggest you not delete the groups at all.  Just put
"!group.to.remove" in readers.conf so it *looks* deleted and give
them a few weeks to notice.  


>> I'm not sure exactly what your goals are.
>
>Well, at least I hope that when I newgroup after rmgroup, I don't need
>to take care of those old files that cause the problems.  Do you agree?

Yes.  I see you have three options:

- if you want to make the group really go away, no articles, no
  hiwatermark, you should delete all of the articles when you
  rmgroup

- if you want to make the group appear to go away, but be able to
  restore it easily, just follow the above readers.conf
  suggestions (there's really no benefit to actually rmgrouping
  it in your situation)

- if you want the articles to go away, but the hiwatermark to
  stay, I guess you should combine the above suggestions:  delete
  all the articles, but don't rmgroup (just make invisible in
  readers.conf)


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: INN 2.3.3 tradspool problem
#62230
Author: ktso
Date: Thu, 05 Dec 2002 07:39
38 lines
2663 bytes
Thanks for your valuable opinion.

Jeffrey M. Vinocur <jeff@litech.org> wrote:
> In article <asmhtc$b77$1@ijustice.itsc.cuhk.edu.hk>,
>  <ktso@cuRemov-mEhk.edu.hk> wrote:

>>Well, at least I hope that when I newgroup after rmgroup, I don't need
>>to take care of those old files that cause the problems.  Do you agree?

> Yes.  I see you have three options:

> - if you want to make the group really go away, no articles, no
>   hiwatermark, you should delete all of the articles when you
>   rmgroup

I think so.  But should it be considered as a 'bug'?  I understand that it
shouldn't be a bug if we use timehash and cnfs.  So, rmgroup should not
remove anything in the newsgroup in general.  It is similar that
newgroup should not try to clean up anything.  This problem come with
tradspool currently.  Then, if it is really a problem, it seems that it
is better fixed in the storage API of tradspool instead of newgroup /
rmgroup mechanism.

> - if you want to make the group appear to go away, but be able to
>   restore it easily, just follow the above readers.conf
>   suggestions (there's really no benefit to actually rmgrouping
>   it in your situation)

> - if you want the articles to go away, but the hiwatermark to
>   stay, I guess you should combine the above suggestions:  delete
>   all the articles, but don't rmgroup (just make invisible in
>   readers.conf)


> -- 
> Jeffrey M. Vinocur
> jeff@litech.org
Re: INN 2.3.3 tradspool problem
#62243
Author: Russ Allbery
Date: Thu, 05 Dec 2002 16:42
21 lines
2118 bytes
ktso <ktso@cuRemov-mEhk.edu.hk> writes:

> I think so.  But should it be considered as a 'bug'?  I understand that
> it shouldn't be a bug if we use timehash and cnfs.  So, rmgroup should
> not remove anything in the newsgroup in general.  It is similar that
> newgroup should not try to clean up anything.  This problem come with
> tradspool currently.  Then, if it is really a problem, it seems that it
> is better fixed in the storage API of tradspool instead of newgroup /
> rmgroup mechanism.

I think the right thing for tradspool to do is to remove all the articles
in the group right away when the group is rmgrouped.  This is a bug in the
current implementation that I'm hoping to fix at some point; I'm not sure
when I'll get to it, 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.
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