mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #2189] 内网穿透tomcat9后无法连接里面的websocket服务 #1745
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#1745
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 @dekingorg on GitHub (Jan 15, 2021).
Original GitHub issue: https://github.com/fatedier/frp/issues/2189
内网穿透部署于 termux 里的 tomcat9服务器,无法连接里面我写的websocket接口.我用在局域网下直接访问termux里这个项目是正常的,把这个项目直接部署到外网服务器再在本地访问也是正常的,说明项目代码没有问题。
但是用 frp 内网映射到外网后就是无法连接。
我查看日志发现能触发 onOpen
但是报 java.io.EOFException 异常(错误代码 1006 )
tomcat版本:9.0.41
服务端frp版本:frp_0.34.3_linux_amd64
客户端frp版本: frp_0.34.3_linux_arm64
大佬们帮我康康 frp 配置有没有什么问题:
frps.ini
[common]
bind_port = 7000
log_file = ./frps.log
log_level = info
log_max_days = 3
vhost_http_port = 8080
frpc.ini
[common]
server_addr = 公网服务器 ip
server_port = 7000
[web]
type = http
local_ip = 127.0.0.1
local_port = 8080
custom_domains = 公网服务器 ip
remote_port = 8080
[websocket]
type = tcp
local_ip = 127.0.0.1
local_port = 80 [不知道 tomcat 里的 websocket 端口是多少谷歌了下说是 80]
use_encryption = false
use_compression = false
custom_domains = 公网服务器 ip
remote_port = 4567 [这里也不确定该填什么端口]
@yuyulei commented on GitHub (Jan 15, 2021):
你应用访问的地址是什么?frp 侧有日志吗?
@dekingorg commented on GitHub (Jan 15, 2021):
frpc.log:
2021/01/15 09:41:48 [I] [service.go:288] [217a0a2ff932cc8d] login to server succ ess, get run id [217a0a2ff932cc8d], server udp port [0] 2021/01/15 09:41:48 [I] [proxy_manager.go:144] [217a0a2ff932cc8d] proxy added: [ web websocket] 2021/01/15 09:41:48 [I] [control.go:180] [217a0a2ff932cc8d] [web] start proxy su ccess 2021/01/15 09:41:48 [I] [control.go:180] [217a0a2ff932cc8d] [websocket] start pr oxy success 2021/01/15 09:42:53 [E] [proxy.go:793] [217a0a2ff932cc8d] [web socket] connect to local service [127.0.0.1:80] error: dial tcp 127.0.0.1:80: co nnect: connection refused 2021/01/15 09:42:58 [E] [control.go:158] [217a0a2ff932cc8d] work connection clos ed before response StartWorkConn message: EOF 2021/01/15 09:42:58 [I] [control.go:276] [217a0a2ff932cc8d] control writer is cl osing 2021/01/15 09:42:58 [I] [service.go:174] [217a0a2ff932cc8d] try to reconnect to server... 2021/01/15 09:42:58 [E] [control.go:158] [217a0a2ff932cc8d] work connection clos ed before response StartWorkConn message: EOF 2021/01/15 09:42:58 [I] [visitor_manager.go:60] [217a0a2ff932cc8d] gracefully sh utdown visitor manager 2021/01/15 09:42:58 [W] [service.go:177] [217a0a2ff932cc8d] reconnect to server error: dial tcp 149.28.130.171:7000: connect: connection refused 2021/01/15 09:43:00 [I] [service.go:174] [217a0a2ff932cc8d] try to reconnect to server... 2021/01/15 09:43:46 [W] [service.go:177] [217a0a2ff932cc8d] reconnect to server error: dial tcp 149.28.130.171:7000: connect: connection refused 2021/01/15 09:44:04 [I] [service.go:174] [217a0a2ff932cc8d] try to reconnect to server... 2021/01/15 09:45:27 [W] [service.go:177] [217a0a2ff932cc8d] reconnect to server error: dial tcp 149.28.130.171:7000: connect: connection refusedfrps.log:
2021/01/15 09:45:36 [I] [service.go:190] frps tcp listen on 0.0.0.0:7000 2021/01/15 09:45:36 [I] [service.go:232] http service listen on 0.0.0.0:8080 2021/01/15 09:45:36 [I] [root.go:215] start frps success 2021/01/15 09:45:44 [W] [http.go:86] do http proxy request error: no such domain: 149.28.130.171 /queryAlipayServer/queryAlipay 2021/01/15 09:45:49 [W] [http.go:86] do http proxy request error: no such domain: 149.28.130.171 /queryAlipayServer/queryAlipay 2021/01/15 09:46:16 [I] [service.go:444] [217a0a2ff932cc8d] client login info: ip [111.1.200.110:15104] version [0.34.3] hostname [] o$ 2021/01/15 09:46:46 [I] [control.go:309] [217a0a2ff932cc8d] control writer is closing 2021/01/15 09:46:46 [I] [control.go:384] [217a0a2ff932cc8d] client exit success@dekingorg commented on GitHub (Jan 15, 2021):
大佬这条信息啥意思?是不是线索,帮我康康
2021/01/15 09:53:50 [W] [http.go:86] do http proxy request error: backend tried to switch protocol "" when "websocket" was requested
@dekingorg commented on GitHub (Jan 15, 2021):
@fatedier commented on GitHub (Jan 17, 2021):
确保你的请求包含了以下 HTTP header
@yuyulei commented on GitHub (Jan 21, 2021):
一个 websocket 的 bug 刚被修复 #2199 你试下新的版本 v0.35.0
@dekingorg commented on GitHub (Jan 21, 2021):
泪目啊,终于修复了:(