blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
18.88k stars 1.72k forks source link

[Support]: MQTT Connection Times Out #2077

Closed Booozie-Z closed 2 years ago

Booozie-Z commented 3 years ago

Describe the problem you are having

New Frigate installation hangs on starting the docker-compose file.

From what I could search and play with, the issue seems to be spawning from the MQTT server running locally.

MQTT Server is running and I can publish messages to it locally or remotely. Homeassistant is looking at localhost:1883 If I use 127.0.0.1 in the frigate config, I will get Connection Refused instead of a timeout.

image

Version

v2.1.0

Frigate config file

mqtt:
  host: 192.168.0.215 # 127.0.0.1
  port: 1883
  user: userName
  password: passWord
  topic_prefix: frigate
  client_id: frigate
  stats_interval: 60

detectors:
  coral:
    type: edgetpu
    device: pci:03:00.0

cameras:
  camera_1:
    ffmpeg:
      inputs:
        - path: rtsp://192.168.0.2:8554/unicast
          roles:
            - detect
            - rtmp
    detect:
      width: 640
      height: 360
      fps: 15

Relevant log output

% docker-compose up                                                                                                                                                                                                                                                                                                  !1080
Starting frigate ... done
Attaching to frigate
frigate    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
frigate    | [s6-init] ensuring user provided files have correct perms...exited 0.
frigate    | [fix-attrs.d] applying ownership & permissions fixes...
frigate    | [fix-attrs.d] done.
frigate    | [cont-init.d] executing container initialization scripts...
frigate    | [cont-init.d] done.
frigate    | [services.d] starting services
frigate    | [services.d] done.
frigate    | [2021-10-22 01:00:35] frigate.app                    INFO    : Starting Frigate (0.9.2-25bb515)
frigate    | Starting migrations
frigate    | [2021-10-22 01:00:35] peewee_migrate                 INFO    : Starting migrations
frigate    | There is nothing to migrate
frigate    | [2021-10-22 01:00:35] peewee_migrate                 INFO    : There is nothing to migrate
frigate    | timed out
frigate    | [cmd] python3 exited 1
frigate    | [cont-finish.d] executing container finish scripts...
frigate    | [cont-finish.d] done.
frigate    | [s6-finish] waiting for services.
frigate    | [s6-finish] sending all processes the TERM signal.
frigate    | [s6-finish] sending all processes the KILL signal and exiting.
-------------------------------- Below using 127.0.0.1 as broker -------------------------
  % docker-compose up                                                                                                                                                                                                                                                                                                  !1095
Starting frigate ... done
Attaching to frigate
frigate    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
frigate    | [s6-init] ensuring user provided files have correct perms...exited 0.
frigate    | [fix-attrs.d] applying ownership & permissions fixes...
frigate    | [fix-attrs.d] done.
frigate    | [cont-init.d] executing container initialization scripts...
frigate    | [cont-init.d] done.
frigate    | [services.d] starting services
frigate    | [services.d] done.
frigate    | [2021-10-22 01:09:10] frigate.app                    INFO    : Starting Frigate (0.9.2-25bb515)
frigate    | Starting migrations
frigate    | [2021-10-22 01:09:10] peewee_migrate                 INFO    : Starting migrations
frigate    | There is nothing to migrate
frigate    | [2021-10-22 01:09:10] peewee_migrate                 INFO    : There is nothing to migrate
frigate    | [Errno 111] Connection refused
frigate    | [cmd] python3 exited 1
frigate    | [cont-finish.d] executing container finish scripts...
frigate    | [cont-finish.d] done.
frigate    | [s6-finish] waiting for services.
frigate    | [s6-finish] sending all processes the TERM signal.
frigate    | [s6-finish] sending all processes the KILL signal and exiting.

FFprobe output from your camera

% ffprobe rtsp://192.168.0.2:8554/unicast                                                                                                                                                                                                                                                                            !1081
ffprobe version 4.2.4-1ubuntu0.1 Copyright (c) 2007-2020 the FFmpeg developers
  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
  configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  WARNING: library configuration mismatch
  avcodec     configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared --enable-version3 --disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract --enable-libvo_amrwbenc
  libavutil      56. 31.100 / 56. 31.100
  libavcodec     58. 54.100 / 58. 54.100
  libavformat    58. 29.100 / 58. 29.100
  libavdevice    58.  8.100 / 58.  8.100
  libavfilter     7. 57.100 /  7. 57.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  5.100 /  5.  5.100
  libswresample   3.  5.100 /  3.  5.100
  libpostproc    55.  5.100 / 55.  5.100
[mp3float @ 0x55b3a11ddec0] Header missing
Input #0, rtsp, from 'rtsp://192.168.0.2:8554/unicast':
  Metadata:
    title           : LIVE555 Streaming Media v2020.05.15
    comment         : LIVE555 Streaming Media v2020.05.15
  Duration: N/A, start: -0.182411, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(progressive), 640x360, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1: Audio: mp3, 44100 Hz, mono, fltp, 64 kb/s

Frigate stats

No response

Operating system

Debian

Install method

Docker Compose

Coral version

PCIe

Network connection

Wired

Camera make and model

WYZE Cam V2 (Dafang Mod)

Any other information that may be helpful

No response

blakeblackshear commented 3 years ago

Is frigate running on a separate machine from home assistant?

Booozie-Z commented 3 years ago

Same machine as Home assistant

blakeblackshear commented 3 years ago

It's behaving like the port isn't open on that IP.

stale[bot] commented 2 years ago

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.