[GH-ISSUE #3099] IOS系统ish中运行frpc发生错误 #2483

Closed
opened 2026-05-05 13:35:45 -06:00 by gitea-mirror · 11 comments
Owner

Originally created by @anarckk on GitHub (Sep 12, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3099

Bug Description

在ios软件ish中,运行frpc客户端,使用stcp,报告错误
image

frpc Version

frp_0.43.0

frps Version

frp_0.43.0

System Architecture

frpc: IOS linux/386

Configurations

[common]
server_addr = ip地址
server_port = 端口
token = 密码
tls_enable = true

[memosv]
type = stcp
role = visitor
server_name = memos
sk = 密码
bind_addr = 0.0.0.0
bind_port = 33000

Logs

2022/09/12 14:52:48 [W] [visitor.go:107] [6d3fdf4d67ec1278] [***.***] stcp local listener closed
2022/09/12 14:52:48 [W] [visitor.go:107] [6d3fdf4d67ec1278] [***.***] stcp local listener closed

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @anarckk on GitHub (Sep 12, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3099 ### Bug Description 在ios软件ish中,运行frpc客户端,使用stcp,报告错误 ![image](https://user-images.githubusercontent.com/27038948/189687722-91c5c2a1-eb01-4009-a7b6-b3e51cfa7d65.png) ### frpc Version frp_0.43.0 ### frps Version frp_0.43.0 ### System Architecture frpc: IOS linux/386 ### Configurations ``` [common] server_addr = ip地址 server_port = 端口 token = 密码 tls_enable = true [memosv] type = stcp role = visitor server_name = memos sk = 密码 bind_addr = 0.0.0.0 bind_port = 33000 ``` ### Logs ``` 2022/09/12 14:52:48 [W] [visitor.go:107] [6d3fdf4d67ec1278] [***.***] stcp local listener closed 2022/09/12 14:52:48 [W] [visitor.go:107] [6d3fdf4d67ec1278] [***.***] stcp local listener closed ``` ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
Author
Owner

@anarckk commented on GitHub (Sep 12, 2022):

造成困扰的代码位置:9d077b02cf/client/visitor.go (L106)

<!-- gh-comment-id:1243880337 --> @anarckk commented on GitHub (Sep 12, 2022): 造成困扰的代码位置:https://github.com/fatedier/frp/blob/9d077b02cfd6967d0f2aa06f5f65cc3239bbac3f/client/visitor.go#L106
Author
Owner

@anarckk commented on GitHub (Sep 12, 2022):

在配置没有改动的情况下,我使用了旧版本 frp_0.34.2_linux_386.tar.gz ,就没问题了,运行正常

<!-- gh-comment-id:1243883886 --> @anarckk commented on GitHub (Sep 12, 2022): 在配置没有改动的情况下,我使用了旧版本 `frp_0.34.2_linux_386.tar.gz` ,就没问题了,运行正常
Author
Owner

@fatedier commented on GitHub (Sep 13, 2022):

你可以先手动改了测试看看是什么错误

<!-- gh-comment-id:1244827220 --> @fatedier commented on GitHub (Sep 13, 2022): 你可以先手动改了测试看看是什么错误
Author
Owner

@anarckk commented on GitHub (Sep 13, 2022):

这个错误也许和frp无关,但是,我觉得原生错误frp应该打印到控制台里,这样在排查错误的时候更方便

<!-- gh-comment-id:1245138698 --> @anarckk commented on GitHub (Sep 13, 2022): 这个错误也许和frp无关,但是,我觉得原生错误frp应该打印到控制台里,这样在排查错误的时候更方便
Author
Owner

@anarckk commented on GitHub (Sep 13, 2022):

我想问下,这里的代码是否是有意这么写的?

<!-- gh-comment-id:1245139732 --> @anarckk commented on GitHub (Sep 13, 2022): 我想问下,这里的代码是否是有意这么写的?
Author
Owner

@fatedier commented on GitHub (Sep 13, 2022):

accept 失败的可能性不多,一般只在关闭监听,和并发建立连接非常多的情况下才会出现。相比于打印日志,如果确认是后者,应该需要优化代码。

<!-- gh-comment-id:1245150057 --> @fatedier commented on GitHub (Sep 13, 2022): `accept` 失败的可能性不多,一般只在关闭监听,和并发建立连接非常多的情况下才会出现。相比于打印日志,如果确认是后者,应该需要优化代码。
Author
Owner

@anarckk commented on GitHub (Sep 20, 2022):

我写了一个简单小代码进行测试

	address := fmt.Sprintf("%s:%d", ip, port)
	listener, err := net.Listen("tcp", address)
	if err != nil {
		log.Println(err)
		return
	}
	log.Printf("server started, listening tcp://%s", address)
	defer listener.Close()
	conn, err := listener.Accept()
	if err != nil {
		log.Fatal(err)
	}
	defer conn.Close()
	log.Print("accept conn success")

运行结果是

2022/09/20 14:36:00 type[server] ip[0.0.0.0] port[21000]
2022/09/20 14:36:00 server started, listening tcp://0.0.0.0:21000
2022/09/20 14:36:00 accept tcp [::]:21000: accept: function not implemented

这可能不是frp的问题,而是环境就不支持accept,为什么会这样呢?

<!-- gh-comment-id:1252454780 --> @anarckk commented on GitHub (Sep 20, 2022): 我写了一个简单小代码进行测试 ```go address := fmt.Sprintf("%s:%d", ip, port) listener, err := net.Listen("tcp", address) if err != nil { log.Println(err) return } log.Printf("server started, listening tcp://%s", address) defer listener.Close() conn, err := listener.Accept() if err != nil { log.Fatal(err) } defer conn.Close() log.Print("accept conn success") ``` 运行结果是 ``` 2022/09/20 14:36:00 type[server] ip[0.0.0.0] port[21000] 2022/09/20 14:36:00 server started, listening tcp://0.0.0.0:21000 2022/09/20 14:36:00 accept tcp [::]:21000: accept: function not implemented ``` 这可能不是frp的问题,而是环境就不支持accept,为什么会这样呢?
Author
Owner

@fatedier commented on GitHub (Sep 27, 2022):

可能是你的运行环境的 libc 库的实现问题。

<!-- gh-comment-id:1259505273 --> @fatedier commented on GitHub (Sep 27, 2022): 可能是你的运行环境的 libc 库的实现问题。
Author
Owner

@dingshaohua-com commented on GitHub (Aug 17, 2023):

看这里
https://www.cnblogs.com/dingshaohua/p/17637206.html

<!-- gh-comment-id:1681760427 --> @dingshaohua-com commented on GitHub (Aug 17, 2023): 看这里 https://www.cnblogs.com/dingshaohua/p/17637206.html
Author
Owner

@mlkt commented on GitHub (Nov 6, 2023):

用 go 1.17 版本编译就没事,新版go可能用了什么新的指令,导致iSH不支持

<!-- gh-comment-id:1795077068 --> @mlkt commented on GitHub (Nov 6, 2023): 用 go 1.17 版本编译就没事,新版go可能用了什么新的指令,导致iSH不支持
Author
Owner

@SkywalkerSpace commented on GitHub (Jan 22, 2025):

frp_0.31.2_linux_386.tar.gz,ish 用这个版本,虽然经常自动断开,但是能自动重连,应急用用

<!-- gh-comment-id:2606726528 --> @SkywalkerSpace commented on GitHub (Jan 22, 2025): frp_0.31.2_linux_386.tar.gz,ish 用这个版本,虽然经常自动断开,但是能自动重连,应急用用
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#2483
No description provided.