[GH-ISSUE #3576] frpc cannot recognize the alias in docker-compose #2853

Closed
opened 2026-05-05 13:50:48 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @aa51513 on GitHub (Aug 14, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3576

Bug Description

frpc cannot recognize the alias in docker-compose
frpc在docker-compose里无法识别别名

I use docker-compose to run redis server and frpc, intending to map port 6379 of redis server to other clients through stcp for debugging purposes
我使用docker-compose运行redis server 和frpc,意图将redis server的6379端口通过stcp映射给其他客户端用作调试用途

When it is running, I found that frpc cannot access the redis server through the service name
在实际使用中,我发现frpc无法通过服务名称来访问redis server

I try to enter the /bin/sh interface of the docker container where frpc is located, run ping redis-server, and get a normal ping response
我尝试进入frpc所在的docker容器的/bin/sh界面,运行ping redis-server,能够得到正常的响应

Then I used the nc redis-server 6379 command to test, and I was able to get an established connection
随后我使用nc redis-server 6379命令来进行测试,也能够得到一个established 连接

This phenomenon makes me very confused. Is there any difference in the domain name resolution operation of frpc?
这一现象让我非常疑惑,是否frpc在域名解析操作上有什么不一样的地方?

frpc Version

v0.51.2

frps Version

v0.51.2

System Architecture

linux/amd64

Configurations

[common]
server_addr = frpss.myserver.com
server_port = 7000
token = 12345678
protocol = tcp

[stcp_tunnel_redis_in_docker]
type = stcp
sk = 987654321
local_ip = redis-server
local_port = 6379

Logs

2023-08-14T05:55:19.172557874Z 2023/08/14 05:55:19 [E] [proxy.go:197] [89fa7e92b01f94c3] [stcp_tunnel_redis_in_docker] connect to local service [redis-server:6379] error: dial tcp: lookup redis-server on 127.0.0.11:53: no such host

Steps to reproduce

The problem is 100% reproduced
该问题能够100%重现

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @aa51513 on GitHub (Aug 14, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3576 ### Bug Description frpc cannot recognize the alias in docker-compose frpc在docker-compose里无法识别别名 I use docker-compose to run redis server and frpc, intending to map port 6379 of redis server to other clients through stcp for debugging purposes 我使用docker-compose运行redis server 和frpc,意图将redis server的6379端口通过stcp映射给其他客户端用作调试用途 When it is running, I found that frpc cannot access the redis server through the service name 在实际使用中,我发现frpc无法通过服务名称来访问redis server I try to enter the /bin/sh interface of the docker container where frpc is located, run ping redis-server, and get a normal ping response 我尝试进入frpc所在的docker容器的/bin/sh界面,运行ping redis-server,能够得到正常的响应 Then I used the nc redis-server 6379 command to test, and I was able to get an established connection 随后我使用nc redis-server 6379命令来进行测试,也能够得到一个established 连接 This phenomenon makes me very confused. Is there any difference in the domain name resolution operation of frpc? 这一现象让我非常疑惑,是否frpc在域名解析操作上有什么不一样的地方? ### frpc Version v0.51.2 ### frps Version v0.51.2 ### System Architecture linux/amd64 ### Configurations [common] server_addr = frpss.myserver.com server_port = 7000 token = 12345678 protocol = tcp [stcp_tunnel_redis_in_docker] type = stcp sk = 987654321 local_ip = redis-server local_port = 6379 ### Logs 2023-08-14T05:55:19.172557874Z 2023/08/14 05:55:19 [E] [proxy.go:197] [89fa7e92b01f94c3] [stcp_tunnel_redis_in_docker] connect to local service [redis-server:6379] error: dial tcp: lookup redis-server on 127.0.0.11:53: no such host ### Steps to reproduce The problem is 100% reproduced 该问题能够100%重现 ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [X] Client Plugin - [x] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:50:48 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Sep 16, 2023):

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

<!-- gh-comment-id:1722079546 --> @github-actions[bot] commented on GitHub (Sep 16, 2023): Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
Author
Owner

@aa51513 commented on GitHub (Sep 18, 2023):

Extend life cycle of this issue

<!-- gh-comment-id:1722665473 --> @aa51513 commented on GitHub (Sep 18, 2023): Extend life cycle of this issue
Author
Owner

@aa51513 commented on GitHub (Sep 18, 2023):

I'm very sorry, I accidentally configured the dns_server parameter, deleting it made everything fine.

<!-- gh-comment-id:1723068508 --> @aa51513 commented on GitHub (Sep 18, 2023): I'm very sorry, I accidentally configured the dns_server parameter, deleting it made everything fine.
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#2853
No description provided.