[GH-ISSUE #3899] login to server failed: token in login doesn't match token from configuration #3093

Closed
opened 2026-05-05 14:00:09 -06:00 by gitea-mirror · 5 comments
Owner

Originally created by @joke-go on GitHub (Dec 26, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3899

Bug Description

login to server failed: token in login doesn't match token from configuration

please help me to solve it

frpc Version

0.52.3

frps Version

0.52.3

System Architecture

linux/amd64

Configurations

server:
[common]
bindPort = 7000
auth.token = "12345678"

client:
serverAddr = "XXXX"
serverPort = 7000
webServer.addr = "XXXX"
webServer.port = 7400
webServer.user = "admin"
webServer.password = "admin"

auth.token = "12345678"

proxies
name = "test-tcp99"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 6000

Logs

server:
Dec 26 20:15:13 ubuntu2 frps[902506]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!
Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [root.go:102] frps uses config file: /root/frps.toml
Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [service.go:200] frps tcp listen on 0.0.0.0:7000
Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [service.go:312] Dashboard listen on 0.0.0.0:7500
Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [root.go:111] frps started successfully
Dec 26 20:15:18 ubuntu2 frps[902506]: 2023/12/26 20:15:18 [I] [service.go:533] [10d1a482c744ca63] client login info: ip [172.24.22.99:38878] version [0.52.3] hostname [] os [linux] arch [amd64]
Dec 26 20:15:18 ubuntu2 frps[902506]: 2023/12/26 20:15:18 [W] [service.go:410] register control error: token in login doesn't match token from configuration

client:
12月 26 20:15:22 workspace-500-521cn systemd[1]: Started fraps service.
12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [I] [root.go:139] start frpc service for config file [/root/frpc.toml]
12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [E] [service.go:291] token in login doesn't match token from configuration
12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [W] [service.go:131] login to server failed: token in login doesn't match token from configuration
12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [I] [root.go:154] frpc service for config file [/root/frpc.toml] stopped
12月 26 20:15:22 workspace-500-521cn systemd[1]: frpc.service: Deactivated successfully.

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 @joke-go on GitHub (Dec 26, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3899 ### Bug Description login to server failed: token in login doesn't match token from configuration please help me to solve it ### frpc Version 0.52.3 ### frps Version 0.52.3 ### System Architecture linux/amd64 ### Configurations server: [common] bindPort = 7000 auth.token = "12345678" client: serverAddr = "XXXX" serverPort = 7000 webServer.addr = "XXXX" webServer.port = 7400 webServer.user = "admin" webServer.password = "admin" auth.token = "12345678" [[proxies]] name = "test-tcp99" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 6000 ### Logs server: Dec 26 20:15:13 ubuntu2 frps[902506]: WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [root.go:102] frps uses config file: /root/frps.toml Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [service.go:200] frps tcp listen on 0.0.0.0:7000 Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [service.go:312] Dashboard listen on 0.0.0.0:7500 Dec 26 20:15:13 ubuntu2 frps[902506]: 2023/12/26 20:15:13 [I] [root.go:111] frps started successfully Dec 26 20:15:18 ubuntu2 frps[902506]: 2023/12/26 20:15:18 [I] [service.go:533] [10d1a482c744ca63] client login info: ip [172.24.22.99:38878] version [0.52.3] hostname [] os [linux] arch [amd64] Dec 26 20:15:18 ubuntu2 frps[902506]: 2023/12/26 20:15:18 [W] [service.go:410] register control error: token in login doesn't match token from configuration client: 12月 26 20:15:22 workspace-500-521cn systemd[1]: Started fraps service. 12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [I] [root.go:139] start frpc service for config file [/root/frpc.toml] 12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [E] [service.go:291] token in login doesn't match token from configuration 12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [W] [service.go:131] login to server failed: token in login doesn't match token from configuration 12月 26 20:15:22 workspace-500-521cn frpc[489024]: 2023/12/26 20:15:22 [I] [root.go:154] frpc service for config file [/root/frpc.toml] stopped 12月 26 20:15:22 workspace-500-521cn systemd[1]: frpc.service: Deactivated successfully. ### 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 - [X] Others
Author
Owner

@superzjg commented on GitHub (Dec 26, 2023):

[v0.53.0] The new command line parameter --strict_config has been added to enable strict configuration validation mode. It will throw an error for unknown fields instead of ignoring them.

I guess you should delete [common].

<!-- gh-comment-id:1869523785 --> @superzjg commented on GitHub (Dec 26, 2023): [v0.53.0] The new command line parameter `--strict_config` has been added to enable strict configuration validation mode. It will throw an error for unknown fields instead of ignoring them. I guess you should delete `[common]`.
Author
Owner

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

WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead!

[common]

<!-- gh-comment-id:1870272327 --> @xqzr commented on GitHub (Dec 27, 2023): > WARNING: ini format is deprecated and the support will be removed in the future, please use yaml/json/toml format instead! ~`[common]`~
Author
Owner

@FarmerChillax commented on GitHub (Dec 28, 2023):

You need to remove the common line.

The server does not actually use your configuration file to start. You can verify it by modifying the port.

See more: https://gofrp.org/zh-cn/docs/features/common/configure/

<!-- gh-comment-id:1870738763 --> @FarmerChillax commented on GitHub (Dec 28, 2023): You need to remove the `common` line. The server does not actually use your configuration file to start. You can verify it by modifying the port. See more: https://gofrp.org/zh-cn/docs/features/common/configure/
Author
Owner

@joke-go commented on GitHub (Dec 28, 2023):

I remove the common line.
then it give me this : json: cannot unmarshal string into Go struct field ServerConfig.bindPort of type int
I look the manual again and search online,then I add every value except port in "",and it worked
like this:
image

thanks everyone

<!-- gh-comment-id:1870779000 --> @joke-go commented on GitHub (Dec 28, 2023): I remove the common line. then it give me this : json: cannot unmarshal string into Go struct field ServerConfig.bindPort of type int I look the manual again and search online,then I add every value except port in "",and it worked like this: ![image](https://github.com/fatedier/frp/assets/153909141/090d47e0-9b06-450e-8fa0-58f0fae48479) thanks everyone
Author
Owner

@D0ub1e-D commented on GitHub (Mar 7, 2024):

That really confuse me.....

<!-- gh-comment-id:1982451286 --> @D0ub1e-D commented on GitHub (Mar 7, 2024): That really confuse me.....
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#3093
No description provided.