当前位置:论坛首页 > BUG提交 > Linux面板

【已解答】使用frp内网穿透后,访问宝塔面板,提示Internal...

发表在 BUG提交2026-1-20 17:14 [复制链接] 1 177

面板版本:宝塔linux面板 11.2.0

系统版本:CentOS  7.9

浏览器版本:火狐浏览器CentOS  7.9


问题现象:使用frp内网穿透后,使用代理的ip(112.34.56.78:27273)访问宝塔面板,提示Internal Server Error,使用内网ip(192.168.0.200:27273)访问宝塔面板,没有问题,使用命令行输入bt 用22显示面板错误日志,查看显示是forwarded_ips = request.headers.get('X-Forwarded-For').split(',')
AttributeError: 'NoneType' object has no attribute 'split'。


完整的错误日志是
[2026-01-20 17:08:36,822][ERROR] - Exception on /login [GET]
Traceback (most recent call last):
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "/www/server/panel/BTPanel/__init__.py", line 1954, in login
    return public.error_not_login(None)
  File "class/public.py", line 5755, in error_not_login
    client_status = check_client_info()
  File "class/public.py", line 8272, in check_client_info
    remote_addr = get_client_ip()
  File "class/public.py", line 834, in get_client_ip
    return GetClientIp()
  File "class/public.py", line 807, in GetClientIp
    forwarded_ips = request.headers.get('X-Forwarded-For').split(',')
AttributeError: 'NoneType' object has no attribute 'split'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/www/server/panel/pyenv/lib/python3.7/site-packages/flask/app.py", line 1676, in handle_user_exception
    return self.ensure_sync(handler)(e)
  File "/www/server/panel/BTPanel/__init__.py", line 425, in error_500
    return public.error_not_login()
  File "class/public.py", line 5755, in error_not_login
    client_status = check_client_info()
  File "class/public.py", line 8272, in check_client_info
    remote_addr = get_client_ip()
  File "class/public.py", line 834, in get_client_ip
    return GetClientIp()
  File "class/public.py", line 807, in GetClientIp
    forwarded_ips = request.headers.get('X-Forwarded-For').split(',')
AttributeError: 'NoneType' object has no attribute 'split'



使用道具 举报 只看该作者 回复
发表于 6 天前 | 显示全部楼层
您好,网络穿透问题暂时无法处理。暂时只能保证正常网络情况下可以正常访问。
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表