[GH-ISSUE #3870] 我在容器中运行frpc,当容器停止后,无法再次启动frpc,除非我重启整个系统 #3077

Closed
opened 2026-05-05 13:59:38 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @931805085 on GitHub (Dec 20, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3870

Bug Description

root@17c36744a7be:/data/docker/frpc# ./frpc -c frpc.toml
2023/12/20 15:05:10 [I] [root.go:141] start frpc service for config file [frpc.toml]
2023/12/20 15:05:10 [I] [service.go:288] try to connect to server...
2023/12/20 15:05:14 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3]
2023/12/20 15:05:14 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal]
2023/12/20 15:05:14 [I] [service.go:288] [48de1c586b168eb3] try to connect to server...
2023/12/20 15:05:14 [I] [control.go:169] [48de1c586b168eb3] [portal] start proxy success
2023/12/20 15:05:19 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3]
2023/12/20 15:05:19 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal]
2023/12/20 15:05:19 [I] [panic.go:884] frpc service for config file [frpc.toml] stopped
panic: close of closed channel

goroutine 1 [running]:
github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess.func1()
github.com/fatedier/frp/client/service.go:331 +0x517
github.com/fatedier/frp/pkg/util/wait.BackoffUntil(0xc000217a10, {0xd2f4a0, 0xc0000fd710}, 0x1, 0xc0000943c0)
github.com/fatedier/frp/pkg/util/wait/backoff.go:135 +0x118
github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess(0xc00017c1c0, 0x2540be400, 0x1)
github.com/fatedier/frp/client/service.go:336 +0x1e9
github.com/fatedier/frp/client.(*Service).Run(0xc00017c1c0, {0xd35450?, 0xc0000a6000?})
github.com/fatedier/frp/client/service.go:166 +0x10c
github.com/fatedier/frp/cmd/frpc/sub.startService(0xc000158840, {0xc00012dfb0, 0x1, 0x1}, {0x1182358, 0x0, 0x0}, {0x7ffd0071590d, 0x9})
github.com/fatedier/frp/cmd/frpc/sub/root.go:159 +0x37d
github.com/fatedier/frp/cmd/frpc/sub.runClient({0x7ffd0071590d, 0x9})
github.com/fatedier/frp/cmd/frpc/sub/root.go:129 +0x19c
github.com/fatedier/frp/cmd/frpc/sub.glob..func2(0x1147100?, {0xb8a06f?, 0x2?, 0x2?})
github.com/fatedier/frp/cmd/frpc/sub/root.go:69 +0x4c
github.com/spf13/cobra.(*Command).execute(0x1147100, {0xc0000a2160, 0x2, 0x2})
github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x1147100)
github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/fatedier/frp/cmd/frpc/sub.Execute()
github.com/fatedier/frp/cmd/frpc/sub/root.go:100 +0x25
main.main()

frpc Version

0.53.0

frps Version

0.53.0

System Architecture

linux/amd64

Configurations

serverAddr = "zchome.us.to"
serverPort = 14443

proxies
name = "portal"
type = "tcp"
localIP = "nginx"
localPort = 8070
remotePort = 9070

Logs

root@17c36744a7be:/data/docker/frpc# ./frpc -c frpc.toml
2023/12/20 15:05:10 [I] [root.go:141] start frpc service for config file [frpc.toml]
2023/12/20 15:05:10 [I] [service.go:288] try to connect to server...
2023/12/20 15:05:14 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3]
2023/12/20 15:05:14 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal]
2023/12/20 15:05:14 [I] [service.go:288] [48de1c586b168eb3] try to connect to server...
2023/12/20 15:05:14 [I] [control.go:169] [48de1c586b168eb3] [portal] start proxy success
2023/12/20 15:05:19 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3]
2023/12/20 15:05:19 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal]
2023/12/20 15:05:19 [I] [panic.go:884] frpc service for config file [frpc.toml] stopped
panic: close of closed channel

goroutine 1 [running]:
github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess.func1()
github.com/fatedier/frp/client/service.go:331 +0x517
github.com/fatedier/frp/pkg/util/wait.BackoffUntil(0xc000217a10, {0xd2f4a0, 0xc0000fd710}, 0x1, 0xc0000943c0)
github.com/fatedier/frp/pkg/util/wait/backoff.go:135 +0x118
github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess(0xc00017c1c0, 0x2540be400, 0x1)
github.com/fatedier/frp/client/service.go:336 +0x1e9
github.com/fatedier/frp/client.(*Service).Run(0xc00017c1c0, {0xd35450?, 0xc0000a6000?})
github.com/fatedier/frp/client/service.go:166 +0x10c
github.com/fatedier/frp/cmd/frpc/sub.startService(0xc000158840, {0xc00012dfb0, 0x1, 0x1}, {0x1182358, 0x0, 0x0}, {0x7ffd0071590d, 0x9})
github.com/fatedier/frp/cmd/frpc/sub/root.go:159 +0x37d
github.com/fatedier/frp/cmd/frpc/sub.runClient({0x7ffd0071590d, 0x9})
github.com/fatedier/frp/cmd/frpc/sub/root.go:129 +0x19c
github.com/fatedier/frp/cmd/frpc/sub.glob..func2(0x1147100?, {0xb8a06f?, 0x2?, 0x2?})
github.com/fatedier/frp/cmd/frpc/sub/root.go:69 +0x4c
github.com/spf13/cobra.(*Command).execute(0x1147100, {0xc0000a2160, 0x2, 0x2})
github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x1147100)
github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.8.0/command.go:1039
github.com/fatedier/frp/cmd/frpc/sub.Execute()
github.com/fatedier/frp/cmd/frpc/sub/root.go:100 +0x25
main.main()

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 @931805085 on GitHub (Dec 20, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3870 ### Bug Description root@17c36744a7be:/data/docker/frpc# ./frpc -c frpc.toml 2023/12/20 15:05:10 [I] [root.go:141] start frpc service for config file [frpc.toml] 2023/12/20 15:05:10 [I] [service.go:288] try to connect to server... 2023/12/20 15:05:14 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3] 2023/12/20 15:05:14 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal] 2023/12/20 15:05:14 [I] [service.go:288] [48de1c586b168eb3] try to connect to server... 2023/12/20 15:05:14 [I] [control.go:169] [48de1c586b168eb3] [portal] start proxy success 2023/12/20 15:05:19 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3] 2023/12/20 15:05:19 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal] 2023/12/20 15:05:19 [I] [panic.go:884] frpc service for config file [frpc.toml] stopped panic: close of closed channel goroutine 1 [running]: github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess.func1() github.com/fatedier/frp/client/service.go:331 +0x517 github.com/fatedier/frp/pkg/util/wait.BackoffUntil(0xc000217a10, {0xd2f4a0, 0xc0000fd710}, 0x1, 0xc0000943c0) github.com/fatedier/frp/pkg/util/wait/backoff.go:135 +0x118 github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess(0xc00017c1c0, 0x2540be400, 0x1) github.com/fatedier/frp/client/service.go:336 +0x1e9 github.com/fatedier/frp/client.(*Service).Run(0xc00017c1c0, {0xd35450?, 0xc0000a6000?}) github.com/fatedier/frp/client/service.go:166 +0x10c github.com/fatedier/frp/cmd/frpc/sub.startService(0xc000158840, {0xc00012dfb0, 0x1, 0x1}, {0x1182358, 0x0, 0x0}, {0x7ffd0071590d, 0x9}) github.com/fatedier/frp/cmd/frpc/sub/root.go:159 +0x37d github.com/fatedier/frp/cmd/frpc/sub.runClient({0x7ffd0071590d, 0x9}) github.com/fatedier/frp/cmd/frpc/sub/root.go:129 +0x19c github.com/fatedier/frp/cmd/frpc/sub.glob..func2(0x1147100?, {0xb8a06f?, 0x2?, 0x2?}) github.com/fatedier/frp/cmd/frpc/sub/root.go:69 +0x4c github.com/spf13/cobra.(*Command).execute(0x1147100, {0xc0000a2160, 0x2, 0x2}) github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa github.com/spf13/cobra.(*Command).ExecuteC(0x1147100) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425 github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 github.com/fatedier/frp/cmd/frpc/sub.Execute() github.com/fatedier/frp/cmd/frpc/sub/root.go:100 +0x25 main.main() ### frpc Version 0.53.0 ### frps Version 0.53.0 ### System Architecture linux/amd64 ### Configurations serverAddr = "zchome.us.to" serverPort = 14443 [[proxies]] name = "portal" type = "tcp" localIP = "nginx" localPort = 8070 remotePort = 9070 ### Logs root@17c36744a7be:/data/docker/frpc# ./frpc -c frpc.toml 2023/12/20 15:05:10 [I] [root.go:141] start frpc service for config file [frpc.toml] 2023/12/20 15:05:10 [I] [service.go:288] try to connect to server... 2023/12/20 15:05:14 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3] 2023/12/20 15:05:14 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal] 2023/12/20 15:05:14 [I] [service.go:288] [48de1c586b168eb3] try to connect to server... 2023/12/20 15:05:14 [I] [control.go:169] [48de1c586b168eb3] [portal] start proxy success 2023/12/20 15:05:19 [I] [service.go:279] [48de1c586b168eb3] login to server success, get run id [48de1c586b168eb3] 2023/12/20 15:05:19 [I] [proxy_manager.go:173] [48de1c586b168eb3] proxy added: [portal] 2023/12/20 15:05:19 [I] [panic.go:884] frpc service for config file [frpc.toml] stopped panic: close of closed channel goroutine 1 [running]: github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess.func1() github.com/fatedier/frp/client/service.go:331 +0x517 github.com/fatedier/frp/pkg/util/wait.BackoffUntil(0xc000217a10, {0xd2f4a0, 0xc0000fd710}, 0x1, 0xc0000943c0) github.com/fatedier/frp/pkg/util/wait/backoff.go:135 +0x118 github.com/fatedier/frp/client.(*Service).loopLoginUntilSuccess(0xc00017c1c0, 0x2540be400, 0x1) github.com/fatedier/frp/client/service.go:336 +0x1e9 github.com/fatedier/frp/client.(*Service).Run(0xc00017c1c0, {0xd35450?, 0xc0000a6000?}) github.com/fatedier/frp/client/service.go:166 +0x10c github.com/fatedier/frp/cmd/frpc/sub.startService(0xc000158840, {0xc00012dfb0, 0x1, 0x1}, {0x1182358, 0x0, 0x0}, {0x7ffd0071590d, 0x9}) github.com/fatedier/frp/cmd/frpc/sub/root.go:159 +0x37d github.com/fatedier/frp/cmd/frpc/sub.runClient({0x7ffd0071590d, 0x9}) github.com/fatedier/frp/cmd/frpc/sub/root.go:129 +0x19c github.com/fatedier/frp/cmd/frpc/sub.glob..func2(0x1147100?, {0xb8a06f?, 0x2?, 0x2?}) github.com/fatedier/frp/cmd/frpc/sub/root.go:69 +0x4c github.com/spf13/cobra.(*Command).execute(0x1147100, {0xc0000a2160, 0x2, 0x2}) github.com/spf13/cobra@v1.8.0/command.go:983 +0xaaa github.com/spf13/cobra.(*Command).ExecuteC(0x1147100) github.com/spf13/cobra@v1.8.0/command.go:1115 +0x425 github.com/spf13/cobra.(*Command).Execute(...) github.com/spf13/cobra@v1.8.0/command.go:1039 github.com/fatedier/frp/cmd/frpc/sub.Execute() github.com/fatedier/frp/cmd/frpc/sub/root.go:100 +0x25 main.main() ### 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

@xqzr commented on GitHub (Dec 20, 2023):

#3860

<!-- gh-comment-id:1865192095 --> @xqzr commented on GitHub (Dec 20, 2023): #3860
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#3077
No description provided.