您的位置:首页 > 其它

FastDFS配置和运行中出现的问题及解决(FAQ)

2015-08-21 13:26 351 查看
Q:/fdfs_trackerd: error while loading shared libraries: libevent-1.4.so.2: cannot open shared object file: No such file or directory
A:export LD_LIBRARY_PATH=/usr/loal/lib(libevent的安装路径,可以通过find来查找)

Q:Command 'ifconfig' is available in '/sbin/ifconfig'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative priviledges associated with your user account.
ifconfig: command not found
A:export PATH=$PATH:/sbin

Q:nginx@ubuntu:~/fastdfs/bak$ ./run_nginx.sh
/home/nginx/nginx/sbin/nginx: error while loading shared libraries: libfastcommon.so: cannot open shared object file: No such file or directory
A:找不到fastdfs的库文件,因为前面执行了 export LD_LIBRARY_PATH=/usr/loal/lib,所以 为了使得使用方便,就把所有需要用到的LIB放在一起:
cp libf*.so /usr/local/lib
ls -l /usr/local/lib/libf* 如果没有链接映射,就需要自己做一个或者把四个文件全部拷过去
sudo ln -sf /home/nginx/fastdfs/lib/libfastcommon.so.1 /usr/local/lib/libfastcommon.so
sudo ln -sf /home/nginx/fastdfs/lib/libfdfsclient.so.1 /usr/local/lib/libfdfsclient.so
注意:做软链接的时候需要加绝对路径,不然会出现黑色的提示。

Q:400 badrequest
[2011-12-12 15:24:21] ERROR - file: /tmp/fastdfs-nginx-module/src/common.c, line: 561, logic file: M00/00/00/wKgBNU7lqyjzJZ4mAA4CRXl5SCQ670.jpg not exists
2011/12/12 15:24:21 [error] 14147#0: *1 open() "/home/nginx/nginx/html/favicon.ico" failed (2: No such file or directory), client: 192.168.1.123, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "192.168.1.53:8090"
A:修改/fastdfs/conf/mod_fastdfs.conf
里面url_have_group_name = true

Q:[2011-12-12 17:11:44] ERROR - file: /tmp/fastdfs-nginx-module/src/common.c, line: 561, logic file: M00/00/00/wKgBNU7lqyjzJZ4mAA4CRXl5SCQ670.jpg not exists
Q:404错误
nginx-erro:
2011/12/12 17:18:03 [error] 16640#0: *27 open() "/home/nginx/nginx/html/M00/00/00/wKgBNU7lqyjzJZ4mAA4CRXl5SCQ670.jpg" failed (2: No such file or directory), client: 192.168.1.123, server: localhost, request: "GET /M00/00/00/wKgBNU7lqyjzJZ4mAA4CRXl5SCQ670.jpg HTTP/1.1", host: "192.168.1.53:8090"
mod-fastdfs.log
2011-12-12 17:26:30] ERROR - file: storage_client.c, line: 1966, filename is too short, length: 40 < 44
A:老版本的一个bug,下载最近的无此类错误。

Q: 在tracker的日志里报出此类错误
ERROR - file: tracker_mem.c, line: 1406, the format of the file "/home/bstar/dfs_data/data/storage_sync_timestamp.dat" is invalid, group: group3, row count:1 > server count:0
A:修改data里面的 storage_sync_timestamp.dat,把group3的信息删掉,然后重启tracker

Q:在启动tracker的时候出现此类错误:
ERROR - file: ../common/fdfs_http_shared.c, line: 128, param "http.mime_types_filename" not exist or is empty
A:修改tracker.conf里面,把##include http.conf 改为#include http.conf ,再重启

Q:ERROR - file: tracker_http_check.c, line: 132, http check alive, connect to http server 192.168.1.53:8888 fail, errno: 111, error info: Connection refused
A:端口不对。要配置storage和nginx端口一致/

Q:ERROR - file: /home/nginx/install/fastdfs-nginx-module/src/common.c, line: 561, logic file: M00/00/00/wKgBNU7wRbrcAYGuAALOPrGJ7YQ668.jpg not exists
A:apache和nginx扩展模块版本v1.06及以上版本,需要在配置文件/etc/fdfs/fastdfs_mod.conf中设置storage server的存储路径信息。
一个示例如下所示:
store_path_count=1
store_path0=/home/yuqing/fastdfs
store_path_count和store_path#均需要正确设置,必须和storage.conf中的相应配置完全一致

Q: DEBUG - file: tracker_proto.c, line: 48, server: 192.168.1.51:22122, response status 28 != 0

tracker_query_storage fail, error no: 28, error info: No space left on device
A:空间不足

Q:EBUG - file: storage_disk_recovery.c, line: 699, disk recovery: begin recovery data path: /home/nginx/fastdfs ...
A:这个是数据迁移后的问题,这个需要之前配置的sub_dir的数目前后保持一致。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: