FTP configuration error with Hikvision DS-2CD2032-I

scottkeen

n3wb
Mar 9, 2015
2
0
Hi, I'm new here, hope I can get some help.

I have Hikvision DS-2CD2032-I cameras and am having trouble configuring FTP with my server.

I get the error message popup, "Failed to connect the test server" when clicking the Test button.

I am able to connect to my FTP server with FileZilla just fine, and in fact can see that Hikvision has created the parent and child folders on the FTP server. I had to set FileZilla to "Active transfer mode" (instead of Passive transfer mode) in order to connect.


What could be reason why the Hikvision can connect to my FTP server, create the parent and child folders on my FTP server, yet give the "Failed to connect the test server" error message?
 
Most likely the camera fed you the wrong error message. It happens when programmers get lazy :)

I have a guess about what is wrong. First, I recommend you set the FTP server back to passive mode. With active mode, the FTP server must initiate connections to the client, which requires special setup in clientside firewalls, and as such active mode is almost never used by anyone. With passive mode, the client initiates all connections so only the server needs to have open ports. I guarantee Hikvision cameras support passive mode.

So, I suspect your FTP server's firewall has not opened all the necessary ports. Unfortunately, FTP is a strange protocol that requires more than one open port. Port 21 is only used for the "control" connection, which is what allows the camera to connect and create folders. But actual file transfers are done on separate connections that connect to different ports on the FTP server. Filezilla server's options should let you specify which ports you want to use for these data connections. You need to open the same ports in any firewalls on the server-side.
 
Thanks for pointing me in the right direction.

I can confirm that I needed to set my Windows Server 2008 FTP Server to Passive Mode.

If anyone is looking to do the same, here's the resources I used:

https://technet.microsoft.com/en-us/library/dd421710(v=ws.10).aspx
How To Enable Passive FTP Transfer Mode in Microsoft IIS Server When Windows Firewall is On?
https://www.gosquared.com/blog/fix-ftp-passive-mode-problems-on-amazon-ec2-instances

I'm hosting my server with Amazon AWS EC2, use your public IP as your firewall IP.

This was particularly helpful:
Restart of 'Microsoft FTP Service' required for port restriction to take effect
Having followed this article word for word, I was becoming frustrated as the ports weren't being limited, even after restarting the FTP Server through the IIS Manager GUI.

However, it turns out that restarting the FTP Server from the IIS Manager isn't sufficient - you need manually to restart the entire Microsoft FTP Service from the Administrative Tools > Services applet.

David Mc2
10/18/2010
 
Some of Microsoft's services are a little lacking, but I had no idea how bad the FTP service was! I always use filezilla server ...
 
This is really pathetic... FTP config does not support domain name and it will tell you test failed... However if you change it to IP address, it works like a charm. This is supposed to be fixed in 5.2.0 but still doesn't work in 5.3.6
 
I realise this is a pretty old thread but I am hoping somebody can help with my problem -

I have 4 IP Cameras - 2 x Hikvision, 1 x HiLook and 1 x Trendnet

For several years I have set FTP on these cameras to upload snapshots when motion is detected to my NAS. The NAS in question was a QNAP box. This system worked perfectly well. Unfortunately, the QNAP motherboard failed last week and I have replaced the box with a Synology NAS. Exactly as with the QNAP, I have set each IP camera up as an FTP User with read/write access to a dedicated, individual, shared folder.

This is working fine for 3 of the cameras.

The 4th Camera is a Hikvision DS-2CD2386G2-IU, firmware version V5.5.801 build 211105

No matter what I try, and I have tried many times believe me, when I set FTP up on this camera and press the "Test" button all I get is the message "Username or Password is Wrong". I can assure you that they are not wrong! Needless to say no snapshots from this camera are uploaded to the NAS.

I intend to try contacting Hikvision and Synology support but also hoping somebody here may have hit this issue and solved it.

Any ideas please?
 
No matter what I try, and I have tried many times believe me, when I set FTP up on this camera and press the "Test" button all I get is the message "Username or Password is Wrong". I can assure you that they are not wrong! Needless to say no snapshots from this camera are uploaded to the NAS.
What shows in the NAS access or general log for the test attempt?
 
Any ideas please?
It might be worth checking the result of an FTP access from a PC, to try to narrow down the cause.
This from a Linux PC to a QNAP NAS, to a share that Hikvision cameras drop files to for timelapse videos.
Code:
alastair@PC-I5 ~ $ ftp 192.168.1.201
Connected to 192.168.1.201.
220 NASFTPD Turbo station 1.3.6 Server (ProFTPD) [::ffff:192.168.1.201]
Name (192.168.1.201:alastair): IPcam
331 Password required for IPcam
Password:
230 User IPcam logged in
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
Remote directory: /
ftp>
 
Thanks for the replies. The FTP log on the Synology shows nothing at all when I try to connect using the "Test" button. I can see the history of the other cameras connecting and disconnecting in the log.

I can FTP into the camera folder on the NAS straight away using FileZilla, with user and password of the Camera, and upload files to it.

Using a PC I get:

Microsoft Windows [Version 10.0.19045.2364]
(c) Microsoft Corporation. All rights reserved.


ftp> open 192.168.1.25
Connected to 192.168.1.25.
220 NAS-Office1 FTP server ready.
200 OK, UTF-8 enabled
User (192.168.1.25:(none)): RearCam
331 Password required for RearCam.
Password:
230 User RearCam logged in.
ftp>

I have reset and re-booted the camera during my attempts but all to no avail.

I've tried making that folder accessible to anonymous user and tried connecting that way, but the camera returns the same "User name or password is wrong", even though the user is anonymous.

I'm stumped.
 
That sounds like it might be a bug in the firmware of the camera. But I'm guessing a bit.
It's not uncommon to get regressive bugs in these products.
 
SOLVED - see last edit at bottom


Well I submitted my support request to Hikvision on the 19th December. So far I have heard nothing from them. Is this typical of Hikvision "support"?

Further to my attempts above, I should add that the NAS logs show nothing at all when I get these "User Name or Password is wrong" errors - it's as though the camera is not even attempting to connect to the ftp server.

As a further test, I set up my router as an ftp server with a folder on a usb stick - Filezilla happily connects to this using the camera user credentials. The camera however, now returns the message "Failed to connect to test server" if I try to connect to it. At least that's different to "User name or password is wrong", but is completely useless as a help to understanding why it fails to connect.....

I have also tried at least 3 firmware versions, including the earliest and the latest, but to no avail.

However I decide to try another test - I still have a Windows Home Server 2011 running as a back up repository in my garage. I created a new user and shared folder for the FTP service running on that- and guess what? The camera connects to that using the same user name and password which fail to connect to the Synology NAS :oops:

This would be consistent (sort of) with it previously working with my QNAP NAS, which unfortunately suffered a motherboard failure. Hence the new Synology. The WHS 2011 doesn't run all the time so I can't just let that take on the FTP server role.

So it appears that this one camera out of the 4 I have will connect to some ftp servers but not to others, and I have absolutely no idea why that should be. :idk:


Update - that last test gave me a clue - I went into the Synology and under "TSL/SSL Profile Level" I found "Custom Settings" which let me set FTPS to "Old Backward Compatibility" - and that appears to fixed the problem :smash:
 
Last edited:
I recommend you set the FTP server back to passive mode. With active mode, the FTP server must initiate connections to the client, which requires special setup in clientside firewalls, and as such active mode is almost never used by anyone. With passive mode, the client initiates all connections so only the server needs to have open ports.
Hi, I'm new here, hope I can get some help.

I have Hikvision DS-2CD2032-I cameras and am having trouble configuring FTP with my server.

I get the error message popup, "Failed to connect the test server" when clicking the Test button.

I am able to connect to my FTP server with FileZilla just fine, and in fact can see that Hikvision has created the parent and child folders on the FTP server. I had to set FileZilla to "Active transfer mode" (instead of Passive transfer mode) in order to connect.


What could be reason why the Hikvision can connect to my FTP server, create the parent and child folders on my FTP server, yet give the "Failed to connect the test server" error message?


 
Last edited: