tracker服务器的问题
本帖最后由 coco520 于 2010-09-14 15:21 编辑
1.我搭建了一个fastdfs系统,使用了两台tracker服务器,在client.conf里配置了这个两台服务器
tracker_server=xxx.xxx.xxx.28:22122
tracker_server=xxx.xxx.xxx.29:22122
为什么每次我执行php fastdfs_test.php时fastdfs_tracker_get_connection()都是返回xxx.xxx.xxx.29这台机器,对tracker的连接不是round robin的吗?
2.另外我查看了一下这两台tracker服务器的data下的storage_servers.dat文件,发现同一个storage server在两台tracker里的状态不一致,一个是5,一个是7
3.我在group中新加了一台storage server,可是过了将近一天了,它的状态还是2,不知道是否正常?
麻烦fish兄解答一下,不胜感激。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我给楼主遇到同样的问题
新加的storage server的状态SYNCING
/usr/local/bin/fdfs_monitor /etc/fdfs/storage.conf
[2014-06-30 17:54:55] DEBUG - base_path=/fdfs/storage, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0
server_count=1, server_index=0
tracker server is 10.2.180.193:22122
group count: 1
Group 1:
group name = group1
disk total space = 13793 MB
disk free space = 5662 MB
trunk free space = 0 MB
storage server count = 2
active server count = 1
storage server port = 23000
storage HTTP port = 8888
store path count = 1
subdir count per path = 256
current write server index = 0
current trunk file id = 0
Storage 1:
id = 10.2.180.194
ip_addr = 10.2.180.194 ACTIVE
http domain =
version = 5.01
join time = 2014-06-26 15:05:44
up time = 2014-06-30 15:26:22
total storage = 13793 MB
free storage = 5662 MB
upload priority = 10
store_path_count = 1
subdir_count_per_path = 256
storage_port = 23000
storage_http_port = 8888
current_write_path = 0
source storage id=
if_trunk_server= 0
total_upload_count = 442342
success_upload_count = 442342
total_append_count = 0
success_append_count = 0
total_modify_count = 0
success_modify_count = 0
total_truncate_count = 0
success_truncate_count = 0
total_set_meta_count = 4
success_set_meta_count = 4
total_delete_count = 439336
success_delete_count = 439336
total_download_count = 0
success_download_count = 0
total_get_meta_count = 0
success_get_meta_count = 0
total_create_link_count = 0
success_create_link_count = 0
total_delete_link_count = 0
success_delete_link_count = 0
total_upload_bytes = 9317029856
success_upload_bytes = 9317029856
total_append_bytes = 0
success_append_bytes = 0
total_modify_bytes = 0
success_modify_bytes = 0
stotal_download_bytes = 0
success_download_bytes = 0
total_sync_in_bytes = 0
success_sync_in_bytes = 0
total_sync_out_bytes = 0
success_sync_out_bytes = 0
total_file_open_count = 442342
success_file_open_count = 442342
total_file_read_count = 0
success_file_read_count = 0
total_file_write_count = 442342
success_file_write_count = 442342
last_heart_beat_time = 2014-06-30 17:54:43
last_source_update = 2014-06-30 15:29:45
last_sync_update = 1970-01-01 08:00:00
last_synced_timestamp = 1970-01-01 08:00:00
Storage 2:
id = 10.2.180.53
ip_addr = 10.2.180.53 SYNCING
http domain =
version = 5.01
join time = 2014-06-30 10:31:16
up time = 2014-06-30 17:46:48
total storage = 13793 MB
free storage = 5763 MB
upload priority = 10
store_path_count = 1
subdir_count_per_path = 256
storage_port = 23000
storage_http_port = 8080
current_write_path = 0
source storage id= 10.2.180.194
if_trunk_server= 0
total_upload_count = 0
success_upload_count = 0
total_append_count = 0
success_append_count = 0
total_modify_count = 0
success_modify_count = 0
total_truncate_count = 0
success_truncate_count = 0
total_set_meta_count = 0
success_set_meta_count = 0
total_delete_count = 0
success_delete_count = 0
total_download_count = 0
success_download_count = 0
total_get_meta_count = 0
success_get_meta_count = 0
total_create_link_count = 0
success_create_link_count = 0
total_delete_link_count = 0
success_delete_link_count = 0
total_upload_bytes = 0
success_upload_bytes = 0
total_append_bytes = 0
success_append_bytes = 0
total_modify_bytes = 0
success_modify_bytes = 0
stotal_download_bytes = 0
success_download_bytes = 0
total_sync_in_bytes = 0
success_sync_in_bytes = 0
total_sync_out_bytes = 0
success_sync_out_bytes = 0
total_file_open_count = 0
success_file_open_count = 0
total_file_read_count = 0
success_file_read_count = 0
total_file_write_count = 0
success_file_write_count = 0
last_heart_beat_time = 2014-06-30 17:54:38
last_source_update = 1970-01-01 08:00:00
last_sync_update = 1970-01-01 08:00:00
last_synced_timestamp = 1970-01-01 08:00:00 (never synced)
回复 3# coco520
1.我搭建了一个fastdfs系统,使用了两台tracker服务器,在client.conf里配置了这个两台服务器
tracker_server=xxx.xxx.xxx.28:22122
tracker_server=xxx.xxx.xxx.29:22122
为什么每次我执行php fastdfs_test.php时fastdfs_tracker_get_connection()都是返回xxx.xxx.xxx.29这台机器,对tracker的连接不是round robin的吗?
A:连接tracker server,客户端实现的round robin,所以你说的这个现象不难理解了。
B: 我的意思就是如果客户端自己做round robin的话,为啥每次都返回29这台机器,应该是28和29轮流啊?
C:客户端连接tracker server每次执行都是从索引号0开始轮流的,所以。。。
3.我在group中新加了一台storage server,可是过了将近一天了,它的状态还是2,不知道是否正常?
A:这个group中总共有几台storage server呢?你用fdfs_monitor查看一下各台storage server的状态,可以反复执行多次。
fdfs_monitor随机连接一台tracker server的,这样可以看到storage server的状态是否正常。
B:用fdfs_monitor看了,始终是syncing
C:如果这台新storage server的源storage server是ACTIVE状态,不应该一直是syncing这个状态啊。
请贴一下fdfs_monitor的完整输出,谢谢!
回复 2# happy_fish100
首先非常感谢版主的细心回答,还有点问题,还要麻烦下
1.我搭建了一个fastdfs系统,使用了两台tracker服务器,在client.conf里配置了这个两台服务器
tracker_server=xxx.xxx.xxx.28:22122
tracker_server=xxx.xxx.xxx.29:22122
为什么每次我执行php fastdfs_test.php时fastdfs_tracker_get_connection()都是返回xxx.xxx.xxx.29这台机器,对tracker的连接不是round robin的吗?
A:连接tracker server,客户端实现的round robin,所以你说的这个现象不难理解了。
B: 我的意思就是如果客户端自己做round robin的话,为啥每次都返回29这台机器,应该是28和29轮流啊?
2.另外我查看了一下这两台tracker服务器的data下的storage_servers.dat文件,发现同一个storage server在两台tracker里的状态不一致,一个是5,一个是7
A:不要看这个数据文件,数据文件中的状态信息不及时,不是准确的。你通过monitor来查看storage server状态好了。
或者你可以killall -USR1 fdfs_trackerd,然后在logs目录下会生成全局变量的dump文件,你可以查看相应的dump文件。
B:使用monitor查看是一致的
3.我在group中新加了一台storage server,可是过了将近一天了,它的状态还是2,不知道是否正常?
A:这个group中总共有几台storage server呢?你用fdfs_monitor查看一下各台storage server的状态,可以反复执行多次。
fdfs_monitor随机连接一台tracker server的,这样可以看到storage server的状态是否正常。
B:用fdfs_monitor看了,始终是syncing
回复 1# coco520
1.我搭建了一个fastdfs系统,使用了两台tracker服务器,在client.conf里配置了这个两台服务器
tracker_server=xxx.xxx.xxx.28:22122
tracker_server=xxx.xxx.xxx.29:22122
为什么每次我执行php fastdfs_test.php时fastdfs_tracker_get_connection()都是返回xxx.xxx.xxx.29这台机器,对tracker的连接不是round robin的吗?
A:连接tracker server,客户端实现的round robin,所以你说的这个现象不难理解了。
2.另外我查看了一下这两台tracker服务器的data下的storage_servers.dat文件,发现同一个storage server在两台tracker里的状态不一致,一个是5,一个是7
A:不要看这个数据文件,数据文件中的状态信息不及时,不是准确的。你通过monitor来查看storage server状态好了。
或者你可以killall -USR1 fdfs_trackerd,然后在logs目录下会生成全局变量的dump文件,你可以查看相应的dump文件。
3.我在group中新加了一台storage server,可是过了将近一天了,它的状态还是2,不知道是否正常?
A:这个group中总共有几台storage server呢?你用fdfs_monitor查看一下各台storage server的状态,可以反复执行多次。
fdfs_monitor随机连接一台tracker server的,这样可以看到storage server的状态是否正常。