[GH-ISSUE #3070] termux里fprc报lookup错误 #2460

Closed
opened 2026-05-05 13:34:53 -06:00 by gitea-mirror · 4 comments
Owner

Originally created by @pleasenter on GitHub (Aug 22, 2022).
Original GitHub issue: https://github.com/fatedier/frp/issues/3070

Bug Description

版本0.44,用pkg安装的,当frpc连接服务器用域名的时候就会报超时错误,但是直接用ip地址是没问题的,出错信息如下:
~ $ frpc -c frpc-s30.ini
这是用域名w.ayok.site时的输出:
2022/08/22 06:33:01 [W] [service.go:128] login to server failed: lookup w.ayok.s ite on [::1]:53: read udp [::1]:38759->[::1]:53: read: connection refused
2022/08/22 06:33:11 [W] [service.go:128] login to server failed: lookup w.ayok.s ite on [::1]:53: read udp [::1]:49193->[::1]:53: read: connection refused
这是直接用IP地址时的输出:
~ $ frpc -c frpc-s30.ini
2022/08/22 06:51:22 [I] [service.go:349] [63423b0857eacf41] login to server succ ess, get run id [63423b0857eacf41], server udp port [7001]
2022/08/22 06:51:22 [I] [proxy_manager.go:144] [63423b0857eacf41] proxy added: [ ssh-s30 code-server-s30 postgresql-s30]
2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [ssh-s30] start prox y success
2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [code-server-s30] st art proxy success
2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [postgresql-s30] sta rt proxy success
^C2022/08/22 06:55:09 [I] [visitor_manager.go:60] [63423b0857eacf41] gracefully shutdown visitor manager
2022/08/22 06:55:09 [I] [control.go:316] [63423b0857eacf41] control writer is cl osing
我在ubuntu平台和win10的平台用frpc连接都没有问题。服务器的版本是0.38,平台是openwrt。

frpc Version

0.44

frps Version

0.38

System Architecture

termux/openwrt

Configurations

frpc.ini
[common]
server_addr = 175.0.122.40
server_port = 7000
token = yy987654321
protocol = kcp
tcp_mux = true
heartbeat_interval = 30
heartbeat_timeout = 90
login_fail_exit = false

frps.ini for openwrt
config init
option stdout 1
option stderr 1
option user frps
option group frps
option respawn 1
config conf 'common'
option bind_addr 0.0.0.0
option bind_port 7000
option token yy987654321
option bind_udp_port 7001
option kcp_bind_port 7000

    option vhost_http_port 800
    option vhost_https_port 4430

    option dashboard_addr 0.0.0.0
    option dashboard_port 7500
    option dashboard_user admin
    option dashboard_pwd admin

    option subdomain_host ayok.site

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 @pleasenter on GitHub (Aug 22, 2022). Original GitHub issue: https://github.com/fatedier/frp/issues/3070 ### Bug Description 版本0.44,用pkg安装的,当frpc连接服务器用域名的时候就会报超时错误,但是直接用ip地址是没问题的,出错信息如下: ~ $ frpc -c frpc-s30.ini 这是用域名w.ayok.site时的输出: 2022/08/22 06:33:01 [W] [service.go:128] login to server failed: lookup w.ayok.s ite on [::1]:53: read udp [::1]:38759->[::1]:53: read: connection refused 2022/08/22 06:33:11 [W] [service.go:128] login to server failed: lookup w.ayok.s ite on [::1]:53: read udp [::1]:49193->[::1]:53: read: connection refused 这是直接用IP地址时的输出: ~ $ frpc -c frpc-s30.ini 2022/08/22 06:51:22 [I] [service.go:349] [63423b0857eacf41] login to server succ ess, get run id [63423b0857eacf41], server udp port [7001] 2022/08/22 06:51:22 [I] [proxy_manager.go:144] [63423b0857eacf41] proxy added: [ ssh-s30 code-server-s30 postgresql-s30] 2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [ssh-s30] start prox y success 2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [code-server-s30] st art proxy success 2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [postgresql-s30] sta rt proxy success ^C2022/08/22 06:55:09 [I] [visitor_manager.go:60] [63423b0857eacf41] gracefully shutdown visitor manager 2022/08/22 06:55:09 [I] [control.go:316] [63423b0857eacf41] control writer is cl osing 我在ubuntu平台和win10的平台用frpc连接都没有问题。服务器的版本是0.38,平台是openwrt。 ### frpc Version 0.44 ### frps Version 0.38 ### System Architecture termux/openwrt ### Configurations frpc.ini [common] server_addr = 175.0.122.40 server_port = 7000 token = yy987654321 protocol = kcp tcp_mux = true heartbeat_interval = 30 heartbeat_timeout = 90 login_fail_exit = false frps.ini for openwrt config init option stdout 1 option stderr 1 option user frps option group frps option respawn 1 config conf 'common' option bind_addr 0.0.0.0 option bind_port 7000 option token yy987654321 option bind_udp_port 7001 option kcp_bind_port 7000 option vhost_http_port 800 option vhost_https_port 4430 option dashboard_addr 0.0.0.0 option dashboard_port 7500 option dashboard_user admin option dashboard_pwd admin option subdomain_host ayok.site ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [X] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:34:53 -06:00
Author
Owner

@Becods commented on GitHub (Aug 22, 2022):

3e721d122b/conf/frpc_full.ini (L106)

<!-- gh-comment-id:1222427438 --> @Becods commented on GitHub (Aug 22, 2022): https://github.com/fatedier/frp/blob/3e721d122b2d5b33fdb90be279fcec2568ff14be/conf/frpc_full.ini#L106
Author
Owner

@pleasenter commented on GitHub (Aug 23, 2022):

加上这句dns_server = 8.8.8.8 后确实可以了,只是不太明白为什么,其它平台的不用加也可以。

<!-- gh-comment-id:1223436656 --> @pleasenter commented on GitHub (Aug 23, 2022): 加上这句dns_server = 8.8.8.8 后确实可以了,只是不太明白为什么,其它平台的不用加也可以。
Author
Owner

@Yang2635 commented on GitHub (Aug 24, 2022):

以linux为例,未指定dns_server参数的话,它会去系统的/etc/resolv.conf查找dns配置,利用配置的dns地址去解析域名。termux中没这个配置文件,所以需要手动指定一下dns_server

<!-- gh-comment-id:1225222978 --> @Yang2635 commented on GitHub (Aug 24, 2022): 以linux为例,未指定dns_server参数的话,它会去系统的/etc/resolv.conf查找dns配置,利用配置的dns地址去解析域名。termux中没这个配置文件,所以需要手动指定一下dns_server
Author
Owner

@github-actions[bot] commented on GitHub (Sep 24, 2022):

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

<!-- gh-comment-id:1256817054 --> @github-actions[bot] commented on GitHub (Sep 24, 2022): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d 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#2460
No description provided.