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

[Support]: mqtt sometimes fails #9628

Closed
p-nightmare opened this issue Feb 3, 2024 · 4 comments
Closed

[Support]: mqtt sometimes fails #9628

p-nightmare opened this issue Feb 3, 2024 · 4 comments

Comments

@p-nightmare
Copy link

Describe the problem you are having

Sometimes on boot mqtt fails with the following log.
After several reboots it will run just fine

Version

0.13.1-34fb1c2

Frigate config file

mqtt:
  host: 192.168.86.13
  user: *
  password: *

Relevant log output

2024-02-03 11:29:28.183720955  [INFO] Preparing Frigate...
2024-02-03 11:29:30.429983288  [INFO] Starting Frigate...
2024-02-03 11:29:43.565715210  [2024-02-03 11:29:43] frigate.app                    INFO    : Starting Frigate (0.13.1-34fb1c2)
2024-02-03 11:29:43.668674989  [2024-02-03 11:29:43] frigate.config                 WARNING : Customizing more than a detector model path is unsupported.
2024-02-03 11:29:43.693848249  [2024-02-03 11:29:43] peewee_migrate.logs            INFO    : Starting migrations
2024-02-03 11:29:43.786091779  [2024-02-03 11:29:43] peewee_migrate.logs            INFO    : There is nothing to migrate
2024-02-03 11:29:44.077802695  [2024-02-03 11:29:44] frigate.app                    INFO    : Recording process started: 465
2024-02-03 11:29:44.082183481  [2024-02-03 11:29:44] frigate.app                    INFO    : go2rtc process pid: 89
2024-02-03 11:29:44.092318107  Exception in thread mqtt:
2024-02-03 11:29:44.092347726  Traceback (most recent call last):
2024-02-03 11:29:44.092350843    File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
2024-02-03 11:29:44.132000773      self.run()
2024-02-03 11:29:44.132008391    File "/usr/lib/python3.9/threading.py", line 892, in run
2024-02-03 11:29:44.132351154      self._target(*self._args, **self._kwargs)
2024-02-03 11:29:44.132356410    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3591, in _thread_main
2024-02-03 11:29:44.166476612      self.loop_forever(retry_first_connection=True)
2024-02-03 11:29:44.166483467    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1756, in loop_forever
2024-02-03 11:29:44.167015600      rc = self._loop(timeout)
2024-02-03 11:29:44.167020085    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1164, in _loop
2024-02-03 11:29:44.167335718      rc = self.loop_read()
2024-02-03 11:29:44.167339384    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 1556, in loop_read
2024-02-03 11:29:44.167728400      rc = self._packet_read()
2024-02-03 11:29:44.167732996    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 2439, in _packet_read
2024-02-03 11:29:44.168284999      rc = self._packet_handle()
2024-02-03 11:29:44.168305384    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3033, in _packet_handle
2024-02-03 11:29:44.169013241      return self._handle_publish()
2024-02-03 11:29:44.169016831    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3327, in _handle_publish
2024-02-03 11:29:44.169718804      self._handle_on_message(message)
2024-02-03 11:29:44.169722152    File "/usr/local/lib/python3.9/dist-packages/paho/mqtt/client.py", line 3556, in _handle_on_message
2024-02-03 11:29:44.170469665      callback(self, self._userdata, message)
2024-02-03 11:29:44.170472610    File "/opt/frigate/frigate/comms/mqtt.py", line 110, in on_mqtt_command
2024-02-03 11:29:44.177426729      self._dispatcher(
2024-02-03 11:29:44.177430972    File "/opt/frigate/frigate/comms/dispatcher.py", line 80, in _receive
2024-02-03 11:29:44.179490027      self._camera_settings_handlers[command](camera_name, payload)
2024-02-03 11:29:44.179512034    File "/opt/frigate/frigate/comms/dispatcher.py", line 281, in _on_recordings_command
2024-02-03 11:29:44.179681083      self.publish(f"{camera_name}/recordings/state", payload, retain=True)
2024-02-03 11:29:44.179685405    File "/opt/frigate/frigate/comms/dispatcher.py", line 111, in publish
2024-02-03 11:29:44.179791262      comm.publish(topic, payload, retain)
2024-02-03 11:29:44.179795488    File "/opt/frigate/frigate/comms/ws.py", line 102, in publish
2024-02-03 11:29:44.180243298      self.websocket_server.manager.broadcast(ws_message)
2024-02-03 11:29:44.180247725  AttributeError: 'WebSocketClient' object has no attribute 'websocket_server'
2024-02-03 11:29:44.244791022  [2024-02-03 11:29:44] frigate.app                    INFO    : Output process started: 476

FFprobe output from your camera

[{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"30/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":1440,"width":2560},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}},{"return_code":0,"stderr":"","stdout":{"programs":[],"streams":[{"avg_frame_rate":"20/1","codec_long_name":"H.264/AVC/MPEG-4AVC/MPEG-4part10","height":672,"width":896},{"avg_frame_rate":"0/0","codec_long_name":"AAC(AdvancedAudioCoding)"}]}}]

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

CPU (no coral)

Network connection

Wired

Camera make and model

Reolink

Any other information that may be helpful

No response

@NickM-27
Copy link
Sponsor Collaborator

NickM-27 commented Feb 3, 2024

What MQTT server are you using

@mfugate1
Copy link

mfugate1 commented Feb 3, 2024

Seeing the same issue after upgrading frigate to 0.13. I'm using eclipse-mosquitto:latest.

Other services that also use this mqtt service are not having any connectivity issues like this.

@p-nightmare
Copy link
Author

What MQTT server are you using

I'm using eclipse-mosquitto 2.0.18

Copy link

github-actions bot commented Mar 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Mar 7, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants