mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #480] host header rewrite failed: EOF ,FRP主动关闭 #365
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#365
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alwayswdc on GitHub (Oct 8, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/480
Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST
What version of frp are you using (./frpc -v or ./frps -v)?
0.13
What operating system and processor architecture are you using (
go env)?服务器:centos7 64 客户端:win7 64位
Configures you used:
frps.ini:
[common]
bind_port = 7000
vhost_http_port = 8080
vhost_https_port = 4443
dashboard_port = 7500
dashboard_user = ****
dashboard_pwd = ****
log_file = ./frps.log
log_level = info
log_max_days = 3
privilege_mode = true
privilege_token = ****
max_pool_count = 100
frpc.ini:
[common]
server_addr = *******
server_port = 7000
log_file = D:/frpc.log
log_level = info
log_max_days = 3
privilege_token = ****
[cloud]
privilege_mode = true
type = http
local_ip = 192.168.1.180
local_port = 80
custom_domains = cloud..
use_gzip = true
pool_count = 10
Steps to reproduce the issue:
1.服务端使用Nginx转发vhost的http到8080端口,客户端为win系统转发流量到win中虚拟机安装的owncloud,80和8080端口均已打开,且80端口的服务器上其他vhost正常访问
2.重启frp的短时间内可以正常访问,但隔一段时间之后frp主动关闭连接,报错host header rewrite failed: EOF,期间有可能出现过服务端和客户端断开连接的情况,因为服务器在境外,最近的isp不太稳定。但是此时tcp服务测试没有任何问题,唯独http服务断开,且frp监控页面(ip:7500)此时显示http属于online。
3.
Describe the results you received:
2017/10/08 03:59:15 [W] [vhost.go:191] [cloud] host header rewrite failed: EOF
2017/10/08 03:59:15 [I] [proxy.go:108] [5eeeedb091b9a575] [cloud] listener is closed
Describe the results you expected:
正常访问http服务
Additional information you deem important (e.g. issue happens only occasionally):
之前没有使用nginx直接用frp监听80端口时未发现出现该错误。
Can you point out what caused this issue (optional)
@alwayswdc commented on GitHub (Oct 8, 2017):
补充:ngnix报504错误,直接访问frps的8080端口无法连接。
@alwayswdc commented on GitHub (Oct 8, 2017):
贴上nginx配置,使用了301定向:
server {
listen 80;
server_name cloud..;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host:80;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_hide_header X-Powered-By;
}
}
@alwayswdc commented on GitHub (Oct 9, 2017):
昨天取消nginx转发,直接访问8080端口,还是出现该问题,开来是FRP的BUG了。
@hsz1992 commented on GitHub (Feb 2, 2018):
@wdc63 大兄弟,我遇到了同样的问题,并且得到了解决,希望能帮到你:
我内网服务的 ajax 请求使用 GET 且 query string 的长度大于了 1024 导致了该问题,更换为 POST 后问题完美解决。