免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5010 | 回复: 3

[FastDFS] FastDFS上传的文件http无法下载--急 [复制链接]

论坛徽章:
0
发表于 2016-03-08 19:14 |显示全部楼层
我安装的是 FastDFS_v5.02.tar.gz ,安装成功后用代码上传和下载都没有问题,但是上传后的代码无法用http方式请求下载文件,

安装成功后,FastDFS的配置文件在%FastDFS%/conf目录下,其中包括
client.conf    客户端上传配置文件
storage.conf    文件存储服务器配置文件
tracker.conf    负责均衡调度服务器配置文件
http.conf        http服务器配置文件

有的文章业有说修改ect/fdfs下面的这些文件。我修改的是conf下的。

有些参考文章中说要修改tracker.conf 中的
http.disabled=false  还要把include前面的##改成#,但是我发现在这个版本中没有这个参数。

最后测试上传成功:
This is FastDFS client test program v5.02

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.

[2016-03-08 18:24:27] DEBUG - base_path=/home/fdfs/fastdfs_tracker, 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=192.168.229.207, port=23000

group_name=group1, ip_addr=192.168.229.207, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/00/wKjlz1beqFuAMsXGAAALHvS25EA632.jpg
source ip address: 192.168.229.207
file timestamp=2016-03-08 18:24:27
file size=2846
file crc32=4105626688
example file url: 192.168.229.207/group1/M00/00/00/wKjlz1beqFuAMsXGAAALHvS25EA632.jpg
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/00/wKjlz1beqFuAMsXGAAALHvS25EA632_big.jpg
source ip address: 192.168.229.207
file timestamp=2016-03-08 18:24:27
file size=2846
file crc32=4105626688
example file url: 192.168.229.207/group1/M00/00/00/wKjlz1beqFuAMsXGAAALHvS25EA632_big.jpg

但是根据上传结果可以无法用http的方式访问到这个文件
192.168.229.207/group1/M00/00/00/wKjlz1beqFuAMsXGAAALHvS25EA632.jpg

请高手看看我到底哪里还没有弄对。谢谢

论坛徽章:
0
发表于 2016-03-14 13:59 |显示全部楼层
你有搞定没,搞定能否告诉我下。谢谢

论坛徽章:
0
发表于 2016-03-18 14:25 |显示全部楼层
我也是遇到了这个问题。

论坛徽章:
0
发表于 2016-04-20 15:59 |显示全部楼层
从4.05版本就移除了内置的http支持,
下面这段文字是FastDFS_v5.08\FastDFS\HISTORY 文件 的部分内容。看最后一行:移除内嵌的http支持。

Version 4.05  2012-12-30
* client/fdfs_upload_file.c can specify storage ip port and store path index
* add connection pool
* client load storage ids config
* common/ini_file_reader.c does NOT call chdir
* keep the mtime of file same
* use g_current_time instead of call time function
* remove embed HTTP support

需要安装Apache或Nginx模块才行。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP