Skip to content

Readers Behaviour on Connection issues #17

@ocacontrolroom

Description

@ocacontrolroom

Nats ConnectionClose. Default behavior? Ignore, Be cancelled nicelly?

from text-gui ocabox:

024-04-03 02:46:57,905 [WARNING] msg_reader: Consumer has gone, trying to recreate it on [PUSH]MsgJournalReader_1rOvPiJPQX [tic.journal.wk06.planner]
2024-04-03 02:46:57,906 [WARNING] msg_reader: Consumer has gone, trying to recreate it on [PUSH]MsgCallbackSubscriber_sxMmeUpxRX [tic.status.wk06.planner.status]
2024-04-03 02:49:24,480 [WARNING] msg_reader: Consumer has gone, trying to recreate it on [PUSH]MsgCallbackSubscriber_sxMmeUpxRX [tic.status.wk06.planner.status]
2024-04-03 05:06:08,792 [INFO] main_panel: Log file added at /home/observer/.oca/log_textui/wk06_textui.log
2024-04-03 05:06:10,971 [INFO] root: JetStream connected
2024-04-03 05:06:10,979 [INFO] communication_panel: Servers are connected.
2024-04-03 05:06:11,014 [INFO] messenger: Connected to NATS ['nats.oca.lan']:[4222]
2024-04-03 05:06:11,029 [INFO] comm_nats: Nats connected to nats.oca.lan:4222
2024-04-03 05:06:26,193 [INFO] cycle_time_data_clean: Data clean for telescope: wk06
2024-04-03 05:06:26,211 [INFO] cycle_time_data_clean: Data clean for telescope: zb08
2024-04-03 05:06:26,549 [INFO] cycle_time_data_clean: Data clean for telescope: jk15
2024-04-03 05:06:26,561 [INFO] cycle_time_train: Train all telescopes and all commands type
2024-04-03 05:06:27,800 [ERROR] task_manager: Task NATSASUB.telemetry.weather.davis failed: nats: connection closed
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/tasks.py", line 432, in wait_for
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/tasks.py", line 441, in wait_for
    await _cancel_and_wait(fut, loop=loop)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 518, in _cancel_and_wait
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/aio/subscription.py", line 189, in next_msg
    msg = await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/serverish/messenger/msg_callback_sub.py", line 64, in _task_body
    async for data, meta in self:
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/serverish/messenger/msg_reader.py", line 84, in __anext__
    data, meta = await self.read_next()
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/serverish/messenger/msg_reader.py", line 118, in read_next
    self.pull_batch = deque(await self.pull_subscription.fetch(batch=batch, timeout=timeout))
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/js/client.py", line 937, in fetch
    msg = await self._fetch_one(expires, timeout, heartbeat)
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/js/client.py", line 989, in _fetch_one
    msg = await self._sub.next_msg(timeout=deadline)
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/aio/subscription.py", line 196, in next_msg
    raise errors.ConnectionClosedError
nats.errors.ConnectionClosedError: nats: connection closed
2024-04-03 05:06:27,802 [ERROR] task_manager: Task NATSASUB.tic.status.wk06.planner.static failed: nats: connection closed
Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/tasks.py", line 432, in wait_for
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.10/asyncio/tasks.py", line 441, in wait_for
    await _cancel_and_wait(fut, loop=loop)
  File "/usr/lib/python3.10/asyncio/tasks.py", line 518, in _cancel_and_wait
    await waiter
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/aio/subscription.py", line 189, in next_msg
    msg = await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/serverish/messenger/msg_callback_sub.py", line 64, in _task_body
    async for data, meta in self:
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/serverish/messenger/msg_reader.py", line 84, in __anext__
    data, meta = await self.read_next()
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/serverish/messenger/msg_reader.py", line 118, in read_next
    self.pull_batch = deque(await self.pull_subscription.fetch(batch=batch, timeout=timeout))
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/js/client.py", line 937, in fetch
    msg = await self._fetch_one(expires, timeout, heartbeat)
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/js/client.py", line 989, in _fetch_one
    msg = await self._sub.next_msg(timeout=deadline)
  File "/home/observer/.cache/pypoetry/virtualenvs/ocabox-cli-W84GY2n7-py3.10/lib/python3.10/site-packages/nats/aio/subscription.py", line 196, in next_msg
    raise errors.ConnectionClosedError
nats.errors.ConnectionClosedError: nats: connection closed
2024-04-03 05:06:27,804 [ERROR] task_manager: Task NATSASUB.tic.status.wk06.planner.status failed: nats: connection closed

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