[GH-ISSUE #2099] 0.34.3 doesn't recognize token in ini, but only use the token in cli arg. #1666

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

Originally created by @wxiaoguang on GitHub (Nov 23, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/2099

[REQUIRED] hat version of frp are you using

Version: 0.34.3

[REQUIRED] What operating system and processor architecture are you using
OS: linux (possible all)
CPU architecture: amd64 (possible all)

[REQUIRED] description of errors

confile

[common]
bind_port = 7000
bind_udp_port = 7001

authentication_method = token
token = 1548730981638475

log file

2020/11/23 15:40:42 [I] [service.go:190] frps tcp listen on 0.0.0.0:7000
2020/11/23 15:40:42 [I] [root.go:215] start frps success
2020/11/23 15:40:45 [I] [service.go:444] [61969eb534133aa3] client login info: ip [x.x.x.x:63145] version [0.34.3] hostname [] os [darwin] arch [amd64]
2020/11/23 15:40:45 [W] [service.go:346] register control error: token in login doesn't match token from configuration

Steps to reproduce the issue

  1. set token in [common].[token] for both frpc and frps
  2. run frpc
  3. frpc can not connect to frps

INSTEAD, if I use frps -t TheToken, then frpc can connect.

Supplementary information

Can you guess what caused this issue

Wrong config & cli-argument logic

Checklist:

  • I included all information required in the sections above
  • I made sure there are no duplicates of this report (Use Search)
Originally created by @wxiaoguang on GitHub (Nov 23, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/2099 <!-- From Chinese to English by machine translation, welcome to revise and polish. --> <!-- ⚠️⚠️ Incomplete reports will be marked as invalid, and closed, with few exceptions ⚠️⚠️ --> <!-- in addition, please use search well so that the same solution can be found in the feedback, we will close it directly --> <!-- for convenience of differentiation, use FRPS or FRPC to refer to the FRP server or client --> **[REQUIRED] hat version of frp are you using** <!-- Use ./frpc -v or ./frps -v --> Version: 0.34.3 **[REQUIRED] What operating system and processor architecture are you using** OS: linux (possible all) CPU architecture: amd64 (possible all) **[REQUIRED] description of errors** **confile** <!-- Please pay attention to hiding the token, server_addr and other privacy information --> ``` [common] bind_port = 7000 bind_udp_port = 7001 authentication_method = token token = 1548730981638475 ``` **log file** <!-- If the file is too large, use Pastebin, for example https://pastebin.ubuntu.com/ --> ``` 2020/11/23 15:40:42 [I] [service.go:190] frps tcp listen on 0.0.0.0:7000 2020/11/23 15:40:42 [I] [root.go:215] start frps success 2020/11/23 15:40:45 [I] [service.go:444] [61969eb534133aa3] client login info: ip [x.x.x.x:63145] version [0.34.3] hostname [] os [darwin] arch [amd64] 2020/11/23 15:40:45 [W] [service.go:346] register control error: token in login doesn't match token from configuration ``` **Steps to reproduce the issue** 1. set `token` in `[common].[token]` for both frpc and frps 2. run frpc 3. frpc can not connect to frps INSTEAD, if I use `frps -t TheToken`, then frpc can connect. **Supplementary information** **Can you guess what caused this issue** Wrong config & cli-argument logic **Checklist**: <!--- Make sure you've completed the following steps (put an "X" between of brackets): --> - [X] I included all information required in the sections above - [X] I made sure there are no duplicates of this report [(Use Search)](https://github.com/fatedier/frp/issues?q=is%3Aissue)
Author
Owner

@wxiaoguang commented on GitHub (Nov 23, 2020):

Sorry but I think the problem is caused by the linux frps doesn't use frps.ini in $PWD.

<!-- gh-comment-id:731990557 --> @wxiaoguang commented on GitHub (Nov 23, 2020): Sorry but I think the problem is caused by the linux frps doesn't use `frps.ini` in `$PWD`.
Author
Owner

@fatedier commented on GitHub (Nov 23, 2020):

Yes, it will start with default configures if you not specified config file path.

frps -c ./frps.ini

<!-- gh-comment-id:732005676 --> @fatedier commented on GitHub (Nov 23, 2020): Yes, it will start with default configures if you not specified config file path. `frps -c ./frps.ini`
Author
Owner

@wxiaoguang commented on GitHub (Nov 23, 2020):

Well, a little misleading .... IMO it's better to tell users which config file they are using ...

And frpc's behavior is different from frps, it seems that frpc respects $PWD/frpc.ini.

<!-- gh-comment-id:732007872 --> @wxiaoguang commented on GitHub (Nov 23, 2020): Well, a little misleading .... IMO it's better to tell users which config file they are using ... And `frpc`'s behavior is different from `frps`, it seems that `frpc` respects `$PWD/frpc.ini`.
Author
Owner

@fatedier commented on GitHub (Nov 23, 2020):

I keep the way just for compatible reason since frpc can't start without any cmd parameters.

<!-- gh-comment-id:732017774 --> @fatedier commented on GitHub (Nov 23, 2020): I keep the way just for compatible reason since `frpc` can't start without any cmd parameters.
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#1666
No description provided.