[GH-ISSUE #3861] DashBoard 无法访问 error 401 #3069

Closed
opened 2026-05-05 13:59:12 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @sd-gov on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3861

Bug Description

frps-config.toml中配置webserver后,无法访问dashboard
Windows上用firefox访问ECS公网IP:7500,无法访问。ECS上 wget 127.0.0.1:7500 提示401错误

frpc Version

none

frps Version

0.53.0

System Architecture

linux/amd64

Configurations

bindAddr = "0.0.0.0"
bindPort = 7000
auth.method = "token"
auth.token = "XXXXXXX"

webServer.addr = "127.0.0.1"
webServer.port = 7500
webServer.user = "xxx"
webServer.password = "xxxxxx"

log.to = "/tmp/frps-log/frp.log"
log.level = "info"
log.maxDays = 3

Logs

No response

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 @sd-gov on GitHub (Dec 19, 2023). Original GitHub issue: https://github.com/fatedier/frp/issues/3861 ### Bug Description frps-config.toml中配置webserver后,无法访问dashboard Windows上用firefox访问ECS公网IP:7500,无法访问。ECS上 wget 127.0.0.1:7500 提示401错误 ### frpc Version none ### frps Version 0.53.0 ### System Architecture linux/amd64 ### Configurations bindAddr = "0.0.0.0" bindPort = 7000 auth.method = "token" auth.token = "XXXXXXX" webServer.addr = "127.0.0.1" webServer.port = 7500 webServer.user = "xxx" webServer.password = "xxxxxx" log.to = "/tmp/frps-log/frp.log" log.level = "info" log.maxDays = 3 ### Logs _No response_ ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [X] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [ ] Others
gitea-mirror 2026-05-05 13:59:12 -06:00
Author
Owner

@sd-gov commented on GitHub (Dec 19, 2023):

已解决
先用ifconfig查看ECS的内网ip,一般是eth0网卡的,
然后把.toml配置中的WebServer.Addr改成这个地址。
应该是阿里云的ECS的问题。
但是不知道为什么用127.0.0.1不行。。。。。

<!-- gh-comment-id:1862293342 --> @sd-gov commented on GitHub (Dec 19, 2023): 已解决 先用ifconfig查看ECS的内网ip,一般是eth0网卡的, 然后把.toml配置中的WebServer.Addr改成这个地址。 应该是阿里云的ECS的问题。 但是不知道为什么用127.0.0.1不行。。。。。
Author
Owner

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

wget http://user:password@127.0.0.1:7500
<!-- gh-comment-id:1862347091 --> @xqzr commented on GitHub (Dec 19, 2023): ```sh wget http://user:password@127.0.0.1:7500 ```
Author
Owner

@shiguang0122 commented on GitHub (Dec 19, 2023):

已解决 先用ifconfig查看ECS的内网ip,一般是eth0网卡的, 然后把.toml配置中的WebServer.Addr改成这个地址。 应该是阿里云的ECS的问题。 但是不知道为什么用127.0.0.1不行。。。。。

感谢,装了docker的华为云ECS,搭建frps遇到同样的问题,按你的方法解决了

<!-- gh-comment-id:1862392800 --> @shiguang0122 commented on GitHub (Dec 19, 2023): > 已解决 先用ifconfig查看ECS的内网ip,一般是eth0网卡的, 然后把.toml配置中的WebServer.Addr改成这个地址。 应该是阿里云的ECS的问题。 但是不知道为什么用127.0.0.1不行。。。。。 感谢,装了docker的华为云ECS,搭建frps遇到同样的问题,按你的方法解决了
Author
Owner

@sd-gov commented on GitHub (Dec 20, 2023):

wget http://user:password@127.0.0.1:7500

这样确实可以wget到一个html文件,但是《body》里面是空的:

而且dashboard是要在浏览器用的。

<!-- gh-comment-id:1863716191 --> @sd-gov commented on GitHub (Dec 20, 2023): > ```shell > wget http://user:password@127.0.0.1:7500 > ``` 这样确实可以wget到一个html文件,但是《body》里面是空的: 而且dashboard是要在浏览器用的。
Author
Owner

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

wget http://user:password@127.0.0.1:7500

这样确实可以wget到一个html文件,但是《body》里面是空的:

而且dashboard是要在浏览器用的。

他这样回答是因为问题中说到:wget http://127.0.0.1:7500 返回的是401,所以加上账号密码就可以访问到了。而我们访问127.0.0.1是因为外网没有访问到,所以才测本机是否能访问。就算本机加账号密码能访问了,外网还是不能访问。

默认webServer.addr绑定的127.0.0.1,外网不能访问估计是新版本的BUG。我之前同样的机器,同样的(ini版本的)配置,43.0版本外网是能访问的。这次升级最新的53.0 访问不到才到处搜找原因,直到按你说的绑定ecs局域网的IP,外网才访问到。

<!-- gh-comment-id:1864217239 --> @shiguang0122 commented on GitHub (Dec 20, 2023): > > ```shell > > wget http://user:password@127.0.0.1:7500 > > ``` > > 这样确实可以wget到一个html文件,但是《body》里面是空的: > > 而且dashboard是要在浏览器用的。 他这样回答是因为问题中说到:wget http://127.0.0.1:7500 返回的是401,所以加上账号密码就可以访问到了。而我们访问127.0.0.1是因为外网没有访问到,所以才测本机是否能访问。就算本机加账号密码能访问了,外网还是不能访问。 默认webServer.addr绑定的127.0.0.1,外网不能访问估计是新版本的BUG。我之前同样的机器,同样的(ini版本的)配置,43.0版本外网是能访问的。这次升级最新的53.0 访问不到才到处搜找原因,直到按你说的绑定ecs局域网的IP,外网才访问到。
Author
Owner

@AscendLiu commented on GitHub (Dec 31, 2023):

已解决 先用ifconfig查看ECS的内网ip,一般是eth0网卡的, 然后把.toml配置中的WebServer.Addr改成这个地址。 应该是阿里云的ECS的问题。 但是不知道为什么用127.0.0.1不行。。。。。

阿里云ECS服务器,按照该方法解决,能使用外网IP进行服务端的Web管理界面登录了

<!-- gh-comment-id:1872978399 --> @AscendLiu commented on GitHub (Dec 31, 2023): > 已解决 先用ifconfig查看ECS的内网ip,一般是eth0网卡的, 然后把.toml配置中的WebServer.Addr改成这个地址。 应该是阿里云的ECS的问题。 但是不知道为什么用127.0.0.1不行。。。。。 阿里云ECS服务器,按照该方法解决,能使用外网IP进行服务端的Web管理界面登录了
Author
Owner

@shinpei710 commented on GitHub (Jan 22, 2024):

阿里云,已解决,感谢!!

<!-- gh-comment-id:1903859456 --> @shinpei710 commented on GitHub (Jan 22, 2024): 阿里云,已解决,感谢!!
Author
Owner

@github-actions[bot] commented on GitHub (Feb 13, 2024):

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

<!-- gh-comment-id:1939873825 --> @github-actions[bot] commented on GitHub (Feb 13, 2024): Issues go stale after 21d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.
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#3069
No description provided.