免费注册 查看新帖 |

Chinaunix

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

[FastDFS] fastDFS使用怪现象,实在找不到答案,跪求!!! [复制链接]

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-04-08 06:20:00IT运维版块每日发帖之星
日期:2016-05-26 06:20:00
1 [报告]
发表于 2016-04-01 10:35 |显示全部楼层
大哥,你这个问题我还没有遇到,因为我的上传还没有成功。。我查不到,你可以帮我看一下吗?
各软件版本:
libfastcommon-master
FastDFS V5.05
fastfdfs_nginx_module_master
nginx V1.9.1(后来换成了ngx_openresty-1.7.10.1)

[root@localhost fdfs]# ls
a.txt        http.conf   mod_fastdfs.conf  tracker.conf
client.conf  mime.types  storage.conf

[root@localhost fdfs]# fdfs_upload_file client.conf a.txt
[2016-04-01 10:11:33] ERROR - file: tracker_proto.c, line: 37, server: 192.168.1.9:23000, recv data fail, errno: 107, error info: Transport endpoint is not connected
upload file fail, error no: 107, error info: Transport endpoint is not connected
[root@localhost fdfs]#

配置文件应该没有问题的,我看了好几遍。第一次装的时候上传成功了,但是第二天我又上传它就报错了,而且根据a.txt的内容不一样 ,报错也不一样:

[root@localhost fdfs]# fdfs_upload_file client.conf a.txt
[2016-04-01 10:10:59] ERROR - file: tracker_proto.c, line: 48, server: 192.168.1.9:23000, response status 22 != 0
upload file fail, error no: 22, error info: Invalid argument

storage日志如下:
[2016-04-01 09:51:46] ERROR - file: ../common/sockopt.c, line: 616, bind port 23000 failed, errno: 98, error info: Address already in use.
[2016-04-01 10:10:59] ERROR - file: storage_service.c, line: 1425, client ip: 192.168.1.9, pkg length is not correct, invalid file bytes: 8392585448953743978
[2016-04-01 10:11:33] ERROR - file: storage_service.c, line: 1425, client ip: 192.168.1.9, pkg length is not correct, invalid file bytes: 8392585448953743978

我昨天没关机,它竟然报端口被占用
这个是空文件上传报错日志:
[2016-03-31 19:33:48] ERROR - file: storage_service.c, line: 1373, cmd=11, client ip: 192.168.1.9, package size 15 is not correct, expect length >= 23
[2016-03-31 19:36:09] ERROR - file: storage_service.c, line: 1425, client ip: 192.168.1.9, pkg length is not correct, invalid file bytes: 8392585448953743978

我想也许和nginx的安装有关吧,我是采用的fdfs + nginx_module + nginx 来装的,安装过程没有报任何错(应该说都解决了),可是nginx无论如何都启动不了,报错如下:
刚刚确认了以下:
[root@localhost logs]#  /usr/local/openresty/nginx/sbin/nginx
/usr/local/openresty/nginx/sbin/nginx: symbol lookup error: /usr/local/openresty/nginx/sbin/nginx: undefined symbol: g_fdfs_base_path

上面这个我是用openresty nginx +lua包安装的,之前单独用nginx源码包安装,启动也报这个错,google后面这个参数都搜不到信息。。
难道和我之前用yum install 安装过nginx 有关吗?可是我已经卸载,但是留了一个启动文件在 /etc/init.d/nginx ,然后直接用
systemctl start nginx 可以启动成功。。。我真是凌乱了。昨天都不能的

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-04-08 06:20:00IT运维版块每日发帖之星
日期:2016-05-26 06:20:00
2 [报告]
发表于 2016-04-05 10:27 |显示全部楼层
这是storage.log  的信息
[2016-04-05 09:56:42] INFO - file: storage_param_getter.c, line: 225, storage_ip_changed_auto_adjust=1
[2016-04-05 09:56:42] INFO - file: tracker_client_thread.c, line: 257, successfully connect to tracker server 192.168.1.9:22122, as a tracker client, my ip is 192.168.1.9
[2016-04-05 10:00:14] ERROR - file: storage_service.c, line: 1425, client ip: 192.168.1.9, pkg length is not correct, invalid file bytes: 7669743415109681112

第二行已经显示链接成功了,仅仅是tracker 链接成功? 和client 链接成功?只有这么多信息了,是storage.conf 的配置问题吗?

另外看到一个问题:tracker.log 显示的是     INFO - FastDFS v1.27  可我明明装的是5.08了,奇怪啊

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-04-08 06:20:00IT运维版块每日发帖之星
日期:2016-05-26 06:20:00
3 [报告]
发表于 2016-04-05 11:13 |显示全部楼层
我用fdfs_test client.conf upload 仓鼠1.jpg 上传好像成功了:

[root@localhost fdfs]# fdfs_test client.conf upload 仓鼠1.jpg
This is FastDFS client test program v1.27

Copyright (C) 2008, Happy Fish / YuQing

FastDFS may be copied only under the terms of the GNU General
Public License V3, which may be found in the FastDFS source kit.
Please visit the FastDFS Home Page
for more detail.

base_path=/data/fdfs, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0
group_name=group1, ip_addr=192.168.1.9, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/wKgBCVcDK-kAAAAAAAAcyhXliqg768.jpg
source ip address: 192.168.1.9
file timestamp=2016-04-05 11:07:21
file size=7370
file url: http:、、192.168.1.9/group1/M00/00/00/wKgBCVcDK-kAAAAAAAAcyhXliqg768.jpg
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/wKgBCVcDK-kAAAAAAAAcyhXliqg768_big.jpg
source ip address: 192.168.1.9
file timestamp=2016-04-05 11:07:21
file size=7370
file [url]http:、、192.168.1.9/group1/M00/00/00/wKgBCVcDK-kAAAAAAAAcyhXliqg768_big.jpg

但是在浏览器里输入这个地址,得到400 bad Request  
请问这是怎么回事,到底上传成功了吗?
V5.08是否是自带php扩展,如果我用java-client 可以吗

论坛徽章:
2
IT运维版块每日发帖之星
日期:2016-04-08 06:20:00IT运维版块每日发帖之星
日期:2016-05-26 06:20:00
4 [报告]
发表于 2016-04-05 13:41 |显示全部楼层
更神奇的事情发生了。。。
之前使用 fdfs_trackerd tracker.conf  和 fdfs_storaged storage.conf 来启动服务,然后用 fdfs_upload_file client.conf xxx.xxx 上传,报错,说连接失败
刚才我换了一种方式: 直接 service fdfs_trackerd start 和 service fdfs_storaged start 。。。再用上面的方法上传就成功了!
你说奇不奇怪??

可是虽然上传成功,还是无法在浏览器访问,同样是400 bad Request
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP