找回密码
 注册
查看: 98|回复: 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/
; m  E" C( L  ?1 Y: }! x
* V% |6 S! [& U8 t( j4 [1 x. q& n
" w# U9 h; ~8 r
根据你提供的浏览器控制台日志,可以解读出以下信息:
  • 页面访问路径:先尝试访问 http://192.168.16.80/dashboard/,然后通过 XHR 请求 /dashboard/header/(状态 200 成功),最后页面主动跳转到了 /dashboard/auth/login/。
  • 关键现象:访问 Dashboard 首页后,被重定向到了登录页面(/auth/login/)。这通常意味着用户当前没有有效的认证会话(未登录或会话已过期),Horizon 强制要求重新登录。
    + n2 T+ t8 L& v; d; V
可能的原因与排查方向1. 浏览器 Cookie / Session 问题
  • 原因:之前的登录会话已过期,或者浏览器清除了 Cookie。
  • 解决:清除浏览器缓存和 Horizon 相关的 Cookie,然后重新访问 /dashboard/,应该会直接显示登录页(而不是先跳转首页再重定向)。日志中显示的跳转是正常逻辑。

    9 }5 _. Z  V. w5 r9 L- M
4 i& A2 {! ]6 x6 Q6 }! n) }

; p9 c- y$ r- ~* Y! W
" i& o( g; m( `1 d
6 P6 j7 a5 ]" h7 e+ {3 E

% h0 m9 D1 z; Y# R: R+ \

; V3 G* b* Y* e7 g查看日志:
, z0 Z& M2 q! z[root@controller ~]# tail -f /var/log/httpd/openstack-dashboard-error_log7 `$ ]' ?- n# K. x3 t8 J
[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.
6 g7 Y/ |' D  w4 i  t0 G
6 W- U6 \% G' P3 i/ W

, N3 Z  k$ V  v5 n: `, _& K# t& T# W# A8 @0 T6 S
; K- V0 K' J2 V
解决办法:( K, S# ^/ K4 y7 l  u* D

, O" l) G2 O) \  A- M" V9 U5 @
) s" y+ A; e) V7 p! M
: z$ v' `% J6 W' ?3 C3 z

5 i5 `; V& P, F! z- k(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.
& x+ m0 d. X  G& B& ]0 R. B- Y' H) T: Q7 o& @6 a- q  g

% ]/ E5 ?4 n3 Q% I; m0 e# F' p6 L1 h  ~, I  @. W% m

( D% h5 t+ g" k; G0 i再次登录即可正常登录。
7 M6 n+ |3 Y! U: A& P9 J& c
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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