skrashevich/double-take

[BUG] Not receiving Snapshots, latest, or even MQTT jpg to DT

Dvalin21 opened this issue ยท 15 comments

Describe the bug
Receiving errors after install

Version of Double Take
v1.13.11.3

Expected behavior
Expected to receive snapshots from mqtt: Snapshot and latest
"""
23-09-30 21:03:41 error: AxiosError: stream error: timeout of 5000ms exceeded
at RedirectableRequest.handleRequestTimeout (/double-take/api/node_modules/axios/dist/node/axios.cjs:3053:16)
at RedirectableRequest.emit (node:events:513:28)
at Timeout. (/double-take/api/node_modules/follow-redirects/index.js:179:12)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
23-09-30 21:04:19 error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at new NodeError (node:internal/errors:387:5)
at ServerResponse.setHeader (node:_http_outgoing:644:11)
at ServerResponse.header (/double-take/api/node_modules/express/lib/response.js:794:10)
at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:174:12)
at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
at ServerResponse.json (/double-take/api/node_modules/express/lib/response.js:278:15)
at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:162:21)
at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
at /double-take/api/src/app.js:46:38
at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)
"""
Hardware

  • Architecture or platform: [Proxmox/lxc]
  • OS: [Debian 11]
  • Browser (if applicable) [Chrome]
  • Docker image (if applicable) [skrashevich/double-take:latest]

Additional context
Add any other context about the problem here.

try to use skrashevich/double-take:1.13 image instead of :latest. the latest can be unstable
also, you can increase detector timeout in config; for example:

detectors:
  aiserver:
    timeout: 15

try to use skrashevich/double-take:1.13 image instead of :latest. the latest can be unstable also, you can increase detector timeout in config; for example:

detectors:
  aiserver:
    timeout: 15

Thanks!! Ill switch over. Ill share my detector config just in case I may be missing something

  aiserver:
     url: http://####:32168
     timeout: 15
     opencv_face_required: true
     recognize:
       min_face_size: 20000 # minimum face size to be recognized (pixels)
       recognition_threshold: 0.80 # threshold for face recognition confidence
       det_prob_threshold: 0.8
       face_template_scale: 0.6 # scale factor for the face template (values between 0.25 and 1.0)
       reidentification_interval: 0 # time (in seconds) to wait before re-identifying a person
       templates_cache_size: 2000 # maximum number of face templates to keep in cache

opencv_face_required: true does not have sense in this case, as ai.server performs face detection step almost identically. it's better to turn it off to save resources

So I switched over to the image you recommended and now I get the following. And I'll turn off that setting

'''
23-09-30 23:51:43 error: AxiosError: stream error: timeout of 5000ms exceeded
at RedirectableRequest.handleRequestTimeout (/double-take/api/node_modules/axios/dist/node/axios.cjs:3053:16)
at RedirectableRequest.emit (node:events:513:28)
at Timeout. (/double-take/api/node_modules/follow-redirects/index.js:169:12)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
23-09-30 23:51:53 error: AxiosError: stream error: timeout of 5000ms exceeded
at RedirectableRequest.handleRequestTimeout (/double-take/api/node_modules/axios/dist/node/axios.cjs:3053:16)
at RedirectableRequest.emit (node:events:513:28)
at Timeout. (/double-take/api/node_modules/follow-redirects/index.js:169:12)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
23-09-30 23:52:02 error: AxiosError: url validation error: timeout of 5000ms exceeded
at RedirectableRequest.handleRequestTimeout (/double-take/api/node_modules/axios/dist/node/axios.cjs:3053:16)
at RedirectableRequest.emit (node:events:513:28)
at Timeout. (/double-take/api/node_modules/follow-redirects/index.js:169:12)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
'''

also, you can increase detector timeout in config; for example:

detectors:
  aiserver:
    timeout: 15

also, you can increase detector timeout in config; for example:

detectors: aiserver: timeout: 15

I did increase it to 15, should I go higher?

How long does it take for the same image to be recognized through the built-in ai.server web-ui?
And what is your system architecture: x86_64 or arm64?

How long does it take for the same image to be recognized through the built-in ai.server web-ui? And what is your system architecture: x86_64 or arm64?

X86_64 and it takes just a second or two.

Where did you get these settings from:

face_template_scale: 0.6 # scale factor for the face template (values between 0.25 and 1.0)
reidentification_interval: 0 # time (in seconds) to wait before re-identifying a person
templates_cache_size: 2000 # maximum number of face templates to keep in cache

this settings never had beed supported by double-take.

Update: Sorry, ended up having to go outside anyway. So this is my current log, but no photos either match or unknown yet.

23-10-03 05:11:45 info: Double Take v1.13.11.3
23-10-03 05:12:35 info: MQTT: connected
23-10-03 05:12:35 info: MQTT: subscribed to frigate/events, frigate/+/person/snapshot
23-10-03 05:27:37 info: processing front_door: 1696310855.962093-kdf693
23-10-03 05:27:37 info: processing front_door: 9fb45cfd-1f3a-4767-b177-2c5acc9a1062
23-10-03 05:27:37 info: ai.server found no face in image
23-10-03 05:27:37 info: done processing front_door: 9fb45cfd-1f3a-4767-b177-2c5acc9a1062 in 0.25 sec
23-10-03 05:27:37 info: {
  id: '9fb45cfd-1f3a-4767-b177-2c5acc9a1062',
  duration: 0.25,
  timestamp: '2023-10-03T00:27:37.509-05:00',
  attempts: 1,
  camera: 'front_door',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-03 05:27:37 info: ai.server found no face in image
23-10-03 05:27:37 info: ai.server found no face in image
23-10-03 05:27:37 info: ai.server found no face in image
23-10-03 05:27:38 info: ai.server found no face in image
23-10-03 05:27:38 info: ai.server found no face in image
23-10-03 05:27:38 info: ai.server found no face in image
23-10-03 05:27:38 info: ai.server found no face in image
23-10-03 05:27:38 info: ai.server found no face in image
23-10-03 05:27:39 info: ai.server found no face in image
23-10-03 05:27:39 info: ai.server found no face in image
23-10-03 05:27:39 info: ai.server found no face in image
23-10-03 05:28:00 info: done processing front_door: 1696310855.962093-kdf693 in 23.28 sec
23-10-03 05:28:00 info: {
  id: '1696310855.962093-kdf693',
  duration: 23.28,
  timestamp: '2023-10-03T00:28:00.535-05:00',
  attempts: 11,
  camera: 'front_door',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-03 05:28:28 info: processing front_door: 1696310908.034767-ydzngn
23-10-03 05:28:28 info: ai.server found no face in image
23-10-03 05:28:28 info: ai.server found no face in image
23-10-03 05:28:28 info: ai.server found no face in image
23-10-03 05:28:29 info: ai.server found no face in image
23-10-03 05:28:29 info: ai.server found no face in image
23-10-03 05:28:29 info: ai.server found no face in image
23-10-03 05:28:29 info: ai.server found no face in image
23-10-03 05:28:29 info: ai.server found no face in image
23-10-03 05:28:30 info: ai.server found no face in image
23-10-03 05:28:30 info: ai.server found no face in image
23-10-03 05:28:30 info: ai.server found no face in image
23-10-03 05:28:31 info: processing front_door: b3ceeaf5-3b7f-4196-85ca-d6e5049192d7
23-10-03 05:28:31 info: ai.server found no face in image
23-10-03 05:28:31 info: done processing front_door: b3ceeaf5-3b7f-4196-85ca-d6e5049192d7 in 0.14 sec
23-10-03 05:28:31 info: {
  id: 'b3ceeaf5-3b7f-4196-85ca-d6e5049192d7',
  duration: 0.14,
  timestamp: '2023-10-03T00:28:31.501-05:00',
  attempts: 1,
  camera: 'front_door',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-03 05:28:32 info: ai.server found no face in image
23-10-03 05:28:33 info: processing front_door: 1696310908.034767-ydzngn
23-10-03 05:28:33 info: ai.server found no face in image
23-10-03 05:28:33 info: ai.server found no face in image
23-10-03 05:28:34 info: ai.server found no face in image
23-10-03 05:28:34 info: ai.server found no face in image
23-10-03 05:28:34 info: ai.server found no face in image
23-10-03 05:28:34 info: ai.server found no face in image
23-10-03 05:28:34 info: ai.server found no face in image
23-10-03 05:28:34 info: ai.server found no face in image
23-10-03 05:28:35 info: ai.server found no face in image
23-10-03 05:28:35 info: ai.server found no face in image
23-10-03 05:28:35 info: ai.server found no face in image
23-10-03 05:28:35 info: ai.server found no face in image
23-10-03 05:28:35 info: ai.server found no face in image
23-10-03 05:28:42 info: processing front_door: 78907b78-fde8-43d0-9457-3f42c1539fdc
23-10-03 05:28:42 info: ai.server found no face in image
23-10-03 05:28:42 info: done processing front_door: 78907b78-fde8-43d0-9457-3f42c1539fdc in 0.15 sec
23-10-03 05:28:42 info: {
  id: '78907b78-fde8-43d0-9457-3f42c1539fdc',
  duration: 0.15,
  timestamp: '2023-10-03T00:28:42.665-05:00',
  attempts: 1,
  camera: 'front_door',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-03 05:28:47 info: done processing front_door: 1696310908.034767-ydzngn in 4.57 sec
23-10-03 05:28:47 info: {
  id: '1696310908.034767-ydzngn',
  duration: 4.57,
  timestamp: '2023-10-03T00:28:47.091-05:00',
  attempts: 17,
  camera: 'front_door',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-03 05:28:55 info: done processing front_door: 1696310908.034767-ydzngn in 13.4 sec
23-10-03 05:28:55 info: {
  id: '1696310908.034767-ydzngn',
  duration: 13.4,
  timestamp: '2023-10-03T00:28:55.919-05:00',
  attempts: 13,
  camera: 'front_door',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}

Sorry for the long way, just got out of the hospital. I changed and updated config for correct ai.server setting for DT. Also I updated to the latest version of DT

   aiserver:
     url: http://XXXX:32168
     timeout: 30
     opencv_face_required: false

I'm receiving snapshots, mqtt, and latest jpg, but also getting the following error (Also keep in mine I have removed all trained jpg. I've decided to start fresh.)

23-10-12 01:29:02 info: done processing storage_room: 1697074121.897546-vi2qvd in 20.26 sec
23-10-12 01:29:02 info: {
  id: '1697074121.897546-vi2qvd',
  duration: 20.26,
  timestamp: '2023-10-11T20:29:02.628-05:00',
  attempts: 16,
  camera: 'storage_room',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-12 01:29:02 error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:387:5)
    at ServerResponse.setHeader (node:_http_outgoing:644:11)
    at ServerResponse.header (/double-take/api/node_modules/express/lib/response.js:794:10)
    at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:174:12)
    at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
    at ServerResponse.json (/double-take/api/node_modules/express/lib/response.js:278:15)
    at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:162:21)
    at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
    at /double-take/api/src/app.js:46:38
    at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)

Sorry for the long way, just got out of the hospital. I changed and updated config for correct ai.server setting for DT. Also I updated to the latest version of DT

   aiserver:
     url: http://XXXX:32168
     timeout: 30
     opencv_face_required: false

I'm receiving snapshots, mqtt, and latest jpg, but also getting the following error (Also keep in mine I have removed all trained jpg. I've decided to start fresh.)

23-10-12 01:29:02 info: done processing storage_room: 1697074121.897546-vi2qvd in 20.26 sec
23-10-12 01:29:02 info: {
  id: '1697074121.897546-vi2qvd',
  duration: 20.26,
  timestamp: '2023-10-11T20:29:02.628-05:00',
  attempts: 16,
  camera: 'storage_room',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-12 01:29:02 error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:387:5)
    at ServerResponse.setHeader (node:_http_outgoing:644:11)
    at ServerResponse.header (/double-take/api/node_modules/express/lib/response.js:794:10)
    at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:174:12)
    at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
    at ServerResponse.json (/double-take/api/node_modules/express/lib/response.js:278:15)
    at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:162:21)
    at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
    at /double-take/api/src/app.js:46:38
    at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)

Had the same problem, downgraded to v1.13.10 and the problem was gone..

Sorry for the long way, just got out of the hospital. I changed and updated config for correct ai.server setting for DT. Also I updated to the latest version of DT

   aiserver:
     url: http://XXXX:32168
     timeout: 30
     opencv_face_required: false

I'm receiving snapshots, mqtt, and latest jpg, but also getting the following error (Also keep in mine I have removed all trained jpg. I've decided to start fresh.)

23-10-12 01:29:02 info: done processing storage_room: 1697074121.897546-vi2qvd in 20.26 sec
23-10-12 01:29:02 info: {
  id: '1697074121.897546-vi2qvd',
  duration: 20.26,
  timestamp: '2023-10-11T20:29:02.628-05:00',
  attempts: 16,
  camera: 'storage_room',
  zones: [],
  counts: { person: 0, match: 0, miss: 0, unknown: 0 },
  matches: [],
  misses: [],
  unknowns: []
}
23-10-12 01:29:02 error: Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
    at new NodeError (node:internal/errors:387:5)
    at ServerResponse.setHeader (node:_http_outgoing:644:11)
    at ServerResponse.header (/double-take/api/node_modules/express/lib/response.js:794:10)
    at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:174:12)
    at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
    at ServerResponse.json (/double-take/api/node_modules/express/lib/response.js:278:15)
    at ServerResponse.send (/double-take/api/node_modules/express/lib/response.js:162:21)
    at ServerResponse.res.send (/double-take/api/src/middlewares/respond.js:41:18)
    at /double-take/api/src/app.js:46:38
    at newFn (/double-take/api/node_modules/express-async-errors/index.js:16:20)

Had the same problem, downgraded to v1.13.10 and the problem was gone..

Thanks, Ill try this.

Just wanted to report back that v1.13.10 is working great with all of the changes suggested by @skrashevich Continue the hard work guys.