AlexxIT / go2rtc

Ultimate camera streaming application with support RTSP, RTMP, HTTP-FLV, WebRTC, MSE, HLS, MP4, MJPEG, HomeKit, FFmpeg, etc.
https://github.com/AlexxIT/Blog
MIT License
4.34k stars 358 forks source link

Re-connection to camera stops after some retries #258

Closed yannpub closed 1 year ago

yannpub commented 1 year ago

I have a couple of cameras which get disconnected from Go2rtc and after some retries to reconnect, they stop getting accessible. If I restart go2rtc, they come back, and after a couple of hours the feed is lost again.

Example below shows Shed_cam getting lost. The last lines repeat indefinitely.

2023-02-14 08:56:33.588413225 09:56:33.588 INF go2rtc version 1.1.2 linux/amd64 2023-02-14 08:56:33.589140202 09:56:33.589 INF [api] listen addr=:1984 2023-02-14 08:56:33.589624432 09:56:33.589 INF [rtsp] listen addr=:8554 2023-02-14 08:56:33.590094861 09:56:33.590 INF [srtp] listen addr=:8443 2023-02-14 08:56:33.590550597 09:56:33.590 INF [webrtc] listen addr=:8555 2023-02-14 08:56:34.698183836 09:56:34.697 DBG [rtsp] new consumer stream=Parking_cam 2023-02-14 08:56:34.698191132 09:56:34.698 DBG [streams] probe producer url=rtsp://192.168.1.153:554/onvif1 2023-02-14 08:56:34.718784731 09:56:34.718 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 08:56:34.719220295 09:56:34.718 DBG [streams] probe producer url=rtsp://192.168.1.151:554/onvif1 2023-02-14 08:56:34.724710726 09:56:34.724 DBG [rtsp] new consumer stream=Garden_cam 2023-02-14 08:56:34.724715682 09:56:34.724 DBG [streams] probe producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 08:56:34.737652593 09:56:34.737 DBG [rtsp] new consumer stream=Freebox_cam 2023-02-14 08:56:34.737679740 09:56:34.737 DBG [streams] probe producer url=rtsp://:@192.168.1.154/live 2023-02-14 08:56:34.737859310 09:56:34.737 DBG [rtsp] new consumer stream=Kitten_cam 2023-02-14 08:56:34.737862298 09:56:34.737 DBG [streams] probe producer url=rtsp://192.168.1.150:554/onvif1 2023-02-14 08:56:34.799739114 09:56:34.799 DBG [streams] start producer url=rtsp://192.168.1.153:554/onvif1 2023-02-14 08:56:34.811840020 09:56:34.811 DBG [streams] start producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 08:56:34.847197145 09:56:34.847 DBG [streams] start producer url=rtsp://192.168.1.150:554/onvif1 2023-02-14 08:56:34.893408375 09:56:34.893 DBG [streams] start producer url=rtsp://192.168.1.151:554/onvif1 2023-02-14 08:56:35.035857402 09:56:35.035 DBG [streams] start producer url=rtsp://:@192.168.1.154/live 2023-02-14 09:26:06.983071492 10:26:06.982 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="read tcp 172.30.33.6:40134->192.168.1.152:554: i/o timeout" url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:26:06.983081662 10:26:06.982 DBG [streams] reconnect to url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:26:11.002970062 10:26:11.002 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="read tcp 172.30.33.6:53608->192.168.1.151:554: i/o timeout" url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:26:11.003037105 10:26:11.002 DBG [streams] reconnect to url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:26:11.983456476 10:26:11.983 DBG [streams] producer=dial tcp 192.168.1.152:554: i/o timeout 2023-02-14 09:26:16.004255697 10:26:16.004 DBG [streams] producer=dial tcp 192.168.1.151:554: i/o timeout 2023-02-14 09:26:32.702446249 10:26:32.698 DBG [rtsp] handle=EOF 2023-02-14 09:26:32.702456785 10:26:32.698 DBG [streams] stop producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:26:32.702462400 10:26:32.698 DBG [rtsp] disconnect stream=Garden_cam 2023-02-14 09:26:34.801936160 10:26:34.801 DBG [rtsp] new consumer stream=Garden_cam 2023-02-14 09:26:34.801951779 10:26:34.801 DBG [streams] probe producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:26:34.958908722 10:26:34.958 DBG [streams] start producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:26:36.689395145 10:26:36.689 DBG [rtsp] handle=EOF 2023-02-14 09:26:36.689462642 10:26:36.689 DBG [streams] stop producer url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:26:36.689464807 10:26:36.689 DBG [rtsp] disconnect stream=Shed_cam 2023-02-14 09:26:44.791535701 10:26:44.791 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:26:44.791567548 10:26:44.791 DBG [streams] probe producer url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:26:45.103493966 10:26:45.103 DBG [streams] start producer url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:27:07.497699559 10:27:07.497 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="read tcp 172.30.33.6:47270->192.168.1.151:554: i/o timeout" url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:27:07.497710028 10:27:07.497 DBG [streams] reconnect to url=rtsp://192.168.1.151:554/onvif1 2023-02-14 09:27:08.155158689 10:27:08.154 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="read tcp 172.30.33.6:55958->192.168.1.152:554: i/o timeout" url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:27:08.155169208 10:27:08.155 DBG [streams] reconnect to url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:27:33.215734236 10:27:33.215 DBG [rtsp] handle=EOF 2023-02-14 09:27:34.828555241 10:27:34.828 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:27:42.528951829 10:27:42.528 WRN github.com/AlexxIT/go2rtc/cmd/streams/producer.go:132 > error="read tcp 172.30.33.6:38756->192.168.1.152:554: i/o timeout" url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:27:42.528962308 10:27:42.528 DBG [streams] reconnect to url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:27:44.852088764 10:27:44.851 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:27:47.529989288 10:27:47.529 DBG [streams] producer=dial tcp 192.168.1.152:554: i/o timeout 2023-02-14 09:27:54.872865992 10:27:54.872 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:28:04.894719337 10:28:04.894 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:28:08.240538663 10:28:08.240 DBG [rtsp] handle=EOF 2023-02-14 09:28:08.240672498 10:28:08.240 DBG [streams] stop producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:28:08.240676792 10:28:08.240 DBG [rtsp] disconnect stream=Garden_cam 2023-02-14 09:28:14.818415309 10:28:14.818 DBG [rtsp] new consumer stream=Garden_cam 2023-02-14 09:28:14.818419104 10:28:14.818 DBG [streams] probe producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:28:14.899415849 10:28:14.899 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:28:15.099238626 10:28:15.099 DBG [streams] start producer url=rtsp://192.168.1.152:554/onvif1 2023-02-14 09:28:24.920846084 10:28:24.920 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:28:34.939444582 10:28:34.939 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:28:44.957020329 10:28:44.956 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:28:54.981849542 10:28:54.981 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:29:04.987036223 10:29:04.986 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:29:15.016376914 10:29:15.016 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:29:25.041061022 10:29:25.040 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:29:35.061042145 10:29:35.060 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:29:45.082245724 10:29:45.082 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:29:55.104633351 10:29:55.104 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:30:05.124927493 10:30:05.124 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:30:15.143947402 10:30:15.143 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:30:25.156523198 10:30:25.156 DBG [rtsp] new consumer stream=Shed_cam 2023-02-14 09:30:35.161887719 10:30:35.161 DBG [rtsp] new consumer stream=Shed_cam

yannpub commented 1 year ago

Closing issue, as was relevant for v1.2