免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2219 | 回复: 4
打印 上一主题 下一主题

[FastDFS] 4.06上传后访问的问题,求大神解决! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-06-24 16:28 |只看该作者 |倒序浏览
前言:

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"









论坛徽章:
0
2 [报告]
发表于 2013-06-24 16:38 |只看该作者
开启了trunk。

155
binlog
1372060005 C M00/01/53/wKgUm1HH-WWIRde4AAA5sKEehsUAAAAQgAz-LQAADnI736.jpg
1372060006 C M00/01/53/wKgUm1HH-WWIRde4AAA5sKEehsUAAAAQgAz-LQAADnI736.jpg-m
1372060933 c M00/01/53/wKgUoFHH_QWIfdvhAAA5sKEehsUAAAAQgA0MnwAADnI039.jpg
1372060933 c M00/01/53/wKgUoFHH_QWIfdvhAAA5sKEehsUAAAAQgA0MnwAADnI039.jpg-m
1372061522 C M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg
1372061522 C M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg-m
1372061945 c M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg
1372061945 c M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg-m

160
binlog
1372060005 c M00/01/53/wKgUm1HH-WWIRde4AAA5sKEehsUAAAAQgAz-LQAADnI736.jpg
1372060006 c M00/01/53/wKgUm1HH-WWIRde4AAA5sKEehsUAAAAQgAz-LQAADnI736.jpg-m
1372060933 C M00/01/53/wKgUoFHH_QWIfdvhAAA5sKEehsUAAAAQgA0MnwAADnI039.jpg
1372060933 C M00/01/53/wKgUoFHH_QWIfdvhAAA5sKEehsUAAAAQgA0MnwAADnI039.jpg-m
1372061522 c M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg
1372061522 c M00/01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg-m
1372061945 C M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg
1372061945 C M00/01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg-m

论坛徽章:
0
3 [报告]
发表于 2013-06-24 16:42 |只看该作者
155:
[root@wzcp-test data]# ls 01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg
ls: 无法访问01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg: 没有那个文件或目录
[root@wzcp-test data]# ls 01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg
ls: 无法访问01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg: 没有那个文件或目录
160:
[root@caitong-oss-test data]# ls 01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg
ls: 无法访问01/53/wKgUm1HH_1KIW9ZwAAA5sKEehsUAAAAQgA0bEQAADnI516.jpg: 没有那个文件或目录
[root@caitong-oss-test data]# ls 01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg
ls: 无法访问01/53/wKgUoFHIAPmIAFiGAAA5sKEehsUAAAAQgA0pgwAADnI976.jpg: 没有那个文件或目录

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
4 [报告]
发表于 2013-06-25 09:24 |只看该作者
上传后,就有一个时间差的,他需要同步!

论坛徽章:
0
5 [报告]
发表于 2013-06-25 09:44 |只看该作者
是的,同步需要时间,但是过了1天了,还是不能访问。。。你明白么
回复 4# badb0y


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP