- 论坛徽章:
- 0
|
本帖最后由 wp00000008 于 2010-02-22 18:02 编辑
TrackerGroup tg = new TrackerGroup(new InetSocketAddress[]{new InetSocketAddress("192.168.100.68", 22122)});
TrackerClient tc = new TrackerClient(tg);
TrackerServer ts = tc.getConnection();
StorageServer ss = tc.getStoreStorage(ts);
StorageClient1 sc1 = new StorageClient1(ts, ss);
fileid = sc1.upload_file1("c:/a.txt", "txt", meta_list); //此行异常
System.out.println("Upload local file "+item+" ok, fileid="+fileid);
以上是代码片段,上传出现java.net.ConnectException: Connection refused: connect异常
服务器tracker和storage正常运行,检查storage日志,无状况。
检查tracker日志,信息如下:
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection reset by peer
[2010-02-22 16:59:56] ERROR - file: tracker_service.c, line: 1593, client ip: , send data fail, errno: 104, error info: Connection r
storage日志如下:
[2010-02-22 16:36:51] INFO - FastDFS v1.25, base_path=/root/chengsj/fastdfs/group0, store_path_count=1, subdir_count_per_path=256, group_name=group1, network_timeout=60s, port=23000, bind_addr=, client_bind=1, max_connections=5, heart_beat_interval=30s, stat_report_interval=60s, tracker_server_count=1, sync_wait_msec=200ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time: 23:59, allow_ip_count=-1, file_distribute_path_mode=0, file_distribute_rotate_count=100, fsync_after_written_bytes=0, sync_log_buff_interval=10s, sync_binlog_buff_interval=60s, thread_stack_size=512 KB, upload_priority=10, check_file_duplicate=0, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0
[2010-02-22 16:36:52] INFO - file: storage_param_getter.c, line: 225, storage_ip_changed_auto_adjust=1
[2010-02-22 16:36:52] INFO - file: tracker_client_thread.c, line: 257, successfully connect to tracker server 127.0.0.1:22122, as a tracker client, my ip is 127.0.0.1
服务器:FastDFS_v1.25
客户端:fastdfs_client_v1.12.jar |
|