Closed SeaDude closed 2 years ago
forgive me if I'm way off the mark here as I'm new to this stuff but my thoughts
The docker-compose command. As you aren't running -d it will just stay until to exit out of it. Try docker-compose up -d
The container port you are exposing is 8080. Frigate runs on 5000 internally
The MQTT setting in the config file is the localhost for the frigate container. Were the containers attached to the host network that would be fine as that would be the host machine but as you are creating both frigate and mqtt in the same docker-compose file a new bridge network is created and both frigate and mqtt will have differing IP addresses on that network. Use the mqtt container name (so mqtt) as the host in the MQTT section of your config.yml file and that way it will be resolved to whatever the ip address of the mqtt container is
Of course this could all be rubbish. I'm only on page 2 of the book
The container port you are exposing is 8080. Frigate runs on 5000 internally
The MQTT setting in the config file is the localhost for the frigate container. Were the containers attached to the host network that would be fine as that would be the host machine but as you are creating both frigate and mqtt in the same docker-compose file a new bridge network is created and both frigate and mqtt will have differing IP addresses on that network. Use the mqtt container name (so mqtt) as the host in the MQTT section of your config.yml file and that way it will be resolved to whatever the ip address of the mqtt container is
Yep, both of these are correct. 127.0.0.1 is localhost so mqtt config section needs to be adjusted. Also port 5000 needs to be exposed.
Thank you both for the guidance.
Changed:
mqtt:
host: mqtt
ports:
- "5000:5000"
Ran docker-compose up -d
. Result:
user@system:~/Documents/frigate$ docker-compose up -d
[+] Running 2/2
⠿ Container mqtt Started 0.3s
⠿ Container frigate Running 0.0s
It appears to be running now, but How do I access Frigate?
It appears to be running now, but How do I access Frigate?
You can go to http://localhost:5000
on your computer running it. Or http://computer ip:5000
on other devices
Running docker ps
returns:
user@system:~/Documents/frigate$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3d44e8161a90 blakeblackshear/frigate:stable-amd64nvidia "/init /bin/sh -c 'w…" 3 minutes ago Up 3 minutes 1935/tcp, 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp frigate
0e7fa5b29b67 eclipse-mosquitto:1.6 "/docker-entrypoint.…" 13 hours ago Up 2 minutes 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp mqtt
Going to 0.0.0.0:5000
shows a Frigate logo with a loading image and the server running at full steam (had to run docker-compose down
just to finish writing this post!)
You are still using the docker-compose from the repo, which is meant for development purposes. It should not be used for running frigate. Please read the installation docs.
I'm no longer trying to run docker-compose
from within the cloned repo (that was an early mistake on my part). I've deleted the repo locally. This is a fresh docker-compose.yml
file.
version: "3"
services:
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: blakeblackshear/frigate:stable-amd64nvidia
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
shm_size: "64mb"
volumes:
- /etc/localtime:/etc/localtime:ro
- /home/user/Documents/frigate/config.yml:/config/config.yml
- /home/user/Documents/frigate:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
mqtt:
container_name: mqtt
image: eclipse-mosquitto:1.6
ports:
- "1883:1883"
Oh trust me, I've been reading the docs! I'm also documenting the things, outside the docs I've had to do to get Frigate this far. I plan on PR'ing some additions to docs
once I actually get Frigate running and into a reproducable build on my system.
If you're referring to this section of the install docs, my docker-compose
file is now right in line with the example with the addition of the NVIDIA driver and nvidia-docker
section` and the mqtt
.
If you run it now what happens? Should be accessible on the frontend with this compose setup
user@system:~/Documents/frigate$ docker-compose up -d
[+] Running 3/3
⠿ Network frigate_default Created 0.0s
⠿ Container mqtt Started 0.5s
⠿ Container frigate Started 0.5s
Where server fans blowing crazy until I run docker-compose down
.
This server should be able to handle firefox
and frigate
no problem.
user@system:~/Documents/frigate$ sudo lshw -short
H/W path Device Class Description
=======================================================
system G750JZA (ASUS-NotebookSKU)
/0 bus G750JZA
/0/0 memory 64KiB BIOS
/0/8 processor Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz
/0/8/9 memory 1MiB L2 cache
/0/8/a memory 256KiB L1 cache
/0/8/b memory 6MiB L3 cache
/0/c memory 24GiB System Memory
/0/c/0 memory DIMM [empty]
/0/c/1 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/c/2 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/c/3 memory 8GiB SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
/0/100 bridge Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller
/0/100/1 bridge Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller
/0/100/1/0 display GK104M [GeForce GTX 880M]
/0/100/2 display 4th Gen Core Processor Integrated Graphics Controller
/0/100/3 multimedia Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
/0/100/14 bus 8 Series/C220 Series Chipset Family USB xHCI
/0/100/14/0 usb3 bus xHCI Host Controller
/0/100/14/0/5 communication AR3012 Bluetooth 4.0
/0/100/14/0/7 multimedia USB2.0 HD UVC WebCam
/0/100/14/1 usb4 bus xHCI Host Controller
/0/100/16 communication 8 Series/C220 Series Chipset Family MEI Controller #1
/0/100/1a bus 8 Series/C220 Series Chipset Family USB EHCI #2
/0/100/1a/1 usb1 bus EHCI Host Controller
/0/100/1a/1/1 bus Integrated Rate Matching Hub
/0/100/1b multimedia 8 Series/C220 Series Chipset High Definition Audio Controller
/0/100/1c bridge 8 Series/C220 Series Chipset Family PCI Express Root Port #1
/0/100/1c.2 bridge 8 Series/C220 Series Chipset Family PCI Express Root Port #3
/0/100/1c.2/0 wlp3s0 network AR9462 Wireless Network Adapter
/0/100/1c.3 bridge 8 Series/C220 Series Chipset Family PCI Express Root Port #4
/0/100/1c.3/0 enp4s0 network QCA8171 Gigabit Ethernet
/0/100/1c.4 bridge 8 Series/C220 Series Chipset Family PCI Express Root Port #5
/0/100/1d bus 8 Series/C220 Series Chipset Family USB EHCI #1
/0/100/1d/1 usb2 bus EHCI Host Controller
/0/100/1d/1/1 bus Integrated Rate Matching Hub
/0/100/1f bridge HM87 Express LPC Controller
/0/100/1f.2 scsi0 storage 82801 Mobile SATA Controller [RAID mode]
/0/100/1f.2/0 /dev/sda disk 120GB CT120BX500SSD1
/0/100/1f.2/0/1 volume 511MiB Windows FAT volume
/0/100/1f.2/0/2 /dev/sda2 volume 488MiB EFI partition
/0/100/1f.2/0/3 /dev/sda3 volume 110GiB EFI partition
/0/100/1f.2/1 /dev/cdrom disk BD-MLT UJ260AF
/0/100/1f.3 bus 8 Series/C220 Series Chipset Family SMBus Controller
/0/1 system PnP device PNP0c01
/0/2 system PnP device PNP0c02
/0/3 system PnP device PNP0b00
/0/4 generic PnP device INT3f0d
/0/5 system PnP device PNP0c02
/0/6 system PnP device PNP0c02
/0/7 generic PnP device ETD010d
/0/9 generic PnP device ATK3001
/0/a system PnP device PNP0c02
/0/b system PnP device PNP0c02
/1 docker0 network Ethernet interface
What do the logs say?
I don't know how to find them https://docs.frigate.video/search?q=logs
docker logs frigate
Thank you. Here is what I see:
user@system:~/Documents/frigate$ docker logs frigate
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Looks like it's starting and then stopping immediately. This is what my logs look like for my development environment, so it makes me think that you may still be running from the wrong compose file.
I can ping the camera:
user@system:~/Documents/frigate$ ping 192.168.0.23
PING 192.168.0.23 (192.168.0.23) 56(84) bytes of data.
64 bytes from 192.168.0.23: icmp_seq=1 ttl=64 time=0.580 ms
64 bytes from 192.168.0.23: icmp_seq=2 ttl=64 time=0.449 ms
64 bytes from 192.168.0.23: icmp_seq=3 ttl=64 time=0.445 ms
64 bytes from 192.168.0.23: icmp_seq=4 ttl=64 time=0.284 ms
64 bytes from 192.168.0.23: icmp_seq=5 ttl=64 time=2.11 ms
64 bytes from 192.168.0.23: icmp_seq=6 ttl=64 time=2.33 ms
64 bytes from 192.168.0.23: icmp_seq=7 ttl=64 time=2.71 ms
64 bytes from 192.168.0.23: icmp_seq=8 ttl=64 time=0.307 ms
64 bytes from 192.168.0.23: icmp_seq=9 ttl=64 time=0.321 ms
64 bytes from 192.168.0.23: icmp_seq=10 ttl=64 time=0.500 ms
64 bytes from 192.168.0.23: icmp_seq=11 ttl=64 time=0.477 ms
64 bytes from 192.168.0.23: icmp_seq=12 ttl=64 time=0.317 ms
^C
--- 192.168.0.23 ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 11200ms
rtt min/avg/max/mdev = 0.284/0.902/2.714/0.868 ms
I changed the frigate.yml
file ffmpeg
to the correct IP address of the cam - path: rtsp://192.168.0.23:554/s1
.
I am looking at the camera in VLC player using this same rtsp path.
... you may still be running from the wrong compose file.
hm... I deleted the frigate
repo from the server, created a new directory (frigate
), created new docker-compose.yml
and frigate.yml
files.
To run, I cd
into the /home/user/Documents/frigate
directory and run docker-compose up -d
. Here is the file again. I can't quite see how its the wrong file
version: "3"
services:
frigate:
container_name: frigate
privileged: true
restart: unless-stopped
image: blakeblackshear/frigate:stable-amd64nvidia
runtime: nvidia
environment:
- NVIDIA_VISIBLE_DEVICES=all
- NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
shm_size: "64mb"
volumes:
- /etc/localtime:/etc/localtime:ro
- /home/user/Documents/frigate/config.yml:/config/config.yml
- /home/user/Documents/frigate:/media/frigate
- type: tmpfs
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "5000:5000"
command: /bin/sh -c "while sleep 1000; do :; done"
mqtt:
container_name: mqtt
image: eclipse-mosquitto:1.6
ports:
- "1883:1883"
You are still using parts of the development compose file. At the very least, you need to remove the following line that prevents Frigate from running:
command: /bin/sh -c "while sleep 1000; do :; done"
Also, compare the rest of the compose file to the example in the docs.
Thank you for spotting that (I could have swore I removed that line after I diffed the example in the docs with my own file). Its gone now. I also removed all docker images and redownloaded them all.
user@system:~/Documents/frigate$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
user@system:~/Documents/frigate$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nvidia/cuda 11.0.3-base-ubuntu20.04 d134f267bb7a 6 weeks ago 122MB
eclipse-mosquitto 1.6 af43c2bdc1a9 3 months ago 11.5MB
blakeblackshear/frigate stable-amd64nvidia 4eca88ada0c6 3 months ago 3.19GB
user@system:~/Documents/frigate$ docker rmi d134f267bb7a
Untagged: nvidia/cuda:11.0.3-base-ubuntu20.04
Untagged: nvidia/cuda@sha256:1db9418b1c9070cdcbd2d0d9980b52bd5cd20216265405fdb7e089c7ff96a494
Deleted: sha256:d134f267bb7a8515e0779de48019658f129eea2b2ae6b8de9dd2f6bc7fd915d9
Deleted: sha256:e5673bce2425792f880ad88595a6aeb995a928c3c9cb1d3a1cf2f1811b577ab2
Deleted: sha256:181727e056efe031dc0a0e172f6c9c2ebce5b16e903aa03b58ac70f42b85b354
Deleted: sha256:a63aded0fcd01af7a88464376f06362ee2733334b422245d832aa5e4ea41b4f0
Deleted: sha256:33589e214433a36fff41f4fa8cad52cefe23757b3cde0f072723a09194a64cf3
Deleted: sha256:bf8cedc62fb3ef98ad0dff2be56ca451dd3ea69abd0031ad3e0fe5d9f9e4dfff
user@system:~/Documents/frigate$ docker rmi af43c2bdc1a9
Untagged: eclipse-mosquitto:1.6
Untagged: eclipse-mosquitto@sha256:9244133e01a0d44177918c08794fc7ece53d5de9a218f3bdf4d1ef3e926f8a74
Deleted: sha256:af43c2bdc1a9324602b561241d298f7a6341552f4aa56e9eed14919096d62e92
Deleted: sha256:1335b11aaabf022f0d44581ce54d36b7e39b650d3d641d74e451312cd6c20b72
Deleted: sha256:eb353f0f8a0bde0f757ea89b7988c3a64431007459681e870001f75d19651a9f
Deleted: sha256:b541d28bf3b491aeb424c61353c8c92476ecc2cd603a6c09ee5c2708f1a4b258
user@system:~/Documents/frigate$ docker rmi 4eca88ada0c6
Untagged: blakeblackshear/frigate:stable-amd64nvidia
Untagged: blakeblackshear/frigate@sha256:d91dc45bbc8d80f270430668a2a8983f5b22e203c3994545c68964b7b9f8dc8c
Deleted: sha256:4eca88ada0c64820f5f96f475bd228289e252294b058f8251e4bfeeaa30b7c4e
Deleted: sha256:6a2de3f228d769bf040c4bc4c7b8efd6dabcda2d45dbe9f9e4ccb0ca88279f82
Deleted: sha256:b66e1b7f130c5f52c670071efdb0cb3a228f90b364488054e4d6c78f70056b97
Deleted: sha256:cca96cdf79a16105228749c2c81aa52b8383089faed6b884a06f271ea26a70b8
Deleted: sha256:f3fc621f50942381d97f567db21891c13b2696b6e9b3a5e7e4dab0f45701a2fe
Deleted: sha256:e441e6de9c3aa9aea2f5e44c5c72845064601fa8a4c1b7fba11aa6943b608794
Deleted: sha256:fc6d358338e493576bb7ad1a819c6d19fcd493a9a13d94f54f9b20d185d62e5b
Deleted: sha256:6bd2e1c49c004029bc05f5d278c1e125f0aac9d90b5da822f35e4bad1a4e046a
Deleted: sha256:c9ba0454a4a635c28d350ff657eaa5098b5dae6793ef6e188f22a2f437bb31a1
Deleted: sha256:cc334b2e02c3d56da5f4186709a97b7bb9829d480eaefb9be7a7a4c40925f530
Deleted: sha256:2ed8706b6c34e95f24528e440e9b8f36544ee3b6c7ecc1a3d8f1a81e652771ef
Deleted: sha256:1f305662b86f5217a19f38bcf6e964b96be74f86f1ed45ff09b8d615912f3644
Deleted: sha256:353a0012a0920ae4216df43aa411910c243561ba93f2e36d5a0127e991ac5669
Deleted: sha256:ad6f116a964362872d5ad03f668a883be7a624fef57dbdc60e3c3a5a6c7a5edd
Deleted: sha256:72c557cc71d722939b48dc08617fddc6412b2592b64d42ede00224e26487d801
Deleted: sha256:2d7c190ef5888cc22049c42bc3e1e8b7115f1ee9163679e1eafb1e2efc288a18
Deleted: sha256:d0a54fa4c510273807d94b7b9546e7ec36529de4b1132f52d46308bf93945e52
Deleted: sha256:1f013c974ae4db0c218e43e2ba276058531da446441f5f9a5203ef18558afc37
Deleted: sha256:de950ff31c8379cb6c8f878bdc8ff82b5bfebc3f1f75ce03e28074323e517bbd
Deleted: sha256:e222fbc4c0fe25a7af9f92b546b6a8706e81f2bd71661c18dac97ab678db37db
Deleted: sha256:36ffdceb4c77bf34325fb695e64ea447f688797f2f1e3af224c29593310578d2
user@system:~/Documents/frigate$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
user@system:~/Documents/frigate$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
user@system:~/Documents/frigate$ docker-compose up -d
[+] Running 25/25
⠿ mqtt Pulled 21.4s
⠿ 8663204ce13b Pull complete 18.4s
⠿ 671fe99f8ed7 Pull complete 18.5s
⠿ 572af2cb81df Pull complete 19.0s
⠿ frigate Pulled 115.7s
⠿ 08c01a0ec47e Pull complete 3.0s
⠿ acc37b4ec4a7 Pull complete 107.6s
⠿ d6aed38b8d1b Pull complete 108.3s
⠿ b51f774c60a0 Pull complete 112.4s
⠿ 8e92dc1678f9 Pull complete 112.7s
⠿ d09b2bd3fe65 Pull complete 112.9s
⠿ 507acfa9cbdc Pull complete 112.9s
⠿ c36329bdbe96 Pull complete 113.0s
⠿ 20caa829d993 Pull complete 113.0s
⠿ 44f0e533ab46 Pull complete 113.1s
⠿ 9c7d4170678e Pull complete 113.1s
⠿ 8e6533f5208f Pull complete 113.2s
⠿ da01baa6292f Pull complete 113.2s
⠿ 47f94cbb2a65 Pull complete 113.3s
⠿ 66005528b83b Pull complete 113.4s
⠿ cae9f4f1c0bc Pull complete 113.4s
⠿ 53b4a036156d Pull complete 113.6s
⠿ 881612806424 Pull complete 113.7s
⠿ ab1cd8671f40 Pull complete 113.7s
⠿ 557af406f2f4 Pull complete 113.9s
[+] Running 3/3
⠿ Network frigate_default Created 0.0s
⠿ Container frigate Started 5.2s
⠿ Container mqtt Started 5.2s
user@system:~/Documents/frigate$ docker logs frigate
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
user@system:~/Documents/frigate$ docker-compose down
[+] Running 3/3
⠿ Container mqtt Removed 0.3s
⠿ Container frigate Removed 3.7s
⠿ Network frigate_default Removed 0.1s
Here's some questions that may be relevant:
docker-compose
or will it be created by default?path/to/storage
need to be a DEVICE or just a DIRECTORY?Your logs now look correct. Does the UI now load?
Thank you for the assistance today, all of you.
The UI is still not loading, but now, thanks to your docker logs frigate
command, I can now see the Python error logs to point me to the actual config that needs addressing.
The last issue I addressed was having the wrong config file name. I had frigate.yml
but I listed config.yml
in the docker-compose.yml
.
I got the name frigate.yml
naming convention from this place in the docs:
Once I get the camera working in Frigate, I will submit some doc
PR's and see if they work for the project.
Thanks again!
Describe the problem you are having
Spend the day setting up a bare metal Debian 11 server to use for Frigate. I think I've got the server all setup but running
docker-compose up
results the following messages, but just hangs untilCTRL + C
to close it.Can you see what the issue is?
Version
NA
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
Debian
Install method
Docker Compose
Coral version
CPU (no coral)
Network connection
Wired
Camera make and model
UniFi G3 Flex
Any other information that may be helpful
docker-compose file: