找回密码
 注册
查看: 97|回复: 0

openstack的dashboard,登录异常,显示访问 Dashboard 首页后,被重定向到了登录页面(/auth/login/)。这通常意味着用户当前没

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2026-4-12 01:00:03 | 显示全部楼层 |阅读模式
21:09:20.315 导航至 http://192.168.16.80/dashboard/21:09:20.785 JQMIGRATE: Logging is active output.7412cc15fba2.js:698:15921:09:20.946 XHRGEThttp://192.168.16.80/dashboard/header/?next=/dashboard/[HTTP/1.1 200 OK 58ms]21:09:36.271 导航至 http://192.168.16.80/dashboard/auth/login/. s1 W% i' |6 S' r
. y( A; w. r) g8 [6 z5 |

1 i, p% W# A$ `( z- ]3 |

' c) K& R: e9 {4 |2 W7 C; G" J) ?$ w
根据你提供的浏览器控制台日志,可以解读出以下信息:
  • 页面访问路径:先尝试访问 http://192.168.16.80/dashboard/,然后通过 XHR 请求 /dashboard/header/(状态 200 成功),最后页面主动跳转到了 /dashboard/auth/login/。
  • 关键现象:访问 Dashboard 首页后,被重定向到了登录页面(/auth/login/)。这通常意味着用户当前没有有效的认证会话(未登录或会话已过期),Horizon 强制要求重新登录。

      ~% D6 Q3 f" }. i, g; A' A, f/ Y
可能的原因与排查方向1. 浏览器 Cookie / Session 问题
  • 原因:之前的登录会话已过期,或者浏览器清除了 Cookie。
  • 解决:清除浏览器缓存和 Horizon 相关的 Cookie,然后重新访问 /dashboard/,应该会直接显示登录页(而不是先跳转首页再重定向)。日志中显示的跳转是正常逻辑。
    ! p: c) Q( f% b
+ b" v3 Q& _5 {2 w! T. |

; h) [( Y/ d3 x3 i" d
( j" \' U! |9 N' }
3 E6 B( C9 y% P* n; z' ]* E

' x8 F- G; h2 ]  [' b3 h& ?
& l: ^% M4 f* j
查看日志:. d! [' d; O9 A* T
[root@controller ~]# tail -f /var/log/httpd/openstack-dashboard-error_log
% o+ g# a0 ^# D- q+ Q5 K[Thu Mar 12 05:13:00.562017 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106] INFO openstack_auth.plugin.base Attempted scope to domain default failed, will attempt to scope to another domain.[Thu Mar 12 05:13:00.721893 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106] INFO openstack_auth.forms Login successful for user "admin" using domain "default", remote address 192.168.16.6.[Thu Mar 12 05:13:02.322794 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106] ERROR django.request Internal Server Error: /dashboard/auth/login/[Thu Mar 12 05:13:02.322840 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106] Traceback (most recent call last):[Thu Mar 12 05:13:02.322861 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/core/handlers/exception.py", line 47, in inner[Thu Mar 12 05:13:02.322878 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     response = get_response(request)[Thu Mar 12 05:13:02.322884 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]                ^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.322890 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/core/handlers/base.py", line 181, in _get_response[Thu Mar 12 05:13:02.322896 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     response = wrapped_callback(request, *callback_args, **callback_kwargs)[Thu Mar 12 05:13:02.322902 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.322908 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapper[Thu Mar 12 05:13:02.322914 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return view(request, *args, **kwargs)[Thu Mar 12 05:13:02.322920 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.322926 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/utils/decorators.py", line 130, in _wrapped_view[Thu Mar 12 05:13:02.322932 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     response = view_func(request, *args, **kwargs)[Thu Mar 12 05:13:02.322938 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.322944 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func[Thu Mar 12 05:13:02.322950 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     response = view_func(request, *args, **kwargs)[Thu Mar 12 05:13:02.322956 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.322962 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/openstack_auth/views.py", line 160, in login[Thu Mar 12 05:13:02.322968 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     res = django_auth_views.LoginView.as_view([Thu Mar 12 05:13:02.322974 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.322980 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/generic/base.py", line 70, in view[Thu Mar 12 05:13:02.322986 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return self.dispatch(request, *args, **kwargs)[Thu Mar 12 05:13:02.322991 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323006 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/utils/decorators.py", line 43, in _wrapper[Thu Mar 12 05:13:02.323012 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return bound_method(*args, **kwargs)[Thu Mar 12 05:13:02.323017 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323023 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapper[Thu Mar 12 05:13:02.323029 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return view(request, *args, **kwargs)[Thu Mar 12 05:13:02.323035 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323600 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/utils/decorators.py", line 43, in _wrapper[Thu Mar 12 05:13:02.323607 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return bound_method(*args, **kwargs)[Thu Mar 12 05:13:02.323613 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323619 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/utils/decorators.py", line 130, in _wrapped_view[Thu Mar 12 05:13:02.323625 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     response = view_func(request, *args, **kwargs)[Thu Mar 12 05:13:02.323631 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323636 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/utils/decorators.py", line 43, in _wrapper[Thu Mar 12 05:13:02.323642 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return bound_method(*args, **kwargs)[Thu Mar 12 05:13:02.323648 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323654 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func[Thu Mar 12 05:13:02.323660 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     response = view_func(request, *args, **kwargs)[Thu Mar 12 05:13:02.323666 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323671 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/contrib/auth/views.py", line 63, in dispatch[Thu Mar 12 05:13:02.323677 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return super().dispatch(request, *args, **kwargs)[Thu Mar 12 05:13:02.323683 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323689 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/generic/base.py", line 98, in dispatch[Thu Mar 12 05:13:02.323695 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return handler(request, *args, **kwargs)[Thu Mar 12 05:13:02.323701 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323707 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/views/generic/edit.py", line 142, in post[Thu Mar 12 05:13:02.323712 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     return self.form_valid(form)[Thu Mar 12 05:13:02.323723 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]            ^^^^^^^^^^^^^^^^^^^^^[Thu Mar 12 05:13:02.323729 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/contrib/auth/views.py", line 92, in form_valid[Thu Mar 12 05:13:02.323735 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     auth_login(self.request, form.get_user())[Thu Mar 12 05:13:02.323741 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/contrib/auth/__init__.py", line 111, in login[Thu Mar 12 05:13:02.323747 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     request.session.cycle_key()[Thu Mar 12 05:13:02.323753 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/contrib/sessions/backends/base.py", line 344, in cycle_key[Thu Mar 12 05:13:02.323759 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     self.create()[Thu Mar 12 05:13:02.323765 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]   File "/usr/lib/python3.11/site-packages/django/contrib/sessions/backends/cache.py", line 50, in create[Thu Mar 12 05:13:02.323771 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106]     raise RuntimeError([Thu Mar 12 05:13:02.323776 2026] [wsgi:error] [pid 3177:tid 3359] [remote 192.168.16.6:32106] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.) A+ I- T% h, c/ h( M( y' a3 R' Z
6 Y6 }4 C7 A% r0 P9 w2 \; V

' L7 L& ?1 Q1 I+ P! z' |
! E' s# O: H/ M3 F

5 \3 Z" @: }  t$ a2 Q- S5 l1 c$ S解决办法:9 F, l% u: d! z9 [! a3 n4 o! V

. N/ M$ r# w' S7 M

1 P1 d" c" T; C7 Q1 p
% q  }" x8 M$ v% @" N

( C0 S3 K4 d. }. O. |(hcisvenv) [root@controller ~]# systemctl status memcached.service × memcached.service - memcached daemon     Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled)     Active: failed (Result: exit-code) since Wed 2026-03-11 20:45:51 CST; 8h ago   Duration: 167ms    Process: 1650 ExecStart=/usr/bin/memcached -p ${PORT} -u ${USER} -m ${CACHESIZE} -c ${MAXCONN} $OPTIONS (code=exited, status=71)   Main PID: 1650 (code=exited, status=71)Mar 11 20:45:50 controller systemd[1]: Started memcached daemon.Mar 11 20:45:51 controller memcached[1650]: bind(): Cannot assign requested addressMar 11 20:45:51 controller memcached[1650]: failed to listen on one of interface(s) ::1,192.168.16.80: Cannot assign requested addressMar 11 20:45:51 controller systemd[1]: memcached.service: Main process exited, code=exited, status=71/OSERRMar 11 20:45:51 controller systemd[1]: memcached.service: Failed with result 'exit-code'.(hcisvenv) [root@controller ~]# ^C(hcisvenv) [root@controller ~]# systemctl restart memcached.service (hcisvenv) [root@controller ~]# systemctl status memcached.service ● memcached.service - memcached daemon     Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; preset: disabled)     Active: active (running) since Thu 2026-03-12 05:13:52 CST; 1s ago   Main PID: 150800 (memcached)      Tasks: 10 (limit: 124318)     Memory: 1.2M ()     CGroup: /system.slice/memcached.service             └─150800 /usr/bin/memcached -p 11211 -u memcached -m 20480 -c 20000 -l ::1,192.168.16.80Mar 12 05:13:52 controller systemd[1]: Started memcached daemon.
$ _: }3 M% V& d4 @# v! F! p3 U# |# n$ z: f/ g( s
) |$ R: s, B1 K
- X' J( [( U& h+ C
5 k, X" o* v# H& J. M* R" i
再次登录即可正常登录。$ p8 n2 n8 O$ U9 k, Q4 U
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-11 23:02 , Processed in 0.016807 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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