[Config Support]: Frigate Nginx not starting - nginx: [emerg] no "events" section in configuration #14349
-
Describe the problem you are havingHi, I added some motion masks to a camera and restarted Frigate. The UI did not come back and checking the logs shows that Nginx is not starting due to an error:
Nginx continues to restart and log this error. It seems like the rest of frigate is running. Version0.14.1-f4f3cfa Frigate config filedatabase:
path: /media/frigate/database/frigate.db
mqtt:
host: mqtt.redact.redact.com
user: redact
password: redact
record:
enabled: true
retain:
days: 60
mode: motion
events:
retain:
default: 90
mode: active_objects
# logger:
# default: info
# logs:
# frigate.ptz.onvif: debug
# Use OpenVINO detector instead of default CPU
detectors:
ov:
type: openvino
device: AUTO
model:
path: /openvino-model/ssdlite_mobilenet_v2.xml
model:
width: 300
height: 300
input_tensor: nhwc
input_pixel_format: bgr
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
# Use go2rtc for live previews. This gives better frame rate and fixes the black screen issue.
go2rtc:
streams:
front_garage:
- ffmpeg:rtsp://10.3.8.1:554/s0
- ffmpeg:front_garage#audio=opus
front_garage_small:
- rtsp://10.3.8.1:554/s2
front_ptz:
- ffmpeg:rtsp://redact:[email protected]:554/Streaming/channels/101
- ffmpeg:front_ptz#audio=opus
front_ptz_small:
- rtsp://redact:[email protected]:554//Streaming/channels/102
rear_garden:
- ffmpeg:rtsp://10.3.8.3:554/s0
- ffmpeg:front_garage#audio=opus
rear_garden_small:
- rtsp://10.3.8.3:554/s2
birdseye:
enabled: true
mode: continuous
ffmpeg:
#hwaccel_args: preset-intel-qsv-h264
hwaccel_args: preset-vaapi
cameras:
front_garage:
ffmpeg:
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps
1 -strftime 1 -c:v copy -ar 44100 -c:a aac
inputs:
# Stream from the go2rtc input stream instead of opening a second connection to camera.
- path: rtsp://127.0.0.1:8554/front_garage
roles:
- record
- path: rtsp://127.0.0.1:8554/front_garage_small
# Use smaller resolution stream for detection and thumbnails.
roles:
- detect
objects:
track:
- person
- dog
- cat
- bicycle
- bird
detect:
width: 1024
height: 576
motion:
mask:
# Hedge
- 0.159,1,0.125,0.61,0,0.495,0,1
- 0.155,0,0.156,0.042,0.1,0.036,0.099,0.076,0,0.076,0,0
- 0.91,0.036,0.93,0,0.762,0,0.665,0,0.685,0.036
zones:
driveway: # Driveway
coordinates: 0.671,0.429,1,0.657,1,1,0.348,1,0.234,0.652
inertia: 3
mulch: # Mulch walkway
coordinates: 0.159,1,0.346,1,0.236,0.655,0.13,0.7
inertia: 3
Front_road_parking:
coordinates: 0.508,0.307,0.797,0.214,0.699,0.146,0.422,0.227
loitering_time: 5
objects: bicycle
Front_left_path:
coordinates: 0.004,0.407,0.293,0.288,0.427,0.539,0.139,0.695,0.123,0.609,0.001,0.493
loitering_time: 0
review:
alerts:
required_zones:
- mulch
- driveway
detections:
required_zones:
- mulch
- driveway
front_ptz:
ffmpeg:
#hwaccel_args: preset-intel-qsv-h264
output_args:
record: preset-record-generic-audio-aac
# record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps
# 1 -strftime 1 -c:v copy -c:a aac
inputs:
- path: rtsp://127.0.0.1:8554/front_ptz?video&audio
roles:
- record
- path: rtsp://127.0.0.1:8554/front_ptz_small
# Use smaller resolution stream for detection and thumbnails.
roles:
- detect
onvif:
host: 10.3.8.4
port: 80
user: redact
password: redact
# Autotracking does not work on this camera as the camera does not report the MoveStatus correctly.
# autotracking:
# enabled: true
# zooming: absolute
# track:
# - person
# required_zones:
# - ptz_whole_footpath
# return_preset: front
detect:
width: 706
height: 576
motion:
mask:
# Timestamp top left
- 0,0.083,0,0,0.568,0,0.565,0.078
#- 1,0,0.645,0,0.647,0.084,0.673,0.134,0.703,0.22,0.789,0.203,0.804,0.116,0.879,0.137,1,0.221
#- 0,0.774,0.201,0.844,0.366,1,0,1,0,0.887
# - 0.72,0.846,0.778,1,1,1,1,0.707
#- 0,0.206,0.142,0.128,0.455,0.08,0.563,0.078,0.585,0.139,0.676,0.145,0.871,0.128,0.994,0.213,1,0,0,0
zones:
ptz_footpath:
coordinates: 493,439,505,491,369,512,368,459
ptz_house_path:
coordinates: 396,576,545,576,504,491,384,508
ptz_whole_footpath:
coordinates: 0.069,0.634,0.989,0.547,0.996,0.71,0.547,0.782,0.129,0.799,0.022,0.727
rear_garden:
ffmpeg:
output_args:
record: -f segment -segment_time 10 -segment_format mp4 -reset_timestamps
1 -strftime 1 -c:v copy -ar 44100 -c:a aac
inputs:
# Stream from the go2rtc input stream instead of opening a second connection to camera.
- path: rtsp://127.0.0.1:8554/rear_garden
roles:
- record
- path: rtsp://127.0.0.1:8554/rear_garden_small
# Use smaller resolution stream for detection and thumbnails.
roles:
- detect
objects:
track:
- person
- dog
- cat
- bird
detect:
width: 1024
height: 576
motion:
mask:
# Timestamp
- 0,0,0.155,0.003,0.155,0.087,0,0.084
- 0,0.946,0.278,0.854,0.466,0.772,0.515,0.84,0.643,0.625,0.808,0.441,0.948,0.251,0.994,0.138,0.966,0.013,0.609,0.002,0.41,0,0.411,0.28,0.288,0,0.002,0.002
zones:
Rear_Yard:
coordinates: 0.97,0.28,1,0.296,1,0.998,0.999,0.999,0.326,1
loitering_time: 0
version: 0.14 Relevant Frigate log output2024-10-15 10:26:19.986725167 [INFO] Preparing new go2rtc config...
2024-10-15 10:26:19.987676828 [INFO] Preparing Frigate...
2024-10-15 10:26:19.988155593 [INFO] Starting NGINX...
2024-10-15 10:26:19.998394168 [INFO] Starting Frigate...
2024-10-15 10:26:20.086983344 nginx: [emerg] no "events" section in configuration
2024-10-15 10:26:20.092500516 [INFO] Service NGINX exited with code 1 (by signal 0)
2024-10-15 10:26:20.757480998 [INFO] Starting go2rtc...
2024-10-15 10:26:20.897841617 10:26:20.894 INF go2rtc platform=linux/amd64 revision=b2399f3 version=1.9.2
2024-10-15 10:26:20.897846083 10:26:20.894 INF config path=/dev/shm/go2rtc.yaml
2024-10-15 10:26:20.897848585 10:26:20.895 INF [rtsp] listen addr=:8554
2024-10-15 10:26:20.897850956 10:26:20.895 INF [webrtc] listen addr=:8555/tcp
2024-10-15 10:26:20.898990115 10:26:20.898 INF [api] listen addr=:1984
2024-10-15 10:26:21.098496031 [INFO] Starting NGINX...
2024-10-15 10:26:21.172345172 nginx: [emerg] no "events" section in configuration
2024-10-15 10:26:21.177550616 [INFO] Service NGINX exited with code 1 (by signal 0)
2024-10-15 10:26:22.183205919 [INFO] Starting NGINX...
2024-10-15 10:26:22.266103560 nginx: [emerg] no "events" section in configuration
2024-10-15 10:26:22.271375254 [INFO] Service NGINX exited with code 1 (by signal 0)
2024-10-15 10:26:23.100554007 [2024-10-15 10:26:23] frigate.app INFO : Starting Frigate (0.14.1-f4f3cfa)
2024-10-15 10:26:23.102726612 [2024-10-15 10:26:23] frigate.util.config INFO : Checking if frigate config needs migration...
2024-10-15 10:26:23.146536541 [2024-10-15 10:26:23] frigate.util.config INFO : frigate config does not need migration...
2024-10-15 10:26:23.185826218 [2024-10-15 10:26:23] frigate.config WARNING : Customizing more than a detector model path is unsupported.
2024-10-15 10:26:23.224906781 [2024-10-15 10:26:23] peewee_migrate.logs INFO : Starting migrations
2024-10-15 10:26:23.225104560 [2024-10-15 10:26:23] peewee_migrate.logs INFO : There is nothing to migrate
2024-10-15 10:26:23.277004078 [INFO] Starting NGINX...
2024-10-15 10:26:23.389306228 nginx: [emerg] no "events" section in configuration
2024-10-15 10:26:23.394748880 [INFO] Service NGINX exited with code 1 (by signal 0) Relevant go2rtc log outputN/A Frigate statsNo response Operating systemOther Linux Install methodDocker Compose docker-compose file or Docker CLI commandN/A Object DetectorOpenVino Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
The /usr/local/nginx/conf/nginx.conf within the container is empty |
Beta Was this translation helpful? Give feedback.
-
I copied and pasted the contents of https://github.com/blakeblackshear/frigate/blob/v0.14.1/docker/main/rootfs/usr/local/nginx/conf/nginx.conf into the empty nginx.conf file, and this has resolved the issue. Not sure how the file got nuked. |
Beta Was this translation helpful? Give feedback.
I copied and pasted the contents of https://github.com/blakeblackshear/frigate/blob/v0.14.1/docker/main/rootfs/usr/local/nginx/conf/nginx.conf into the empty nginx.conf file, and this has resolved the issue. Not sure how the file got nuked.