免费注册 查看新帖 |

Chinaunix

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

[FastDFS] FastDFS 支持跨网上传文件吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-05-15 10:39 |只看该作者 |倒序浏览
请问我的 client 和 fastDFS 不在同一个网内,storage 和 tracker 都在同一个网,可以通过 client 向 FastDFS 上传文件到 storage 上吗?

论坛徽章:
0
2 [报告]
发表于 2014-05-15 10:42 |只看该作者
可以的,的,的,的,的

论坛徽章:
0
3 [报告]
发表于 2014-05-15 10:48 |只看该作者
请问我该怎么配置呢?多谢

论坛徽章:
0
4 [报告]
发表于 2014-05-15 11:00 |只看该作者
回复 2# lifeblood

一下是启动 fdfs_test 上传一个 mp4 文件:
./fdfs_test /home/work/fastdfs/conf/client.conf upload /home/work/RS_DATA/event-video/1/0/2014-05-14/20140514182014-53734362e4b05ca4ea1fa2f7.mp4
This is FastDFS client test program v4.07

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 http://www.csource.org/
for more detail.

[2014-05-15 10:54:00] DEBUG - base_path=/home/work/fdfs_client, 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

tracker_query_storage_store_list_without_group:
        server 1. group_name=, ip_addr=10.130.66.68, port=23000

group_name=group0, ip_addr=10.130.66.68, port=23000
[2014-05-15 10:54:30] ERROR - file: ../common/connection_pool.c, line: 84, connect to 10.130.66.68:23000 fail, errno: 110, error info: Connection timed out

本身 client 端所在的局域网内网地址为 10.101.10.210 ,tracker 和 storage 在跑在同一台机器上,在另一个网,内网地址为 10.130.66.68
通过 tracker 返回的 storage 地址为内网地址, client 无法连接

请问我该怎么配置,能实现这种跨网的传输?  多谢各位大神指教

论坛徽章:
0
5 [报告]
发表于 2014-05-15 11:09 |只看该作者
回复 2# lifeblood


    连接 tracker 时,在 client.conf 配置文件里配置的是公网IP ,所以 client 可以连接上 tracker ,但 tracker 返回的是其内网 IP

试过在 storage.conf 配置公网 IP 的话,storage 无法启动,会报如下 ERROR:

[2014-05-15 10:00:46] ERROR - file: ../common/sockopt.c, line: 742, bind port 0 failed, errno: 99, error info: Cannot assign requested address.
[2014-05-15 10:00:46] ERROR - file: ../common/sockopt.c, line: 742, bind port 0 failed, errno: 99, error info: Cannot assign requested address.
[2014-05-15 10:00:46] INFO - file: storage_param_getter.c, line: 187, use_storage_id=0, id_type_in_filename=ip, storage_ip_changed_auto_adjust=1, store_path=0, reserved_storage_space=10.00%, use_trunk_file=0, slot_min_size=256, slot_max_size=16 MB, trunk_file_size=64 MB, trunk_create_file_advance=0, trunk_create_file_time_base=02:00, trunk_create_file_interval=86400, trunk_create_file_space_threshold=0 GB, trunk_init_check_occupying=0, trunk_init_reload_from_binlog=0, store_slave_file_use_link=0
[2014-05-15 10:00:46] INFO - file: storage_func.c, line: 174, tracker_client_ip: 10.130.66.68, my_server_id_str: 10.130.66.68, g_server_id_in_filename: 1145209354
[2014-05-15 10:00:46] ERROR - file: ../common/sockopt.c, line: 742, bind port 0 failed, errno: 99, error info: Cannot assign requested address.
[2014-05-15 10:00:46] ERROR - file: ../common/sockopt.c, line: 742, bind port 23000 failed, errno: 99, error info: Cannot assign requested address.
[2014-05-15 10:00:46] CRIT - exit abnormally!

论坛徽章:
0
6 [报告]
发表于 2014-05-15 16:55 |只看该作者
请问鱼大和各位,怎么跨网传文件呀?

论坛徽章:
0
7 [报告]
发表于 2014-05-16 12:41 |只看该作者
网络拓补都不说清楚 大家怎么回答你呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP