Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take care of unclean shutdown with Ctrl+C KeyboardInterrupt #3

Open
dspruell opened this issue Sep 5, 2018 · 0 comments
Open

Take care of unclean shutdown with Ctrl+C KeyboardInterrupt #3

dspruell opened this issue Sep 5, 2018 · 0 comments

Comments

@dspruell
Copy link
Contributor

dspruell commented Sep 5, 2018

Address busted shutdown at Ctrl-c/process termination.

^CTraceback (most recent call last):
  File "/Users/dspruell/bin/ampt-monitor", line 11, in <module>
Process Plugin[suricata_eve]:
Process Plugin[bro]:
    load_entry_point('ampt-monitor', 'console_scripts', 'ampt-monitor')()
  File "/Users/dspruell/devel/ampt-monitor/core/ampt_monitor/cli.py", line 100, in main
    ampt_monitor.run()
  File "/Users/dspruell/devel/ampt-monitor/core/ampt_monitor/amptmonitor.py", line 103, in run
evt = queue.get()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/queues.py", line 94, in get
res = self._recv_bytes()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/connection.py", line 216, in recv_bytes
    buf = self._recv_bytes(maxlength)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/connection.py", line 407, in _recv_bytes
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
    buf = self._recv(4)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/connection.py", line 379, in _recv
  File "/Users/dspruell/devel/ampt-monitor/plugins/suricata_eve/ampt_monitor_suricata_eve/plugin.py", line 39, in run
    for eve_log in self._tail_logfile(self.config['path']):
  File "/Users/dspruell/devel/ampt-monitor/plugins/suricata_eve/ampt_monitor_suricata_eve/plugin.py", line 89, in _tail
_logfile
    time.sleep(self.interval)
Traceback (most recent call last):
KeyboardInterrupt
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
    self.run()
  File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/process.py", line 99, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/dspruell/devel/ampt-monitor/plugins/bro/ampt_monitor_bro/plugin.py", line 41, in run
    for bro_log in self._tail_logfile(self.config['path']):
  File "/Users/dspruell/devel/ampt-monitor/plugins/bro/ampt_monitor_bro/plugin.py", line 91, in _tail_logfile
    sleep(self.interval)
KeyboardInterrupt
    chunk = read(handle, remaining)
KeyboardInterrupt

Possible resources:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant