- 论坛徽章:
- 0
|
前言:
155,160两台机器同组group2。
17是开发机器,也是本地上传图片的java客户端。
一:第一遍测试
1、java客户端上传文件到group2
String fileIds = storageClient.upload_file1("group2",local_filename, null,nvp);
返回: group2/M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg
2、根据Java解析出源ip地址
storageClient.get_file_info("group2", "M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg");
得到ip是192.168.20.155。
3、访问http://192.168.20.155:8888/group ... QgA0bEQAADnI516.jpg
访问返回:400 Bad Request
access.log
192.168.30.17 - - [24/Jun/2013:16:13:12 +0800] "GET /group2/M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg HTTP/1.1" 400 172 "-" "Mozilla/5.0 (Windows NT 5.1;
rv:21.0) Gecko/20100101 Firefox/21.0"
192.168.20.155 - - [24/Jun/2013:16:13:12 +0800] "GET /group2/M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg?redirect=1 HTTP/1.0" 400 172 "-" "Mozilla/5.0 (Windows
NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0"
error.log
[2013-06-24 16:13:12] WARNING - file: /usr/local/fastdfs-nginx-module/src//common.c, line: 896, redirect again, url:
/group2/M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg?redirect=1
4、访问http://192.168.20.160:8888/group ... QgA0bEQAADnI516.jpg
访问OK
access.log
192.168.30.17 - - [24/Jun/2013:16:15:59 +0800] "GET /group2/M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg HTTP/1.1" 200 14768 "-" "Mozilla/5.0 (Windows NT 5.1;
rv:21.0) Gecko/20100101 Firefox/21.0"
error.log
没有问题!
二:第二遍测试
重复1-4操作!
1:
group2/M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg
2:
解析得到ip:192.168.20.160
3:
访问
http://192.168.20.155:8888/group ... QgA0pgwAADnI976.jpg
access.log
192.168.30.17 - - [24/Jun/2013:16:19:53 +0800] "GET /group2/M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg HTTP/1.1" 200 14768 "-" "Mozilla/5.0 (Windows NT 5.1;
rv:21.0) Gecko/20100101 Firefox/21.0"
4:
访问
http://192.168.20.160:8888/group ... QgA0pgwAADnI976.jpg
access.log
192.168.20.155 - - [24/Jun/2013:16:20:19 +0800] "GET /group2/M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg?redirect=1 HTTP/1.0" 200 14768 "-" "Mozilla/5.0
(Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0"
192.168.30.17 - - [24/Jun/2013:16:20:30 +0800] "GET /group2/M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg HTTP/1.1" 200 14768 "-" "Mozilla/5.0 (Windows NT 5.1;
rv:21.0) Gecko/20100101 Firefox/21.0"
|
|