- 论坛徽章:
- 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 老是有这行错误日志,百度下几乎都说:服务器的并发连接数超过了其承载量,服务器会将其中一些连接Down掉,防火墙什么的都关闭了。设置了
max_connections=256选项也不管用,能告知下该怎么解决吗?
|
|