Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

RuntimeError Exception "threads can only be started once" #9

Closed

Description

@nielsonsantana

I created 2 handlers and two loggers using the logentries on my Django project.
When I start my celery worker, I geting RuntimeError "threads can only be started once".

I'm using:
django 1.5
celery 3.1.7

Track:

File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/worker/__init__.py", line 206, in start
  self.blueprint.start(self)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start
  step.start(parent)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/bootsteps.py", line 373, in start
  return self.obj.start()
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 270, in start
  blueprint.start(self)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/bootsteps.py", line 123, in start
  step.start(parent)
File "/home/user/.virtualenvs/celery3.1/local/lib/python2.7/site-packages/celery/worker/consumer.py", line 469, in start
  info('Connected to %s', c.connection.as_uri())
File "/usr/lib/python2.7/logging/__init__.py", line 1140, in info
  self._log(INFO, msg, args, **kwargs)
File "/usr/lib/python2.7/logging/__init__.py", line 1258, in _log
  self.handle(record)
File "/usr/lib/python2.7/logging/__init__.py", line 1268, in handle
  self.callHandlers(record)
File "/usr/lib/python2.7/logging/__init__.py", line 1308, in callHandlers
  hdlr.handle(record)
File "/usr/lib/python2.7/logging/__init__.py", line 748, in handle
  self.emit(record)
File "/home/user/Dropbox/workspace/paas/appfog/soar-site/logentries/utils.py", line 132, in emit
  self._thread.start()
File "/usr/lib/python2.7/threading.py", line 488, in start
  raise RuntimeError("threads can only be started once")
RuntimeError: threads can only be started once

Activity

  1. StephenHynes7 commented on Feb 24, 2015

    @StephenHynes7
    Contributor

    Should be fixed in the latest version. https://pypi.python.org/pypi/Logentries

  2. adambyrtek commented on Aug 6, 2015

    @adambyrtek

    I can reproduce this with Logentries 0.7 (using RQ workers not Celery).

  3. thenikso commented on Sep 17, 2015

    @thenikso

    we are having this same issue with Celery and Logentries==0.15

  4. nielsonsantana commented on Sep 24, 2015

    @nielsonsantana
    ContributorAuthor

    I think that one solution for this problem is copy the logentries source code to project. I did it.
    Other option repored by @ilonajulczuk is define a log internally in the project, based on logentries.

  5. lucasrcosta commented on Sep 28, 2015

    @lucasrcosta

    Same with celery workers and version 0.15.
    @StephenHynes7 can you reopen this?

  6. adambyrtek commented on Sep 28, 2015

    @adambyrtek

    Just in case somebody is interested, in the end we dropped this library completely and went with syslog-based approach.

  7. sivabudh commented on Apr 3, 2016

    @sivabudh

    I'm also running into the same issue. Too bad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions