Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

IOError for PID lockfile after ungraceful analyzer shutdown #31

Open
bflad opened this issue Jun 26, 2013 · 0 comments
Open

IOError for PID lockfile after ungraceful analyzer shutdown #31

bflad opened this issue Jun 26, 2013 · 0 comments

Comments

@bflad
Copy link
Contributor

bflad commented Jun 26, 2013

Prevents analyzer from starting without knowing to remove PID lockfile.

# analyzer crashes here and leaves lockfile still around
ls -l /var/run/skyline/analyzer.pid
-rw-r--r-- 1 skyline skyline 6 Jun 25 20:36 /var/run/skyline/analyzer.pid
service skyline-analyzer start
cat /var/log/skyline/analyzer.log

Traceback (most recent call last):
  File "../src/analyzer/analyzer-agent.py", line 53, in <module>
    daemon_runner.do_action()
  File "/usr/lib/python2.6/site-packages/daemon/runner.py", line 189, in do_action
    func(self)
  File "/usr/lib/python2.6/site-packages/daemon/runner.py", line 124, in _start
    self.daemon_context.open()
  File "/usr/lib/python2.6/site-packages/daemon/daemon.py", line 346, in open
    self.pidfile.__enter__()
  File "/usr/lib/python2.6/site-packages/lockfile/__init__.py", line 226, in __enter__
    self.acquire()
  File "/usr/lib/python2.6/site-packages/daemon/pidfile.py", line 42, in acquire
    super(TimeoutPIDLockFile, self).acquire(timeout, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/lockfile/pidlockfile.py", line 85, in acquire
    raise LockTimeout
lockfile.LockTimeout
close failed in file object destructor:
IOError: [Errno 9] Bad file descriptor

# remove PID file - init script is just calling ./analyzer.d stop here
# could also just rm -f /var/run/skyline/analyzer.pid
service skyline-analyzer stop
service skyline-analyzer start
# starts fine. :)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant