fastdfs-nginx启动报错解决方法
AI-摘要
KunKunYu GPT
AI初始化中...
介绍自己
生成本文简介
推荐相关文章
前往主页
前往tianli博客
fastdfs-nginx启动报错解决方法
[TOC]
1 报错信息:
/home/webapp/nginx/sbin/nginx -t
./sbin/nginx: Symbol `g_log_context' has different size in shared object, consider re-linking
nginx: the configuration file /home/webapp/nginx/nginx.conf syntax is ok
nginx: configuration file /home/webapp/nginx/nginx.conf test is successful
1.1报错结果:
集群通过nginx无法访问到存储文件
1.2排查思路:查看nginx日志报错504 499
nginx日志
访问8888端口时候查看
/home/webapp/nginx/fastdfs.access.log
启动nginx日志
/home/webapp/nginx/error.log
==========================================================================
2 修改1 注意是/home/webapp/fastdfs/fdfs/mod_fastdfs.conf文件末尾添加[group1]信息
vim /home/webapp/fastdfs/fdfs/mod_fastdfs.conf
connect_timeout=2
network_timeout=30
base_path=/home/webapp/data/storage/
load_fdfs_parameters_from_tracker=true
storage_sync_file_max_delay = 86400
use_storage_id = false
storage_ids_filename = storage_ids.conf
tracker_server=192.168.34.149:22122
storage_server_port=23000
group_name=group1 #组名称
url_have_group_name=true
store_path_count=1 ##指定了数据目录为一条 关联并且store_path的名字应该从0开始
store_path0=/home/webapp/data/storage/
log_level=info
log_filename=
response_mode=proxy
if_alias_prefix=
http.need_find_content_type=false
flv_support = true
flv_extension = flv
group_count = 1 ##我们只有一个组
##添加了组信息
[group1]
group_name=group1
storage_server_port=23000
store_path_count=1
store_path0=/home/webapp/data/storage/
==========================================================================
3 修改2 存储节点storage.conf
storage.conf的参数:http.server_port=8888 需跟nginx启动端口一致:listen 8888;
vim /home/webapp/fastdfs/fdfs/storage.conf
disabled=false
group_name=group1
bind_addr=0.0.0.0
client_bind=true
port=23000
connect_timeout=30
network_timeout=60
heart_beat_interval=30
stat_report_interval=60
base_path=/home/webapp/data/storage/
max_connections=256
buff_size = 256KB
accept_threads=1
work_threads=4
disk_rw_separated = true
disk_reader_threads = 1
disk_writer_threads = 1
sync_wait_msec=50
sync_interval=0
sync_start_time=00:00
sync_end_time=23:59
write_mark_file_freq=500
store_path_count=1
store_path0=/home/webapp/data/storage/
subdir_count_per_path=256
tracker_server=192.168.34.149:22122
log_level=info
run_by_group=
run_by_user=
allow_hosts=*
file_distribute_path_mode=0
file_distribute_rotate_count=100
fsync_after_written_bytes=0
sync_log_buff_interval=10
sync_binlog_buff_interval=10
sync_stat_file_interval=300
thread_stack_size=512KB
upload_priority=10
if_alias_prefix=
check_file_duplicate=0
file_signature_method=hash
key_namespace=FastDFS
keep_alive=0
use_access_log = false
rotate_access_log = false
access_log_rotate_time=00:00
rotate_error_log = false
error_log_rotate_time=00:00
rotate_access_log_size = 0
rotate_error_log_size = 0
file_sync_skip_invalid_record=false
use_connection_pool = false
connection_pool_max_idle_time = 3600
http.domain_name=
http.server_port=8888
url_have_group_name = true
http.need_find_content_type=true
group_count = 1
[group1]
group_name=group1
storage_server_port=23000
store_path_count=1
store_path0=/home/webapp/data/storage
==========================================================================
4 修改完成后报存并重启
/home/webapp/fastdfs/bin/fdfs_storaged /home/webapp/fastdfs/fdfs/storage.conf restart
/home/webapp/nginx/sbin/nginx -s reload
==========================================================================
- 感谢你赐予我前进的力量
赞赏者名单
因为你们的支持让我意识到写文章的价值🙏
作者编辑不易,如有转载请注明出处。完整转载来自https://wangairui.com 网站名称:猫扑linux
评论
匿名评论
隐私政策
你无需删除空行,直接评论以获取最佳展示效果