Dahua logs show admin login/logout every single minute...So far I can see it's the Synology NAS doing this, but why?

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
Merry HoHo!


For sh!ts and giggles today I decided to glance at my Color4K-X camera logs. For some reason it shows an admin login/logout happening every minute and what is proving ad infinitum. I only checked the logs because I had noticed a bit of stuttering on my recent recordings, and was trying to troubleshoot.


I have tried my google-fu, and that pointed out it may be a Synology thing, and the details in image #2 reflect that. Can you guys help me logically work through identifying why this may be happening? I don't believe I've seen this behaviour before, and I don't think I can pinpoint the time it began. I took a screen shot of the logs after incrementally going back in time and thought I had it's inception but that was fake out .. I believe my camera is cannibalizing the logs after 8 hours because the next time I searched the logs in the precise same time frame a bunch of the logs were absent. I put 2 and 2 together and realized it was going back only ~8 hrs, and so the older logs were being dropped.

Here is what it looks like ..


Screen Shot 2021-12-25 at 00.07.55.png

And this recent capture with the details revealed .. didn't pay attention to this initially - it's definitely the Synology NAS logging in and out.
Screen Shot 2021-12-25 at 01.13.58.png


Maybe it's polling for alarms, but I don't have anything set to email or SMS alerts and such.

TIA
 

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
100% correlated to NTP. Messing with those settings in both the NAS and the camera (Dahua NTP now off, not sure why I had it on) definitely manifests in a new pattern of logging in and out. Final step before I step back for now is to direct the Synology NAS to use one of the external NTP servers in it's list. Right now it's configured to be it's own NTP server which may be messing things up somehow.



Edit: Still no beuno. The NTP settings did stir a change in the login-out patterns, but haven't caused any cessation yet. Sometimes it rises as high as 3x per minute.

I've been heavily into mulling through the Netgate device(past 48 hrs) so perhaps either it's firewall rules, or the NAS's holds an answer. :wtf:
 
Last edited:

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
Next time I'll go with what in hindsight seems the obvious choice...disabling CGI services. That fixed it. I pared the whole services thing down, and problem solved, since CGI was manner in which the logins/logouts were coming.

Screen Shot 2021-12-25 at 03.36.40.png

I ran this log query at 0340...no log-ins since removing the CGI service dino
Screen Shot 2021-12-25 at 03.40.16.png


Thanks for following along :blankstare:
 

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
This afternoon, the NAS showed no recordings subsequent to disabling the CGI service. And in that Synology Surveillance APP it said it was not connected to the camera. It was, and I could watch it stream, but trying to perform other functions, such as load capabilities, or "Test Connection" which is a synology SS function which is meant to test if you've successfully connected to the camera and so on. So it seems Synology SS streams live views one way (RTSP?), BUT all other functions including recording, changing settings and so on are being routed through the CGI service. Once I again enabled that service things returned to 'normal'. But, by normal I mean the Synology SS program is back to logging in and out 2x a minute. (Sub-stream and main?)


So while this is looking more and more like a Synology origin, it is cramping my cameras ability to perform I think. The incessant logging in/out is crippling the camera to the point of severe stuttering .. I'll see if I have a short clip to demonstrate below. I'll do some searching of this site to see if I can identify the Synology experts. They must be further along in all things Synology, and IPC's and since they specialize in making their cameras work with the Surveillance Station then they may be the ones to speak to.

This is a screen capture of one of the cameras edge recordings. The live view directly from the camera was just as compromised.

I'd say I need to research why the NAS feels it needs to constantly log in/out versus just keeping a connection open, for instance. In reality that connection is open already .. the NAS live view works fine BUT it will not record without the CGI service enabled, and therein lies the issue.

View attachment Stuttering due to constant logging inout.mov
 

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
Another diagnostic data point that may shed light. Remarkably, I just played the video time line above through both the Synology Surveillance Station as well as the camera itself, and no problems .. no stuttering. That tells me that the camera can manage nicely when it's not trying to multitask .. recording activity while at the same time being asked to stream a recording. The constant log in's add a stress that either the camera, or NAS can't perform under. It's not like my SD card is a slouch either. It was one of the more industrial one's mentioned when I asked months ago for advice on those, so it ought not to be an issue.


I've initiated a service ticket with Synology with all this information. Some whiz-banger over there will figure this out. It's their issue, not the cameras.



Maybe I can capture some packets on the switch which might reveal added details. For all I know, it's the camera prompting the NAS to log in to it, if that can be a thing.
 

NightLife

Getting comfortable
Joined
Sep 10, 2021
Messages
490
Reaction score
1,096
Location
Canada
I can narrow it down to NTP. Others online it seems also have issues with Synology, IPC's and trying to get it to allow DST without things going bad. For now I disabled DST after ensuring the time was correct.

Next I'll start writing firewall rules on the Netgate. I wrote one on the NAS firewall.



**So a question - if I write some firewall rules telling the wall to allow past NTP requests from the camera IP do I have to 'enable' network access on the IPC? Is that a safe thing to do? Surely Netgate's PFSense can manage it you'd think. If rules will suffice, them maybe I can re-enable DST. For now without it, things seem to be going alright.
 
Last edited:
Joined
Nov 27, 2020
Messages
5
Reaction score
1
Location
United States
Did you ever figure out the cause for the repeated login / logouts? I'm having the same problem on my Dahua cameras in Synology Surveillance Station (SS). The only exception is for cameras loaded into SS with the [ONIF] Brand- no repeated login issues for those cams.
 
Top