Skip to content

Beaver restarts if a file is removed #410

@rohitkumars

Description

@rohitkumars

If a file is removed which beaver is watching, beaver gets an error and restarts the worker.

*[/home/tomcat-user/software/apache-tomcat-7.0.59/logs/localhost_access_log.2016-02-08.txt] - file removed
[2016-02-08 14:29:25,650] INFO Queue timeout of "60" seconds exceeded, stopping queue
Process Process-6:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib64/python2.7/multiprocessing/process.py", line 114, in run
self._target(_self._args, _self._kwargs)
File "/usr/lib/python2.7/dist-packages/beaver/dispatcher/tail.py", line 83, in create_queue_producer
manager.run()
File "/usr/lib/python2.7/dist-packages/beaver/worker/tail_manager.py", line 76, in run
self._tails[fid].run(once=True)
File "/usr/lib/python2.7/dist-packages/beaver/worker/tail.py", line 118, in run
self._ensure_file_is_good(current_time=current_time)
File "/usr/lib/python2.7/dist-packages/beaver/worker/tail.py", line 211, in _ensure_file_is_good
fid = self.get_file_id(st)
UnboundLocalError: local variable 'st' referenced before assignment
[2016-02-08 14:29:25,674] INFO Starting worker...
[2016-02-08 14:29:25,675] INFO Working...
[2016-02-08 14:29:25,680] INFO Starting queue consumer
[2016-02-08 14:29:26,687] INFO [/home/tomcat-user/software/logs/BOOKING.log.7] - watching logfile

Can anyone suggest me why is this happening?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions