找回密码
 注册
查看: 99|回复: 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/
* d; H* o4 K1 ]3 _6 h2 [
# Z+ w" l5 @% o' S/ g
7 D8 s7 ^. B, Q& Y7 d+ c0 d) b

6 t: A! F1 R. |3 r
根据你提供的浏览器控制台日志,可以解读出以下信息:
  • 页面访问路径:先尝试访问 http://192.168.16.80/dashboard/,然后通过 XHR 请求 /dashboard/header/(状态 200 成功),最后页面主动跳转到了 /dashboard/auth/login/。
  • 关键现象:访问 Dashboard 首页后,被重定向到了登录页面(/auth/login/)。这通常意味着用户当前没有有效的认证会话(未登录或会话已过期),Horizon 强制要求重新登录。
    ) y) Q) B% X, n
可能的原因与排查方向1. 浏览器 Cookie / Session 问题
  • 原因:之前的登录会话已过期,或者浏览器清除了 Cookie。
  • 解决:清除浏览器缓存和 Horizon 相关的 Cookie,然后重新访问 /dashboard/,应该会直接显示登录页(而不是先跳转首页再重定向)。日志中显示的跳转是正常逻辑。
    . M; g  R1 u5 h) P9 C& H* W1 T+ g' V
) G! {" |0 ]+ m& a9 R

; p) O/ G+ A7 _6 g# R( ^

7 }8 A( M# ?6 b7 `" f' J/ w( P8 a4 D7 x% o( D/ n

" R. }% E6 y/ g* h1 O
7 K) c" p& O4 \
查看日志:7 ]7 O4 Q) b  b; U" M
[root@controller ~]# tail -f /var/log/httpd/openstack-dashboard-error_log5 C5 @8 t9 T3 t( z
[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.
% A5 ~# E; f/ A( H  a
- m! S1 Z: }, ]6 e8 _% R  ?

, `9 ]% v7 E6 P- _! s6 t8 J2 [- k0 r5 T+ Z3 S. b. x5 b. h* P
* R8 o1 `/ n, l2 n
解决办法:
" J3 a0 [# Z7 x6 S+ _4 Y% Y4 h) d

7 Q% V( q' z( p' {& E$ d" n- q9 F& s2 _
/ P& G& k0 N  @: c
(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.- C* N& ]* t1 x3 r* E) A$ P
. R1 c  D% l9 Y6 [1 x

( z( K" w6 {5 o! ?' y- c0 u3 k3 {  a7 i- V5 S
  \8 E, B, n8 v3 O8 Z% d# e% f1 w
再次登录即可正常登录。
; Q2 s2 ], K- ~/ E! h0 y
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:58 , Processed in 0.016294 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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