免费注册 查看新帖 |

Chinaunix

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

[FastDFS] Wty:解决一个问题 [复制链接]

论坛徽章:
4
2015年辞旧岁徽章
日期:2015-03-03 16:54:152015年迎新春徽章
日期:2015-03-04 09:56:11IT运维版块每日发帖之星
日期:2016-08-11 06:20:00IT运维版块每日发帖之星
日期:2016-08-15 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-21 09:51 |只看该作者 |倒序浏览
Wty:我用一台freebsd6的机器 tracker和storage同时启动 然后客户端调用存取正常
现在用了五台机器
准备96 和97 两台做tracker 我telnet了一下这两个22122端口都正常 这两天没有启动storage
98,99,100三台做storage 用test测试upload 和delete操作均正常

然后我用java客户端提取getStoreStorage fail, error code: 2 出错

fdfs_client 配置文件如下

network_timeout = 200
charset = ISO8859-1

tracker_server = 192.168.1.96:22122
tracker_server = 192.168.1.97:22122

tracker配置文件如下(96.97两台一样)

disabled=false
bind_addr=
port=22122
network_timeout=30
base_path=/data/fastdfs
max_connections=1024

#0: round robin
#1: specify group
#2: load balance
store_lookup=0

#when store_lookup set to 1, must set store_group to the group name
store_group=group1

#reserved storage space for system or other applications.
#if the free(available) space of any stoarge server in
file "/data/fastdfs/tracker.conf", 52 line

storage配置文件如下(98,99,100三台一样)

disabled=false
group_name=group1
bind_addr=
port=23000
network_timeout=20
heart_beat_interval=30
stat_report_interval=60
base_path=/data/fastdfs
sync_wait_msec=200
max_connections=1024

# tracker_server can ocur more than once, and tracker_server format is
#  "host:port", host can be hostname or ip address
tracker_server=192.168.1.96:22122
tracker_server=192.168.1.97:22122

#standard log level as syslog, case insensitive, value list:
file "/data/fastdfs/storage.conf", 42 lines


happy_fish100:FastDFS server端和java client API的版本分别是多少呢。
建议都升级到最新版本吧,Server为V1.9,Java客户端为V1.2。
另外,出现这个错误后,可以查一下2台tracker server上的日志/data/fastdfs/logs/tracker.log

Wty:换成1.2版的api
可以正常的使用了

Wty:机器重启后怎么自动加载程序

happy_fish100:将启动命令行加入到/etc/rc.local中即可
注意,命令行中的文件名一定要写成绝对路径方式。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP