-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
400 Bad request #20
Comments
这个应该是mod_fastdfs.conf中的group配置有错误,无法寻找到对应的文件,fastdfs进行了重定向,代理寻找,都没有找到,返回400 BAD REQUEST |
我也有这个报错,不知道该怎么解决? |
WARNING - file: /usr/local/src/fastdfs-nginx-module/src/common.c, line: 892, redirect again, url: /group1/M00/00/00/rBCb5F113CiAAblgAAAAAAAAAAA518.jpg?redirect=1 |
查看一下fastdfs_storage配置文件,有地方配置错误。------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>
发送时间: 2019年9月10日(星期二) 下午3:18
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "yangjianbo-mm"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
WARNING - file: /usr/local/src/fastdfs-nginx-module/src/common.c, line: 892, redirect again, url: /group1/M00/00/00/rBCb5F113CiAAblgAAAAAAAAAAA518.jpg?redirect=1
我遇到的是这样的,你们是怎么解决的,可以帮我看看吗,谢谢
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
能正常运行,fastdfs运行正常,上传文件 也可以,访问就报错 |
配置截图一下,看看fastdfs_storage的配置文件
…------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>;
发送时间: 2019年9月10日(星期二) 下午3:46
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "329624434"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
能正常运行,fastdfs运行正常,上传文件 也可以,访问就报错
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
is this config file disabledfalse for enabledtrue for disableddisabled=false the name of the group this storage server belongs tocomment or remove this item for fetching from tracker server,in this case, use_storage_id must set to true in tracker.conf,and storage_ids.conf must be configed correctly.group_name=group1 bind an address of this hostempty for bind all addresses of this hostbind_addr= if bind an address of this host when connect to other servers(this storage server as a client)true for binding the address configed by above parameter: "bind_addr"false for binding any address of this hostclient_bind=true the storage server portport=23000 connect timeout in secondsdefault value is 30sconnect_timeout=30 network timeout in secondsdefault value is 30snetwork_timeout=60 heart beat interval in secondsheart_beat_interval=30 disk usage report interval in secondsstat_report_interval=60 the base path to store data and log filesbase_path=/data/fastdfs/storage/ max concurrent connections the server supporteddefault value is 256more max_connections means more memory will be usedmax_connections=256 the buff size to recv / send datathis parameter must more than 8KBdefault value is 64KBsince V2.00buff_size = 256KB accept thread countdefault value is 1since V4.07accept_threads=1 work thread count, should <= max_connectionswork thread deal network iodefault value is 4since V2.00work_threads=4 if disk read / write separatedfalse for mixed read and writetrue for separated read and writedefault value is truesince V2.00disk_rw_separated = true disk reader thread count per store base pathfor mixed read / write, this parameter can be 0default value is 1since V2.00disk_reader_threads = 1 disk writer thread count per store base pathfor mixed read / write, this parameter can be 0default value is 1since V2.00disk_writer_threads = 1 when no entry to sync, try read binlog again after X millisecondsmust > 0, default value is 200mssync_wait_msec=50 after sync a file, usleep milliseconds0 for sync successively (never call usleep)sync_interval=0 storage sync start time of a day, time format: Hour:MinuteHour from 0 to 23, Minute from 0 to 59sync_start_time=00:00 storage sync end time of a day, time format: Hour:MinuteHour from 0 to 23, Minute from 0 to 59sync_end_time=23:59 write to the mark file after sync N filesdefault value is 500write_mark_file_freq=500 path(disk or mount point) count, default value is 1store_path_count=1 store_path#, based 0, if store_path0 not exists, it's value is base_paththe paths must be existstore_path0=/data/fastdfs/storage/ subdir_count * subdir_count directories will be auto created under eachstore_path (disk), value can be 1 to 256, default value is 256subdir_count_per_path=256 tracker_server can ocur more than once, and tracker_server format is"host:port", host can be hostname or ip addresstracker_server=172.16.155.228:22122 #standard log level as syslog, case insensitive, value list: emerg for emergencyalertcrit for criticalerrorwarn for warningnoticeinfodebuglog_level=info #unix group name to run this program, #unix username to run this program, allow_hosts can ocur more than once, host can be hostname or ip address,"*" (only one asterisk) means match all ip addresseswe can use CIDR ips like 192.168.5.64/26and also use range like these: 10.0.1.[0-254] and host[01-08,20-25].domain.comfor example:allow_hosts=10.0.1.[1-15,20]allow_hosts=host[01-08,20-25].domain.comallow_hosts=192.168.5.64/26allow_hosts=* the mode of the files distributed to the data path0: round robin(default)1: random, distributted by hash codefile_distribute_path_mode=0 valid when file_distribute_to_path is set to 0 (round robin),when the written file count reaches this number, then rotate to next pathdefault value is 100file_distribute_rotate_count=100 call fsync to disk when write big file0: never call fsyncother: call fsync when written bytes >= this bytesdefault value is 0 (never call fsync)fsync_after_written_bytes=0 sync log buff to disk every interval secondsmust > 0, default value is 10 secondssync_log_buff_interval=10 sync binlog buff / cache to disk every interval secondsdefault value is 60 secondssync_binlog_buff_interval=10 sync storage stat info to disk every interval secondsdefault value is 300 secondssync_stat_file_interval=300 thread stack size, should >= 512KBdefault value is 512KBthread_stack_size=512KB the priority as a source server for uploading file.the lower this value, the higher its uploading priority.default value is 10upload_priority=10 the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -amulti aliases split by comma. empty value means auto set by OS typedefault values is emptyif_alias_prefix= if check file duplicate, when set to true, use FastDHT to store file indexes1 or yes: need check0 or no: do not checkdefault value is 0check_file_duplicate=0 file signature method for check file duplicatehash: four 32 bits hash codemd5: MD5 signaturedefault value is hashsince V4.01file_signature_method=hash namespace for storing file indexes (key-value pairs)this item must be set when check_file_duplicate is true / onkey_namespace=FastDFS set keep_alive to 1 to enable persistent connection with FastDHT serversdefault value is 0 (short connection)keep_alive=0 you can use "#include filename" (not include double quotes) directive toload FastDHT server list, when the filename is a relative path such aspure filename, the base path is the base path of current/this config file.must set FastDHT server list when check_file_duplicate is true / onplease see INSTALL of FastDHT for detail##include /home/yuqing/fastdht/conf/fdht_servers.conf if log to access logdefault value is falsesince V4.00use_access_log = false if rotate the access log every daydefault value is falsesince V4.00rotate_access_log = false rotate access log time base, time format: Hour:MinuteHour from 0 to 23, Minute from 0 to 59default value is 00:00since V4.00access_log_rotate_time=00:00 if rotate the error log every daydefault value is falsesince V4.02rotate_error_log = false rotate error log time base, time format: Hour:MinuteHour from 0 to 23, Minute from 0 to 59default value is 00:00since V4.02error_log_rotate_time=00:00 rotate access log when the log file exceeds this size0 means never rotates log file by log file sizedefault value is 0since V4.02rotate_access_log_size = 0 rotate error log when the log file exceeds this size0 means never rotates log file by log file sizedefault value is 0since V4.02rotate_error_log_size = 0 keep days of the log files0 means do not delete old log filesdefault value is 0log_file_keep_days = 0 if skip the invalid record when sync filedefault value is falsesince V4.02file_sync_skip_invalid_record=false if use connection pooldefault value is falsesince V4.05use_connection_pool = false connections whose the idle time exceeds this time will be closedunit: seconddefault value is 3600since V4.05connection_pool_max_idle_time = 3600 use the ip address of this storage server if domain_name is empty,else this domain name will ocur in the url redirected by the tracker serverhttp.domain_name= the port of the web server on this storage serverhttp.server_port=8889 |
就是这个配制文件 |
还有一个叫mod_fastdfs.conf的配置文件,里面的内容发一下。
…------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>;
发送时间: 2019年9月10日(星期二) 下午3:54
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "329624434"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
就是这个配制文件
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
connect timeout in secondsdefault value is 30sconnect_timeout=10 network recv and send timeout in secondsdefault value is 30snetwork_timeout=30 the base path to store log filesbase_path=/tmp if load FastDFS parameters from tracker serversince V1.12default value is falseload_fdfs_parameters_from_tracker=true storage sync file max delay secondssame as tracker.confvalid only when load_fdfs_parameters_from_tracker is falsesince V1.12default value is 86400 seconds (one day)storage_sync_file_max_delay = 86400 if use storage ID instead of IP addresssame as tracker.confvalid only when load_fdfs_parameters_from_tracker is falsedefault value is falsesince V1.13use_storage_id = false specify storage ids filename, can use relative or absolute pathsame as tracker.confvalid only when load_fdfs_parameters_from_tracker is falsesince V1.13storage_ids_filename = storage_ids.conf FastDFS tracker_server can ocur more than once, and tracker_server format is"host:port", host can be hostname or ip addressvalid only when load_fdfs_parameters_from_tracker is true#tracker_server=tracker:22122 the port of the local storage serverthe default value is 23000storage_server_port=23000 the group name of the local storage servergroup_name=group1 if the url / uri including the group nameset to false when uri like /M00/00/00/xxxset to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxxdefault value is falseurl_have_group_name = true path(disk or mount point) count, default value is 1must same as storage.confstore_path_count=1 store_path#, based 0, if store_path0 not exists, it's value is base_paththe paths must be existmust same as storage.confstore_path0=/data/fastdfs/storage/ standard log level as syslog, case insensitive, value list:emerg for emergencyalertcrit for criticalerrorwarn for warningnoticeinfodebuglog_level=info set the log filename, such as /usr/local/apache2/logs/mod_fastdfs.logempty for output to stderr (apache and nginx error_log file)log_filename= response mode when the file not exist in the local file systemproxy: get the content from other storage server, then send to clientredirect: redirect to the original storage server (HTTP Header is Location)response_mode=proxy the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -amulti aliases split by comma. empty value means auto set by OS typethis paramter used to get all ip address of the local hostdefault values is emptyif_alias_prefix= use "#include" directive to include HTTP config fileNOTE: #include is an include directive, do NOT remove the # before include#include http.conf if support flvdefault value is falsesince v1.15flv_support = true flv file extension namedefault value is flvsince v1.15flv_extension = flv set the group countset to none zero to support multi-groupset to 0 for single group onlygroups settings section as [group1], [group2], ..., [groupN]default value is 0since v1.14group_count = 0 group settings for group #1since v1.14when support multi-group, uncomment following section#[group1] group settings for group #2since v1.14when support multi-group, uncomment following section as neccessary#[group2] |
这里修改为1,然后重启fastdfs_storage,重启nginx,就好了。
------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>;
发送时间: 2019年9月10日(星期二) 下午3:58
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "329624434"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
connect timeout in seconds
default value is 30s
connect_timeout=10
network recv and send timeout in seconds
default value is 30s
network_timeout=30
the base path to store log files
base_path=/tmp
if load FastDFS parameters from tracker server
since V1.12
default value is false
load_fdfs_parameters_from_tracker=true
storage sync file max delay seconds
same as tracker.conf
valid only when load_fdfs_parameters_from_tracker is false
since V1.12
default value is 86400 seconds (one day)
storage_sync_file_max_delay = 86400
if use storage ID instead of IP address
same as tracker.conf
valid only when load_fdfs_parameters_from_tracker is false
default value is false
since V1.13
use_storage_id = false
specify storage ids filename, can use relative or absolute path
same as tracker.conf
valid only when load_fdfs_parameters_from_tracker is false
since V1.13
storage_ids_filename = storage_ids.conf
FastDFS tracker_server can ocur more than once, and tracker_server format is
"host:port", host can be hostname or ip address
valid only when load_fdfs_parameters_from_tracker is true
#tracker_server=tracker:22122
tracker_server=172.16.155.228:22122
#tracker_server=172.16.155.47:22122
the port of the local storage server
the default value is 23000
storage_server_port=23000
the group name of the local storage server
group_name=group1
if the url / uri including the group name
set to false when uri like /M00/00/00/xxx
set to true when uri like ${group_name}/M00/00/00/xxx, such as group1/M00/xxx
default value is false
url_have_group_name = true
path(disk or mount point) count, default value is 1
must same as storage.conf
store_path_count=1
store_path#, based 0, if store_path0 not exists, it's value is base_path
the paths must be exist
must same as storage.conf
store_path0=/data/fastdfs/storage/
#store_path1=/home/yuqing/fastdfs1
standard log level as syslog, case insensitive, value list:
emerg for emergency
alert
crit for critical
error
warn for warning
notice
info
debug
log_level=info
set the log filename, such as /usr/local/apache2/logs/mod_fastdfs.log
empty for output to stderr (apache and nginx error_log file)
log_filename=
response mode when the file not exist in the local file system
proxy: get the content from other storage server, then send to client
redirect: redirect to the original storage server (HTTP Header is Location)
response_mode=proxy
the NIC alias prefix, such as eth in Linux, you can see it by ifconfig -a
multi aliases split by comma. empty value means auto set by OS type
this paramter used to get all ip address of the local host
default values is empty
if_alias_prefix=
use "#include" directive to include HTTP config file
NOTE: #include is an include directive, do NOT remove the # before include
#include http.conf
if support flv
default value is false
since v1.15
flv_support = true
flv file extension name
default value is flv
since v1.15
flv_extension = flv
set the group count
set to none zero to support multi-group
set to 0 for single group only
groups settings section as [group1], [group2], ..., [groupN]
default value is 0
since v1.14
group_count = 0
group settings for group #1
since v1.14
when support multi-group, uncomment following section
#[group1]
#group_name=group1
#storage_server_port=23000
#store_path_count=2
#store_path0=/home/yuqing/fastdfs
#store_path1=/home/yuqing/fastdfs1
group settings for group #2
since v1.14
when support multi-group, uncomment following section as neccessary
#[group2]
#group_name=group2
#storage_server_port=23000
#store_path_count=1
#store_path0=/home/yuqing/fastdfs
[group1]
group_name=group1
storage_server_port=23000
store_path_count=1
store_path0=/data/fastdfs/storage
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
那个位置,我没有看到 |
mod_fastdfs.conf里面的group_count修改为1
…------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>;
发送时间: 2019年9月10日(星期二) 下午4:03
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "329624434"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
那个位置,我没有看到
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
换了这个错误,铡那个访问,半天没有返回:[2019-09-10 16:10:44] ERROR - file: /usr/local/src/fastdfs-nginx-module/src/common.c, line: 103, section: group1, you must set parameter: group_name! |
你有几台storage,都得修改啊!
…------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>;
发送时间: 2019年9月10日(星期二) 下午4:11
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "329624434"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
换了这个错误,铡那个访问,半天没有返回:[2019-09-10 16:10:44] ERROR - file: /usr/local/src/fastdfs-nginx-module/src/common.c, line: 103, section: group1, you must set parameter: group_name!
2019/09/10 16:10:44 [alert] 27513#0: worker process 1622 exited with fatal code 2 and cannot be respawned
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
谢谢,大佬,可以了 |
你怎么知道我的邮箱的?
…------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>;
发送时间: 2019年9月10日(星期二) 下午4:31
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "329624434"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
谢谢,大佬,可以了
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
我找问题找了好久,找到这个帖子,我就在问,我并不知道你的邮箱 |
你找的哪个帖子?地址是啥 ------------------ 原始邮件 ------------------
发件人: "15338510340"<[email protected]>
发送时间: 2019年9月10日(星期二) 下午4:35
收件人: "happyfish100/fastdfs-nginx-module"<[email protected]>;
抄送: "yangjianbo-mm"<[email protected]>;"Comment"<[email protected]>;
主题: Re: [happyfish100/fastdfs-nginx-module] 400 Bad request (#20)
我找问题找了好久,找到这个帖子,我就在问,我并不知道你的邮箱
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
这个#20 |
我也遇到这个,不过我是因为配置的组是group0,但是/etc/fdfs/下面的mod_fastdfs.conf配置的是group1 |
nginx.conf 加上 |
nginx 报的
WARNING - file: /opt/fastdfs/fastdfs-nginx-module/src//common.c, line: 1115, redirect again, url: /group1/M00/00/00/wKiugFmlSAqAaa9ZAAATuGT1OfE840.png?redirect=1
The text was updated successfully, but these errors were encountered: