[GH-ISSUE #1229] auth_token一致,而客户端frpc运行提示:authorization failed #968

Closed
opened 2026-05-05 12:37:10 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @snowdream on GitHub (May 1, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1229

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
frpc frps
0.27.0

What operating system and processor architecture are you using (go env)?

Configures you used:
frps.ini

# [common] is integral section
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = 2222
# udp port used for kcp protocol, it can be same with 'bind_port'
# if not set, kcp is disabled in frps
kcp_bind_port = 2222
# if you want to configure or reload frps by dashboard, dashboard_port must be set
dashboard_port = 6443
# dashboard assets directory(only for debug mode)
dashboard_user = *****(隐藏)
dashboard_pwd = *****(隐藏)
# assets_dir = ./static
vhost_http_port = 5000
vhost_https_port = 5001
# console or real logFile path like ./frps.log
log_file = /root/frps.log
# debug, info, warn, error
log_level = info
log_max_days = 3
# auth token
token = IZduangyDp6sAUJz
# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
#allow_ports = 1-65535
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
max_pool_count = 10
# if tcp stream multiplexing is used, default is true
tcp_mux = true
# if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file
# when subdomain is test, the host used by routing is test.frps.com
subdomain_host = *****(隐藏)                     

frpc.ini

[common]
server_addr = *****(隐藏)
server_port = 2222
auth_token = IZduangyDp6sAUJz
pool_count = 5

log_file = /tmp/frpc.log
log_level = info
log_max_days = 3

admin_addr = 127.0.0.1
admin_port = 7400

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 8022
use_encryption = true
use_compression = true

[http]
type = http
local_port = 5000
subdomain = www
use_encryption = true
use_compression = true

[range:tcp_port]
type = tcp
local_ip = 127.0.0.1
local_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001
remote_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001
use_encryption = true
use_compression = true

[range:udp_port]
type = udp
local_ip = 127.0.0.1
local_port = 1900,5000,5001,5353,6001-6006,50001,50002
remote_port = 1900,5000,5001,5353,6001-6006,50001,50002
use_encryption = true
use_compression = true

Steps to reproduce the issue:

  1. systemctl start frps
  2. /usr/bin/frpc -c /etc/frp/frpc.ini

Describe the results you received:
frps:

root@vultr frp]# systemctl status frps
● frps.service - Frp Server Service
   Loaded: loaded (/usr/lib/systemd/system/frps.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-05-01 16:50:50 UTC; 16min ago
 Main PID: 16344 (frps)
   CGroup: /system.slice/frps.service
           └─16344 /usr/bin/frps -c /etc/frp/frps.ini

May 01 16:50:50 vultr.guest systemd[1]: Stopped Frp Server Service.
May 01 16:50:50 vultr.guest systemd[1]: Started Frp Server Service.

frps.log

[root@vultr frp]# cat /root/frps.log 
2019/05/01 16:50:50 [I] [service.go:139] frps tcp listen on 0.0.0.0:2222
2019/05/01 16:50:50 [I] [service.go:148] frps kcp listen on udp 0.0.0.0:2222
2019/05/01 16:50:50 [I] [service.go:181] http service listen on 0.0.0.0:5000
2019/05/01 16:50:50 [I] [service.go:202] https service listen on 0.0.0.0:5001
2019/05/01 16:50:50 [I] [service.go:232] Dashboard listen on 0.0.0.0:6443
2019/05/01 16:50:50 [I] [root.go:204] Start frps success
2019/05/01 16:50:58 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64]
2019/05/01 16:50:58 [W] [service.go:282] authorization failed
2019/05/01 16:54:02 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64]
2019/05/01 16:54:02 [W] [service.go:282] authorization failed
2019/05/01 16:57:30 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64]
2019/05/01 16:57:30 [W] [service.go:282] authorization failed
2019/05/01 17:00:33 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64]
2019/05/01 17:00:33 [W] [service.go:282] authorization failed

frpc

root@HomeMedia:/etc/frp# /usr/bin/frpc -c /etc/frp/frpc.ini
authorization failed

Describe the results you expected:
frpc 正常运行

Additional information you deem important (e.g. issue happens only occasionally):
root@HomeMedia:/etc/frp# /usr/bin/frpc -c /etc/frp/frpc.ini
authorization failed

Can you point out what caused this issue (optional)

Originally created by @snowdream on GitHub (May 1, 2019). Original GitHub issue: https://github.com/fatedier/frp/issues/1229 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** frpc frps 0.27.0 **What operating system and processor architecture are you using (`go env`)?** **Configures you used:** frps.ini ``` # [common] is integral section [common] # A literal address or host name for IPv6 must be enclosed # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80" bind_addr = 0.0.0.0 bind_port = 2222 # udp port used for kcp protocol, it can be same with 'bind_port' # if not set, kcp is disabled in frps kcp_bind_port = 2222 # if you want to configure or reload frps by dashboard, dashboard_port must be set dashboard_port = 6443 # dashboard assets directory(only for debug mode) dashboard_user = *****(隐藏) dashboard_pwd = *****(隐藏) # assets_dir = ./static vhost_http_port = 5000 vhost_https_port = 5001 # console or real logFile path like ./frps.log log_file = /root/frps.log # debug, info, warn, error log_level = info log_max_days = 3 # auth token token = IZduangyDp6sAUJz # only allow frpc to bind ports you list, if you set nothing, there won't be any limit #allow_ports = 1-65535 # pool_count in each proxy will change to max_pool_count if they exceed the maximum value max_pool_count = 10 # if tcp stream multiplexing is used, default is true tcp_mux = true # if subdomain_host is not empty, you can set subdomain when type is http or https in frpc's configure file # when subdomain is test, the host used by routing is test.frps.com subdomain_host = *****(隐藏) ``` frpc.ini ``` [common] server_addr = *****(隐藏) server_port = 2222 auth_token = IZduangyDp6sAUJz pool_count = 5 log_file = /tmp/frpc.log log_level = info log_max_days = 3 admin_addr = 127.0.0.1 admin_port = 7400 [ssh] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port = 8022 use_encryption = true use_compression = true [http] type = http local_port = 5000 subdomain = www use_encryption = true use_compression = true [range:tcp_port] type = tcp local_ip = 127.0.0.1 local_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001 remote_port = 21,109,110,143,465,995,993,21,80,443,1900,5001-5006,5353,6001-6010,6690,9900,9901,9025-9040,50001 use_encryption = true use_compression = true [range:udp_port] type = udp local_ip = 127.0.0.1 local_port = 1900,5000,5001,5353,6001-6006,50001,50002 remote_port = 1900,5000,5001,5353,6001-6006,50001,50002 use_encryption = true use_compression = true ``` **Steps to reproduce the issue:** 1. systemctl start frps 2. /usr/bin/frpc -c /etc/frp/frpc.ini **Describe the results you received:** frps: ``` root@vultr frp]# systemctl status frps ● frps.service - Frp Server Service Loaded: loaded (/usr/lib/systemd/system/frps.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2019-05-01 16:50:50 UTC; 16min ago Main PID: 16344 (frps) CGroup: /system.slice/frps.service └─16344 /usr/bin/frps -c /etc/frp/frps.ini May 01 16:50:50 vultr.guest systemd[1]: Stopped Frp Server Service. May 01 16:50:50 vultr.guest systemd[1]: Started Frp Server Service. ``` frps.log ``` [root@vultr frp]# cat /root/frps.log 2019/05/01 16:50:50 [I] [service.go:139] frps tcp listen on 0.0.0.0:2222 2019/05/01 16:50:50 [I] [service.go:148] frps kcp listen on udp 0.0.0.0:2222 2019/05/01 16:50:50 [I] [service.go:181] http service listen on 0.0.0.0:5000 2019/05/01 16:50:50 [I] [service.go:202] https service listen on 0.0.0.0:5001 2019/05/01 16:50:50 [I] [service.go:232] Dashboard listen on 0.0.0.0:6443 2019/05/01 16:50:50 [I] [root.go:204] Start frps success 2019/05/01 16:50:58 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64] 2019/05/01 16:50:58 [W] [service.go:282] authorization failed 2019/05/01 16:54:02 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64] 2019/05/01 16:54:02 [W] [service.go:282] authorization failed 2019/05/01 16:57:30 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64] 2019/05/01 16:57:30 [W] [service.go:282] authorization failed 2019/05/01 17:00:33 [I] [service.go:340] client login info: ip [] version [0.27.0] hostname [] os [linux] arch [amd64] 2019/05/01 17:00:33 [W] [service.go:282] authorization failed ``` frpc ``` root@HomeMedia:/etc/frp# /usr/bin/frpc -c /etc/frp/frpc.ini authorization failed ``` **Describe the results you expected:** frpc 正常运行 **Additional information you deem important (e.g. issue happens only occasionally):** root@HomeMedia:/etc/frp# /usr/bin/frpc -c /etc/frp/frpc.ini authorization failed **Can you point out what caused this issue (optional)**
Author
Owner

@snowdream commented on GitHub (May 1, 2019):

frpc.ini 中token字段错误,可能是从别的地方拷贝过来修改,没注意。

答案就是: 把 frpc.ini中的auth_token = IZduangyDp6sAUJz
改成 token = IZduangyDp6sAUJz

<!-- gh-comment-id:488347152 --> @snowdream commented on GitHub (May 1, 2019): frpc.ini 中token字段错误,可能是从别的地方拷贝过来修改,没注意。 答案就是: 把 frpc.ini中的auth_token = IZduangyDp6sAUJz 改成 token = IZduangyDp6sAUJz
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#968
No description provided.