Hikvision IP Camera cannot connect

happ104610

Cadet
Joined
Jan 2, 2018
Messages
2
Hi all,

I recently upgraded my FreeNAS server (11.2 Stable Train) to 11.2-BETA2 and everything appears to be working fine with other applications (like Plex) but my Hikvision IP cameras storage is listed as offline for two different cameras. When I click on "Test" from NetHDD, I now get an error:

Mounting to NAS server failed. Invalid directory or incorrect user name/password.

In the prior release of FreeNAS, I updated setting for SMB for Auxiliary parameters to: ntlm auth = yes
I've tried to restart everything (server and camera) a few times but no luck Has anyone had problems with SMB shares with this release?

Cameras: Hikvision DS-2CD2142FWD-I
Camera Firmware: V5.5.5 build 180111
FreeNAS: 11.2-BETA2
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
I use NFS for my cameras.
It is much more reliable than SMB

FN 11.2-BETA2 is test software and not for production use.
 

diedrichg

Wizard
Joined
Dec 4, 2012
Messages
1,319

happ104610

Cadet
Joined
Jan 2, 2018
Messages
2
I use NFS for my cameras.
It is much more reliable than SMB

FN 11.2-BETA2 is test software and not for production use.

Thank you for this tip! I just changed both cameras over to NFS... that was easy and much easier to setup than SMB. I'm am curious though, my current FreeNAS train was set for 11.2-STABLE. I saw in the GUI that there was an update available so I applied it, how did I get a beta?


Thanks for the link! I would imagine this is going to be an issue with a lot of devices.
 

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
I'm in a bind now... NFS keeps showing "Failed to mount NAS server directory. No Permission" on my Camera setup.

EDIT: Went to the shell and chmod 777 the specific directory for this camera.

I have created an explicit NFS mount of the exact file path and given the camera IP access to it.

EDIT: So now the connection works!

So in other words, the camera gets the IP of the FreeNAS and the File Path such as /mnt/Media/Cameras/Front and then NFS is picked (no user or password). Saved. Test yields the error yet I have an NFS share given to /mnt/Media/Camera/Front.

EDIT: But now even if I test the NFS connection from camera software and test is successful, the HDD management says "offline" for the NAS.

Any idea what gives?
 
Last edited:

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
I'm in a bind now... NFS keeps showing "Failed to mount NAS server directory. No Permission" on my Camera setup.

I have created an explicit NFS mount of the exact file path and given the camera IP access to it.

So in other words, the camera gets the IP of the FreeNAS and the File Path such as /mnt/Media/Cameras/Front and then NFS is picked (no user or password). Saved. Test yields the error yet I have an NFS share given to /mnt/Media/Camera/Front.

Any idea what gives?

my setting is:
my FN is 11.1-U7 and I use NFS v3 for IP camera Hickvision

at the share
check if you checkbox at All Directories is ON
mapall user = nobody
mapall group = nobody

and at services NFS serve UDP client must be ON

and working
cheers
 

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
Thanks.. but would you believe a reboot of the camera then came back with uninitialized and then a format worked?
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
Thanks.. but would you believe a reboot of the camera then came back with uninitialized and then a format worked?

reset to factory default is good to do if you make many changes on settings cameras
firmware update is a MUST (resolv many problem)
and try again
maybe some reading of documentation of FreeNAS help
 

marcevan

Patron
Joined
Dec 15, 2013
Messages
432
Sorry Dan,

Just a reboot of the camera, plain and simple; never apply a firmware update unless you have an issue that it documents it will fix. Could not disagree more with "MUST".

IP Cameras are way outside of the purview of FreeNAS documentation, btw.
 

pawelfi

Cadet
Joined
Jul 15, 2020
Messages
3
Hello,
I have that same cameras and FreeNAS 11.3 installed, I did all with instructions:
checkbox at All Directories is ON
mapall user = nobody
mapall group = nobody
services NFS serve UDP client must be ON
And I can see storage NFS in Camera setup, I see that its not formated. I can do format, then it shows all 150GB storage, I make Save....
And going back to setup of camera I see "unformatted again"
Reboot of NAS or Camera do not change anything.

What can else be done here?
 

pawelfi

Cadet
Joined
Jul 15, 2020
Messages
3
Still nothing. This is sometthing with zfs volume. I run centos server nfs with dedicated lvm. If its xfs i got that same issue. When i format it with ext4 it works with camera as it should
 

cskavanko

Cadet
Joined
Nov 20, 2018
Messages
7
Guys, I have finally managed to set it up!!!!!!!!! Here's what I did. Haven't tested yet what happens if I lose connectivity to NAS or restart camera, but for now it is up and running without the annoying "failed error", "permission error" and so on... Here's what I did (TRUENAS 12)
1. Go to Services, then SMB Configure, then check "enable SMB1 support" and "NTLMv1 Auth" THE LAST ONE IS REALLY IMPORTANT. I THINK THIS WAS THE CULPRIT!!!
2. Create your dataset
3. Create user (e.g. camera) with password, but don't assign him any permissions or dirs, just click on SUBMIT
4. Go to Storage, then Pools, then 3dots :D. Then select your newly created user "camera" for user and group and check the two checkboxes (apply user & apply group). Then check "apply permissions recursively" and "apply permissions to child datasets", then click on SAVE
5. Go to Storage, Pools, 3dots "user quotas" REALLY IMPORTANT SELECT USER CAMERA AND SET HIM QUOTA E.G. 100 GB
6. Create Smb share as usual, just click on add, then select your dir.
7. Go to Hikvision interface and fill in your server IP address, username, password and " \"your sharename" " THE BACKSLASH IS REALLY IMPORTANT!!! JUST TYPE "\" FOLLOWED BY YOUR SHARENAME (not the full dir location)
8. Click on test, then save

Hope it won't break again!!! It is working for now!!!
 

cskavanko

Cadet
Joined
Nov 20, 2018
Messages
7
P.S. Tried everything I found on the web for NFS, but problem still the same. SMB WORKS, THOUGH!!!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You may have a much better time running the zoneminder plugin and using that to manage your hikvision camera recording natively on the zfs pool.
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
hello
in this moment I have 5 hikvision camera recording on my FreeNAS 11.3 U5 from internet (other location) on NFS share
and a hikvision DVR recording an the same in LAN on NFS share

and I make test with Shinobi software (on a test system TrueNAS 12) in a jail with "native" storage on NAS
and a test with Shinobi on TrueNAS Scale in system/Debian not Docker/VM or other thing
work well and keep trying to move/go with this software (have HW encoding/decoding with CUDA and face recognition, Plate recognition. etc.)
 

cskavanko

Cadet
Joined
Nov 20, 2018
Messages
7
You may have a much better time running the zoneminder plugin and using that to manage your hikvision camera recording natively on the zfs pool.

Before I succeed with SMB settings, I set up ZoneMinder plugin and the corresponding ZmNinja android app. I also had some troubles, but at last managed to run them properly. ZM was working fine, rocksolid, but it doesn't support h.265 coding, CPU intensive, too.
P.S. I can confirm, that my SMB settings successfully survived after NAS power loss/restart or after camera restart!!!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Top