[GH-ISSUE #4777] frp fails to start if discovers only one address from coturn/turnserver #3771

Closed
opened 2026-05-05 14:24:58 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @maasengit on GitHub (Apr 29, 2025).
Original GitHub issue: https://github.com/fatedier/frp/issues/4777

Bug Description

Logs:
2023/12/25 13:49:45 [W] [xtcp.go:280] [d242ed7f2f9b2b4d] [test_visitor] nathole prepare error: discover error: not enough addresses

With the following change to ignore one address issue, recompile frps and frpc, it works well with turnserver 4.6.2:

`cmd\frpc\sub\nathole.go:71, 72:
if len(addrs) < 2 {
//fmt.Printf("discover error: can not get enough addresses, need 2, got: %v\n", addrs)
//os.Exit(1)
}

pkg\nathole\nathole.go:118:
if len(addrs) < 2 {
//return nil, fmt.Errorf("discover error: not enough addresses")
}

pkg\nathole\classify.go:18, 45
//"fmt"

	//return nil, fmt.Errorf("not enough addresses")`

frpc Version

0.53.2

frps Version

0.53.2

System Architecture

centos7

Configurations

`vi /etc/coturn/turnserver.conf:

listening-port=33111
tls-listening-port=33112
alt-listening-port=33113

listening-ip=192.168.0.5
relay-ip=192.168.0.5
external-ip=x.x.x.x/192.168.0.5
no-cli`

Logs

No response

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 @maasengit on GitHub (Apr 29, 2025). Original GitHub issue: https://github.com/fatedier/frp/issues/4777 ### Bug Description Logs: 2023/12/25 13:49:45 [W] [xtcp.go:280] [d242ed7f2f9b2b4d] [test_visitor] nathole prepare error: discover error: not enough addresses With the following change to ignore one address issue, recompile frps and frpc, it works well with turnserver 4.6.2: `cmd\frpc\sub\nathole.go:71, 72: if len(addrs) < 2 { //fmt.Printf("discover error: can not get enough addresses, need 2, got: %v\n", addrs) //os.Exit(1) } pkg\nathole\nathole.go:118: if len(addrs) < 2 { //return nil, fmt.Errorf("discover error: not enough addresses") } pkg\nathole\classify.go:18, 45 //"fmt" //return nil, fmt.Errorf("not enough addresses")` ### frpc Version 0.53.2 ### frps Version 0.53.2 ### System Architecture centos7 ### Configurations `vi /etc/coturn/turnserver.conf: listening-port=33111 tls-listening-port=33112 alt-listening-port=33113 listening-ip=192.168.0.5 relay-ip=192.168.0.5 external-ip=x.x.x.x/192.168.0.5 no-cli` ### Logs _No response_ ### 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
gitea-mirror 2026-05-05 14:24:58 -06:00
Author
Owner

@fatedier commented on GitHub (May 6, 2025):

This is the expected behavior.

<!-- gh-comment-id:2853173301 --> @fatedier commented on GitHub (May 6, 2025): This is the expected behavior.
Author
Owner

@maasengit commented on GitHub (May 19, 2025):

turnserver's version is 4.6.2, do you think whether there is a bug in turnserver?

<!-- gh-comment-id:2890053211 --> @maasengit commented on GitHub (May 19, 2025): turnserver's version is 4.6.2, do you think whether there is a bug in turnserver?
Author
Owner

@fatedier commented on GitHub (May 19, 2025):

I’m not sure, but frp relies on multiple addresses to determine the NAT type. It’s recommended to configure a STUN server that supports this behavior.

<!-- gh-comment-id:2890090006 --> @fatedier commented on GitHub (May 19, 2025): I’m not sure, but frp relies on multiple addresses to determine the NAT type. It’s recommended to configure a STUN server that supports this behavior.
Author
Owner

@github-actions[bot] commented on GitHub (Jun 3, 2025):

Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.

<!-- gh-comment-id:2932996056 --> @github-actions[bot] commented on GitHub (Jun 3, 2025): Issues go stale after 14d of inactivity. Stale issues rot after an additional 3d of inactivity and eventually close.
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#3771
No description provided.