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

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

[复制链接]

0

主题

0

回帖

9

积分

管理员

积分
9
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/
& F9 v1 v$ z! L2 Z, `' f
  `: {' y/ W+ V" B& A* B) e  q3 I" A; w, t2 S8 \
9 I9 _8 C/ n* E: N6 u3 g! ^* }
根据你提供的浏览器控制台日志,可以解读出以下信息:
  • 页面访问路径:先尝试访问 http://192.168.16.80/dashboard/,然后通过 XHR 请求 /dashboard/header/(状态 200 成功),最后页面主动跳转到了 /dashboard/auth/login/。
  • 关键现象:访问 Dashboard 首页后,被重定向到了登录页面(/auth/login/)。这通常意味着用户当前没有有效的认证会话(未登录或会话已过期),Horizon 强制要求重新登录。

      }4 C* V9 O$ B" c/ e1 u9 P
可能的原因与排查方向1. 浏览器 Cookie / Session 问题
  • 原因:之前的登录会话已过期,或者浏览器清除了 Cookie。
  • 解决:清除浏览器缓存和 Horizon 相关的 Cookie,然后重新访问 /dashboard/,应该会直接显示登录页(而不是先跳转首页再重定向)。日志中显示的跳转是正常逻辑。

    * H& X2 f$ G3 n0 l
6 N3 n$ w: r' J+ u. \

3 N1 |: _% H- O% Z% s& Y0 n4 c/ o
4 R3 V; @$ E' V2 K3 O- s- W
2 W. l: ]6 j# u. S( G3 \
/ g8 N' ^6 W" O$ X

& d2 N' A6 j" z查看日志:
( \# t" L' F4 r1 I' M. P0 y[root@controller ~]# tail -f /var/log/httpd/openstack-dashboard-error_log9 I, H" I% {- a4 H; H2 n* x
[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.
3 Q$ @+ n( y9 x1 Z% b- J0 Z: f

" u, u. f: W! ]' {" o" f# G: v5 V: z% D+ K
) v/ |2 _# I% @' z' |4 J9 X
解决办法:/ ?( O; K" X* @6 l
' W9 E3 d1 ~  e" Y  O6 v

' L/ M/ i9 p) G6 R$ C, o1 b
3 S5 E# z9 s% V3 b7 O' v

  W+ Y" S7 o& S- j9 [(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.
7 Y/ L) k* z  q  n' M' R  ?# p3 z7 _5 s  Z$ y6 Z8 Q) Q
# [0 ~7 q; S0 \/ J4 I; i" H5 P
' p5 q7 E! E5 s+ e
" M1 N& h1 ]& u0 ^% V/ y3 \* p# |& q
再次登录即可正常登录。" z* Q* a" M4 j; b* j. ~0 e, ]* t5 j
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 22:57 , Processed in 0.023739 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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