hello,

I saw the bibsched monitor via

sudo -u apache /opt/invenio/bin/bibsched

I got the messages:

2012-04-12 15:30:48 --> 
Exception caught: 'task_id'
2012-04-12 15:30:48 --> 
Exception caught: 

the log in invenio.log

more  /opt/invenio/var/log/invenio.err
The following problem occurred on <http://inveniobak.ihep.ac.cn> (Invenio 1.0.0)
>> 2012-04-12 21:31:21 -> StandardError: BibTask with ERRORS:
    #5 bibrank -> ERROR
>>> User details
No client information available
>>> Traceback details
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/invenio/bibsched.py", line 980, in 
watch_loop
    calculate_rows()
  File "/usr/lib/python2.6/site-packages/invenio/bibsched.py", line 950, in 
calculate_rows
    raise StandardError('BibTask with ERRORS:\n%s' % "\n".join(errors))
StandardError: BibTask with ERRORS:
    #5 bibrank -> ERROR
Locals by frame, innermost last
>>>> Frame <module> in /opt/invenio/bin/bibsched at line 33
*******************************************************************************
        30     import sys
        31     sys.exit(1)
        32 
---->   33 main()
*******************************************************************************
                __revision__ =  "'$Id$'"
                __builtins__ =  "<module '__builtin__' (built-in)>"
                    __file__ =  "'/opt/<*****>/bin/bibsched'"
                 __package__ =  'None'
                    __name__ =  "'__main__'"
                        main =  '<function main at 0x23e4758>'
                     __doc__ =  "'BibSched - task management, scheduling and 
executing system for Invenio\\n'"
>>>> Frame main in /usr/lib/python2.6/site-packages/invenio/bibsched.py at line 
>>>> 1345
*******************************************************************************
      1342             'halt':    halt,
      1343             'stop': stop,
      1344             'restart': restart,
----> 1345             'monitor': monitor} [cmd] (verbose)
      1346     except KeyError:
      1347         usage(1, 'unkown command: %s' % cmd)
      1348 
*******************************************************************************
                      status =  'None'
        check_running_process_user =  '<function check_running_process_user at 
0x2931320>'
                       tasks =  'None'
                     verbose =  'True'
                        args =  "['start']"
                       since =  'None'
                         cmd =  "'start'"
                        opts =  '[]'
>>>> Frame start in /usr/lib/python2.6/site-packages/invenio/bibsched.py at 
>>>> line 1147
*******************************************************************************
      1144 
      1145     sched = BibSched()
      1146     try:
----> 1147         sched.watch_loop()
      1148     finally:
      1149         try:
      1150             os.remove(pidfile)
*******************************************************************************
                         pid =  '0'
                       sched =  '<<*****>.bibsched.BibSched instance at 
0x2929cb0>'
                     verbose =  'True'
>>>> Frame watch_loop in /usr/lib/python2.6/site-packages/invenio/bibsched.py 
>>>> at line 1001
*******************************************************************************
       998                     else:
       999                         time.sleep(CFG_BIBSCHED_REFRESHTIME)
      1000         except Exception, err:
----> 1001             register_exception(alert_admin=True)
      1002             try:
      1003                 register_emergency('Emergency from %s: BibSched 
halted: %s' % (CFG_SITE_URL, err))
      1004             except NotImplementedError:
*******************************************************************************
        calculate_task_status =  '<function calculate_task_status at 0x2931398>'
              calculate_rows =  '<function calculate_rows at 0x23ea9b0>'
                        self =  '<<*****>.bibsched.BibSched instance at 
0x2929cb0>'
                         err =  "StandardError('BibTask with ERRORS:\\n    #5 
bibrank -> ERROR',)"
>>>> Frame calculate_rows in 
>>>> /usr/lib/python2.6/site-packages/invenio/bibsched.py at line 950
*******************************************************************************
       947             if run_sql("SELECT count(id) FROM schTASK WHERE 
status='ERROR' OR status='DONE WITH ERRORS'")[0][0] > 0:
       948                 errors = run_sql("SELECT id,proc,status FROM schTASK 
WHERE status='ERROR' OR status='DONE WITH ERRORS'")
       949                 errors = ["    #%s %s -> %s" % row for row in errors]
---->  950                 raise StandardError('BibTask with ERRORS:\n%s' % 
"\n".join(errors))
       951             max_bibupload_priority = run_sql("SELECT max(priority) 
FROM schTASK WHERE status='WAITING' AND proc='bibupload' AND runtime<=NOW()")
       952             if max_bibupload_priority:
       953                 run_sql("UPDATE schTASK SET priority=%s WHERE 
status='WAITING' AND proc='bibupload' AND runtime<=NOW()", ( 
max_bibupload_priority[0][0], ))
*******************************************************************************
                        self =  '<<*****>.bibsched.BibSched instance at 
0x2929cb0>'
                      errors =  "['    #5 bibrank -> ERROR']"
                         row =  "(5L, 'bibrank', 'ERROR')"



It seems the bibtask 5(bibrank) is faild.  I do not know what the error mean. 
How to fix it?

Thanks a lot,

Regards,
Lanxin 

________________________________________
From: Samuele Kaplun
Sent: 12 April 2012 11:50
To: Lanxin Ma
Cc: project-invenio-general (Invenio users)
Subject: Re: my bibsched does not work

Dear Lanxin,

In data giovedì, 12 aprile 2012 11.37:45, Lanxin Ma ha scritto:
>   File "/usr/lib/python2.6/site-packages/invenio/bibsched.py", line 950, in
> calculate_rows raise StandardError('BibTask with ERRORS:\n%s' %
> "\n".join(errors)) StandardError: BibTask with ERRORS:
>     #5 bibrank -> ERROR

this means that the bibsched queue is interrupted because there's at least one
failed bibtask. You inspect the log of this bibtask by:

starting the bibsched monitor via:

$ sudo -u apache /opt/invenio/bin/bibsched

using the keyboard harrows to move to the failed task, and then press either
"l" (i.e., lower-case L) to see the standard output of the failed task, or "L"
(i.e. upper-case L) to see the standard error of the failed task.

These same logs will be available in:

/opt/invenio/var/lob/bibsched_task_5.log and bibsched_task_5.err (in the case
of this bibtask which had task_id 5).

Moreover if there was any exception not handled you can find it in
/opt/invenio/var/log/invenio.err

Best regards,
        Samuele


--
Samuele Kaplun
Invenio Developer ** <http://invenio-software.org/>

Reply via email to