CommunityHoneyNetwork / uhp

UHP installer using Ansible
0 stars 1 forks source link

v1.8-pre UHP image fails #12

Closed JesseBowling closed 5 years ago

JesseBowling commented 5 years ago

UHP fails after a while with:

uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1325, in warn
uhp_1  |     self.warning(msg, *args, **kwargs)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
uhp_1  |     self._log(WARNING, msg, args, **kwargs)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1444, in _log
uhp_1  |     self.handle(record)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1454, in handle
uhp_1  |     self.callHandlers(record)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1516, in callHandlers
uhp_1  |     hdlr.handle(record)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 865, in handle
uhp_1  |     self.emit(record)
uhp_1  |   File "/opt/uhp/uhp.py", line 463, in emit
uhp_1  |     self.publisher.publish(self.channel, msg)
uhp_1  |   File "/opt/uhp/hpfeeds.py", line 263, in publish
uhp_1  |     self.send(msgpublish(self.ident, c, data))
uhp_1  |   File "/opt/uhp/hpfeeds.py", line 116, in send
uhp_1  |     logger.warn("Socket error: %s", e)
JesseBowling commented 5 years ago

Also:

uhp_1  | During handling of the above exception, another exception occurred:
uhp_1  | 
uhp_1  | Traceback (most recent call last):
uhp_1  |   File "/opt/uhp/hpfeeds.py", line 111, in send
uhp_1  |     self.s.sendall(data)
uhp_1  | BrokenPipeError: [Errno 32] Broken pipe

and

uhp_1  |   File "/opt/uhp/uhp.py", line 463, in emit
uhp_1  |     self.publisher.publish(self.channel, msg)
uhp_1  |   File "/opt/uhp/hpfeeds.py", line 263, in publish
uhp_1  |     self.send(msgpublish(self.ident, c, data))
uhp_1  |   File "/opt/uhp/hpfeeds.py", line 116, in send
uhp_1  |     logger.warn("Socket error: %s", e)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1325, in warn
uhp_1  |     self.warning(msg, *args, **kwargs)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1320, in warning
uhp_1  |     self._log(WARNING, msg, args, **kwargs)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1443, in _log
uhp_1  |     exc_info, func, extra, sinfo)
uhp_1  |   File "/usr/lib/python3.6/logging/__init__.py", line 1413, in makeRecord
uhp_1  |     sinfo)
uhp_1  | RecursionError: maximum recursion depth exceeded while calling a Python object
amerck commented 5 years ago

This issue exists upstream in UHP. Because the logger defined in "uhp.py" uses the root logger, warning messages from hpfeeds.py are passed back through the root logger, causing an infinite recursive loop.

See https://github.com/MattCarothers/uhp/pull/3 for the fix.