Q and A of FastDFS

Feedback


1. After start the tracker and storage services of FastDFS, view the communication of tracker and storage through fdfs_monitor commander, and find that the status of storage is offline, how to do?

A: View the log of tracker and storage. Confirm whether the service has a problem; if the log is normal, it may be delete the caches of tracker or storage, so the caches don't match; Close the tracker and storage services. Delete the data file in the base_path specified by tracker.conf and storage.conf. Then restart the service.

Notes: If the files in base_path of FastDHT, all tile set will be lost.

 

2. In distributed tiles, why the “No buffer space available (maximum connections reached?):connect” is appeared?

A: When you upload the tiles to the FastDFS, the occupied ports increase, so it will reach the limits of the ports. The above problem will be appeared. You could avoid it by the following ways:

Run "regedit.exe" to open the regedit, and find the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters". Add the "TcpTimedWaitDelay". The type is DWORD, and the value is 30; Add "MaxUserPort", the type is DWORD, value is 20000.

Run "vi /etc/sysctl.conf", and edit the file. Add the following content

net.ipv4.tcp_syncookies  = 1

net.ipv4.tcp_tw_reuse = 1

net.ipv4.tcp_tw_recycle =  1

net.ipv4.tcp_fin_timeout = 30

Then execute "/sbin/sysctl -p" to take effect the parameter.

 

3. After install FastDFS and FastDHT, why there are not fdfs_trackerd, fdfs_storaged and fdhtd in /usr/local/bin?

A: Because the libevent version is too low. Failed to compile FastDFS. Please check whether the version of libevent is 1.4.x or higher.

 

4.Start the fastDHT service, why it prompts "segment fault"?

A: Because the libdb-5.3.so depend of fdhtd does not install correctly. You can use the order ldd /usr/local/bin/fdhtd to view all dependent of fdhtd. If the libdb isn't the 5.3 version, you need to modify the symbolic link of libdb.so, pointing to the BDB 5.3 dynamical library.

Notes: libdb.so in different operating system has different locations. If the results of ldd /usr/local/bin/fdhtd are libdb-4.7.so => /usr/lib/libdb-4.7.so, it needs to create symbol link in /usr/lib/ directory. If the result is libdb-4.7.so => /lib64/libdb-4.7.so, it needs to create 5.3 symbolic link in /lib64 directory.

 

5.FastDFS and FastDHT services are normal. But failed to add the tile task. View the iserver.log of debug. The log displays that when upload tileset_names to FastDFS, an MyException thrown: getStoreStorage fail, errno code: 28", why?

A: The error code 28 represents No space left on device. FastDFS can set the reserved_storage_sapce parameter in the tracker.conf configuration file, namely, the reserved storage space. Default is 10%. If the value is less than this setting, it will appear the 28 error.