Tags:
create new tag
, view all tags

Question

I have an error while running ./statistics from the twiki/bin directory.

TWiki: Create Usage Statistics
!Do not interrupt this script!
(Please wait until page download has finished)
* Statistics for Jul 2006
* Reporting on TWiki.ABATBEA web
  - view: 27, save: 0, upload: 0
  - top view:  27 WebHome
  - Topic WebStatistics updated
* Reporting on TWiki.ACPP web
  - view: 9, save: 0, upload: 0
  - top view:   5 OtherLinks
  - Topic WebStatistics updated
* Reporting on TWiki.ADCgroup web
  - view: 22, save: 0, upload: 0
  - top view:   3 WebHome
[Tue Jul 11 11:42:10 2006] statistics: Automatic recovery: breaking lock
 for /www_doc/twiki/data/ADCgroup/WebStatistics.txt at 
/twiki/production/4.0.4/lib/TWiki/Store/RcsWrap.pm line 455.

Content-type: text/plain

RCS: /usr/bin/rcs  -l %FILENAME|F% failed:  at /twiki/production/4.0.4/lib/TWiki/Store/RcsWrap.pm line 464.
TWiki detected an internal error - please check your TWiki logs and webserver logs for more information.

RCS: path  -l %FILENAME|F% failed: 

The warn.log has entries

RCS: /usr/bin/rcs  -l %FILENAME|F% failed:  at /twiki/production/4.0.4/lib/TWiki/Store/RcsWrap.pm line 464

Strangly enough of the 20 odd webs that we have, 4 do get updated. All directories have the same privileges.

I did a rcs -u -M on all webs

Why would this fail for some webs and work for others?

Environment

TWiki version: TWikiRelease04x00x04
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RH Linux
Web server: apache 1.3
Perl version: 5.008
Client OS: Windows, Linux
Web Browser: IE, mozilla, safari
Categories: Statistics

-- PeterJones - 11 Jul 2006

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

That "Automatic recovery" rings a bell... IIRC I've introduced that to try to correct a case where a topic is inflichted with a Cairo-style lock (Bugs:Item2012). The recovery tries to run rcs -u -M, like you did.

Sometimes automatic recovery fails. Two possible reasons I can think of:

  • If someone ran the statistics script from the command line, then the automatic recovery (running under the web server's user) might not have sufficient access rights to unlock the file.
  • If, for whatever reason, you have a broken entry for $TWiki::cfg{RCS}{breaklockCmd} in your LocalSite.cfg, then the automatic recovery fails. I've seen cases where the upgrade script left bogus configuration for the RCS commands - on Linux no local configuration should be required at all.

Anyway - you should try to get rid of the offending .lock files manually.

-- HaraldJoerg - 11 Jul 2006

I dont see any *.lock files under the data directory. However I do see files like ,WebStatistics.txt, (note the leading and trailing commas. This file does not exist in the directories where the stats where successfully updated, so I guess that here is the problem. Can you spread some light on where this file comes from , thanks.

> ls -al ABATBEA/*WebSt*
-rw-r--r--    1 swtool   dj           1161 Jul 12 00:00 ABATBEA/WebStatistics.txt
-r--r--r--    1 twiki    c3          10176 Jul 12 00:00 ABATBEA/WebStatistics.txt,v
 > ls -al Sandbox/*WebSt*
-rw-rw-rw-    1 swtool   root        24576 May 12 16:15 Sandbox/,WebStatistics.txt,
-rw-rw-rw-    1 swtool   dj           2951 Jul  4 00:00 Sandbox/WebStatistics.txt
-rw-rw-rw-    1 swtool   root         6418 Jun 15 11:28 Sandbox/WebStatistics.txt,v

-- PeterJones - 12 Jul 2006

the ,somethig, files are temporary files of RCS. They appear if an RCS command is interrupted. Simply removing the files should fix the problem.

-- PeterThoeny - 16 Aug 2006

 
Topic revision: r4 - 2006-08-16 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.