go2rtc
go2rtc copied to clipboard
json locked error on 1.5.0
I have 2 cameras running on Frigate using go2rtc 1.5.0 and will occasionally lose connection to one of the cameras and never come back up.
2023-05-07 12:11:54.866291976 12:11:54.866 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 10.77.0.223:50414->10.77.0.221:8554: i/o timeout" url=rtsp://10.77.0.221:8554/driveway
2023-05-07 12:11:54.978466921 12:11:54.978 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=ffmpeg:driveway#audio=opus#audio=aac#async
2023-05-07 12:12:01.224655304 12:12:01.224 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 10.77.0.223:50416->10.77.0.221:8554: i/o timeout" url=rtsp://10.77.0.221:8554/driveway
2023-05-07 12:12:11.215189966 12:12:11.214 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 10.77.0.223:50420->10.77.0.221:8554: i/o timeout" url=rtsp://10.77.0.221:8554/driveway
2023-05-07 12:12:17.539085596 12:12:17.539 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=rtsp://10.77.0.221:8554/driveway
2023-05-07 12:13:00.437864752 12:13:00.435 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 127.0.0.1:8554->127.0.0.1:55782: i/o timeout" url=ffmpeg:front_porch#audio=opus#audio=aac#async
2023-05-07 12:13:08.083364480 12:13:08.082 WRN [streams] json locked
2023-05-07 12:13:25.584679004 12:13:25.583 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 127.0.0.1:8554->127.0.0.1:55978: i/o timeout" url=ffmpeg:front_porch#audio=opus#audio=aac#async
2023-05-07 12:13:39.917048268 12:13:39.916 WRN [streams] json locked
2023-05-07 12:14:06.658229930 12:14:06.625 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 127.0.0.1:8554->127.0.0.1:55988: i/o timeout" url=ffmpeg:front_porch#audio=opus#audio=aac#async
2023-05-07 12:14:55.129514666 12:14:55.050 ERR [exec] timeout url="exec:ffmpeg -hide_banner -v error -use_wallclock_as_timestamps 1 -async 1 -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://127.0.0.1:8554/driveway?audio -vn -map 0:a:0? -c:a:0 libopus -ar:a:0 48000 -ac:a:0 2 -application:a:0 voip -compression_level:a:0 0 -map 0:a:0? -c:a:1 aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2023-05-07 12:15:06.715650492 12:15:06.711 ERR [exec] timeout url="exec:ffmpeg -hide_banner -v error -use_wallclock_as_timestamps 1 -async 1 -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://127.0.0.1:8554/front_porch?audio -vn -map 0:a:0? -c:a:0 libopus -ar:a:0 48000 -ac:a:0 2 -application:a:0 voip -compression_level:a:0 0 -map 0:a:0? -c:a:1 aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2023-05-07 12:15:44.800244596 12:15:44.799 WRN [streams] json locked
2023-05-07 12:16:14.837153949 12:16:14.837 WRN [streams] json locked
2023-05-07 12:16:15.518564734 12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:52018: write: broken pipe"
2023-05-07 12:16:15.518745434 12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:38522: write: broken pipe"
2023-05-07 12:16:15.518817530 12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:52032: write: broken pipe"
2023-05-07 12:16:15.518892106 12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:48716: write: broken pipe"
2023-05-07 12:16:15.518948987 12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 127.0.0.1:8554->127.0.0.1:55986: write: broken pipe"
2023-05-07 12:16:15.519032766 12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:49170: write: broken pipe"
2023-05-07 12:16:15.519515390 12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 127.0.0.1:8554->127.0.0.1:55992: write: broken pipe"
2023-05-07 12:16:15.519814432 12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 127.0.0.1:8554->127.0.0.1:55982: write: broken pipe"
2023-05-07 12:16:15.519816609 12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:57852: write: broken pipe"
2023-05-07 12:16:15.520168421 12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 127.0.0.1:8554->127.0.0.1:55974: write: broken pipe"
2023-05-07 12:16:15.520170432 12:16:15.520 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 127.0.0.1:8554->127.0.0.1:55990: write: broken pipe"
2023-05-07 12:16:15.520171967 12:16:15.520 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 127.0.0.1:8554->127.0.0.1:55994: write: broken pipe"
2023-05-07 12:16:15.520173427 12:16:15.520 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp 10.77.0.223:8554->10.77.0.250:35398: write: broken pipe"
2023-05-07 12:16:44.846532806 12:16:44.846 WRN [streams] json locked
2023-05-07 12:17:14.856141290 12:17:14.856 WRN [streams] json locked
2023-05-07 12:17:44.863439544 12:17:44.863 WRN [streams] json locked
2023-05-07 12:18:14.871506174 12:18:14.871 WRN [streams] json locked
2023-05-07 12:18:44.878748101 12:18:44.878 WRN [streams] json locked
2023-05-07 12:19:14.890400972 12:19:14.890 WRN [streams] json locked
2023-05-07 12:19:44.898432971 12:19:44.898 WRN [streams] json locked
2023-05-07 12:20:14.907736076 12:20:14.907 WRN [streams] json locked
2023-05-07 12:20:44.917835279 12:20:44.917 WRN [streams] json locked
2023-05-07 12:21:14.929905647 12:21:14.929 WRN [streams] json locked
2023-05-07 12:21:44.946032420 12:21:44.945 WRN [streams] json locked
2023-05-07 12:22:14.966079916 12:22:14.966 WRN [streams] json locked
2023-05-07 12:22:44.975544359 12:22:44.974 WRN [streams] json locked
2023-05-07 12:23:14.983273538 12:23:14.983 WRN [streams] json locked
```
If I restart Frigate the cameras reconnect and all is good until json locked occurs again
Show your go2rtc config section
go2rtc:
streams:
front_porch:
- rtsp://10.77.0.221:8554/front-porch
- "ffmpeg:front_porch#audio=opus#audio=aac#async"
driveway:
- rtsp://10.77.0.221:8554/driveway
- "ffmpeg:driveway#audio=opus#audio=aac#async"
Why you using opus and aac? Usually you need to use only one. Also you don't need async option
At one point in the beta docs for 0.12 it showed using both opus and aac. I now see that it shows to only have one. I changed that and removed async. I had added it to try and solve some audio sync issues but honestly I never checked after adding it to see if it helped or not. I will report back if I continue to get the json locked issue.
Happened again after removing async and aac
go2rtc:
streams:
front_porch:
- rtsp://10.77.0.221:8554/front-porch
- "ffmpeg:front_porch#audio=opus"
driveway:
- rtsp://10.77.0.221:8554/driveway
- "ffmpeg:driveway#audio=opus"
2023-05-31 14:30:37.624821176 14:30:37.624 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=rtsp://10.77.0.221:8554/front-porch
2023-05-31 14:30:56.698107043 14:30:56.698 WRN [streams] json locked
2023-05-31 14:31:26.712076173 14:31:26.712 WRN [streams] json locked
2023-05-31 14:31:56.745090726 14:31:56.745 WRN [streams] json locked
2023-05-31 14:32:26.780019004 14:32:26.779 WRN [streams] json locked
2023-05-31 14:32:56.802907361 14:32:56.802 WRN [streams] json locked
2023-05-31 14:33:26.838813041 14:33:26.838 WRN [streams] json locked
2023-05-31 14:33:51.015699004 14:33:51.015 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=rtsp://10.77.0.221:8554/driveway
2023-05-31 14:33:53.795143537 14:33:53.795 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp 10.77.0.223:51954->10.77.0.221:8554: read: connection reset by peer" url=rtsp://10.77.0.221:8554/front-porch
2023-05-31 14:33:56.854843284 14:33:56.854 WRN [streams] json locked
2023-05-31 14:34:17.030951914 14:34:17.030 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="read tcp 10.77.0.223:8554->10.77.0.250:56894: i/o timeout"
2023-05-31 14:34:26.248838960 14:34:26.248 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="read tcp 10.77.0.223:8554->10.77.0.250:53948: i/o timeout"
2023-05-31 14:34:26.249368420 14:34:26.249 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="read tcp 10.77.0.223:8554->10.77.0.250:33634: i/o timeout"
2023-05-31 14:34:26.877997380 14:34:26.877 WRN [streams] json locked
2023-05-31 14:34:56.898851303 14:34:56.898 WRN [streams] json locked
2023-05-31 14:35:26.947063154 14:35:26.947 WRN [streams] json locked
2023-05-31 14:35:56.977913342 14:35:56.977 WRN [streams] json locked
2023-05-31 14:36:27.023756324 14:36:27.023 WRN [streams] json locked
2023-05-31 14:36:57.054512000 14:36:57.054 WRN [streams] json locked
2023-05-31 14:37:27.091190701 14:37:27.091 WRN [streams] json locked
2023-05-31 14:37:57.123886397 14:37:57.123 WRN [streams] json locked
2023-05-31 14:38:27.153898353 14:38:27.153 WRN [streams] json locked
2023-05-31 14:38:57.176188146 14:38:57.176 WRN [streams] json locked
2023-05-31 14:39:27.193813736 14:39:27.193 WRN [streams] json locked
2023-05-31 14:39:57.233943421 14:39:57.233 WRN [streams] json locked
2023-05-31 14:40:27.258805705 14:40:27.258 WRN [streams] json locked
2023-05-31 14:40:57.286437465 14:40:57.286 WRN [streams] json locked
2023-05-31 14:41:27.331272240 14:41:27.331 WRN [streams] json locked
Are you sure you using v1.5? Can you see this version in logs?
12:50:59.328 INF go2rtc version 1.5.0 linux/amd64
It doesn't happen as much since removing async and aac but it will happen on occasion.
With witch config does this happen often and with witch don't?
Just started having this issue after upgrading to 0.12.1 and also updating Wyze-Bridge to latest version. I'll get a bunch of broken pipe errors then that json locked one. Not sure if it's absolutely related to Frigate or wyze-bridge since I updated them both at the same time like a dumbass. Haven't tried restarting Frigate when it happens, I'll try next time it occurs. But just going in the wyze-bridge GUI and letting the feeds auto refresh fixes the issue in Frigate. I'll try going back to the old versions to see if I can pinpoint the root cause
Hi! I have the simullar issue on go2rtc 1.9.3, one or two streams stop working. In go2rtc logs I see many messanges like: WRN [streams] json locked
After restart frigate container all streams work for some time, and then 1 or 2 of them (camera_hd_webrtc and\or camera_sd_webrtc) stop working.
My config: https://pastebin.com/bc9LfwGq Logs: https://pastebin.com/KisK4j3N