#6553 Fix taskd error logging

v1.0.1
closed
sf-1 (616)
General
Cory Johns
2015-08-20
2013-08-12
No

In [2b7892] and [dbffe3] I tried to fix up the taskd error logging. See those commits for details on previous changes.

After those changes, we're still getting incorrect logging. The first error here is a correct error, but the 2nd (broken pipe) shouldn't be here:

18:28:38,518 ERROR [taskd:allura.tasks.repo_tasks.refresh:52092952ea406b0d7dffdf99:allura.model.monq_model] Error "'ascii' codec can't encode characters in position 6-7: ordinal not in range(128)" on job <MonQTask 52092952ea406b0d7dffdf99 (busy) P:10 allura.tasks.repo_tasks.refresh sfs-alluradaemon-1.v29.ch3.sourceforge.com pid 1327 project:/p/acbr/ app:code user:*anonymous>
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/model/monq_model.py", line 256, in __call__
    self.result = func(*self.args, **self.kwargs)
  File "/var/local/allura/Allura/allura/tasks/repo_tasks.py", line 77, in refresh
    c.app.repo.refresh()
  File "/var/local/allura/Allura/allura/model/repository.py", line 514, in refresh
    refresh_repo(self, all_commits, notify, new_clone)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 146, in refresh_repo
    send_notifications(repo, commit_ids)
  File "/var/local/allura/Allura/allura/model/repo_refresh.py", line 426, in send_notifications
    summary)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 6-7: ordinal not in range(128)
18:28:38,524 ERROR [allura.command] taskd error [Errno 32] Broken pipe; pausing for 10s before taking more tasks
Traceback (most recent call last):
  File "/var/local/allura/Allura/allura/command/taskd.py", line 142, in worker
    list(wsgi_app(r.environ, start_response))
  File "/var/local/env-allura/lib/python2.7/site-packages/WebError-0.10.3_20130423-py2.7.egg/weberror/errormiddleware.py", line 255, in next
    exc_info, self.environ)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebError-0.10.3_20130423-py2.7.egg/weberror/errormiddleware.py", line 206, in exception_handler
    reporters=self.reporters)
  File "/var/local/env-allura/lib/python2.7/site-packages/WebError-0.10.3_20130423-py2.7.egg/weberror/errormiddleware.py", line 415, in handle_exception
    exc_data.exception_type, exc_data.exception_value))
IOError: [Errno 32] Broken pipe

Discussion

  • Dave Brondsema

    Dave Brondsema - 2013-08-12
    • status: in-progress --> code-review
     
  • Dave Brondsema

    Dave Brondsema - 2013-08-12

    db/6553

    To test, tail allura.log and try these 3 error conditions and make sure we get good output:

    • force an error in a task, and run the task - should get just one accurate error in the log
    • force an error on a webpage - should get error middleware still
    • force an error outside of a task but within the taskd process (e.g. type on MonQTask.__call__) and make sure that is logged properly (it should do "pausing for 10s before taking more tasks" as well)
     
  • Cory Johns

    Cory Johns - 2013-08-13
    • QA: Cory Johns
     
  • Cory Johns

    Cory Johns - 2013-08-13
    • status: code-review --> closed
     

Log in to post a comment.