- 論壇徽章:
- 2
|
public class TestDownload_smith {
public static void main(String[] args) throws Exception{
String classPath = new File(TestDownload_smith.class.getResource("/").getFile()).getCanonicalPath();
String configFilePath = classPath + File.separator + "fdfs_client.conf";
ClientGlobal.init(configFilePath);
TrackerClient trackerClient = new TrackerClient();
TrackerServer trackerServer = trackerClient.getConnection();
StorageServer storageServer = null;
StorageClient storageClient = new StorageClient(trackerServer, storageServer);
storageClient.download_file("group1", "M00/00/00/wKgH7VSSPNCAMkfNAAl5WLU-YRY839.jpg", "c1.jpg");
}
}
[2014-12-18 10:33:30] ERROR - file: tracker_nio.c, line: 254, client ip: 192.168.2.130, recv failed, errno: 104, error info: Connection reset by peer
能正常下載,但是trackerd.log 老是有這行錯誤日志,百度下幾乎都說:服務器的并發(fā)連接數(shù)超過了其承載量,服務器會將其中一些連接Down掉,防火墻什么的都關閉了。設置了
max_connections=256選項也不管用,能告知下該怎么解決嗎?
|
|