易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 138|回复: 1
收起左侧

登录horizon 失败报错ERROR django.request Internal Server Error: /horizon/auth/login/,

[复制链接]
发表于 2025-3-31 08:00:01 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
ERROR django.request Internal Server Error: /horizon/auth/login/, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/' x3 c1 x' t& G# |2 M* l
2 _$ e. A- ?" ]# s% p; t0 G& g0 y
9 U% ]/ Q$ Z* A1 R! c% h9 w3 F
登录horizon 失败报错ERROR django.request Internal Server Error: /horizon/auth/login/, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
! c; E$ c: w7 m5 ~6 F- l8 i- C* E4 N7 x: u/ M
[Fri Mar 28 23:50:00.835712 2025] [wsgi:error] [pid 469954:tid 469973] /usr/lib/python3/dist-packages/debreach/__init__.py:6: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
' A) S" O: [: Q, n& r6 h[Fri Mar 28 23:50:00.835802 2025] [wsgi:error] [pid 469954:tid 469973]   version_info = version.StrictVersion(__version__).version  A4 n- ~2 a! e, n" n0 b; w
[Fri Mar 28 23:50:04.199255 2025] [wsgi:error] [pid 469954:tid 469973] [client 192.168.8.115:37941] DEBUG horizon.base Load condition failed for panel: backups, referer: http://192.168.8.200/horizon/auth/login/5 N0 Y7 w4 g6 [" [) f4 C
[Fri Mar 28 23:50:04.212806 2025] [wsgi:error] [pid 469954:tid 469973] [client 192.168.8.115:37941] DEBUG horizon.base Load condition failed for panel: backups, referer: http://192.168.8.200/horizon/auth/login/) f' l3 B. U8 ^" B5 z" M
[Fri Mar 28 23:50:04.225579 2025] [wsgi:error] [pid 469954:tid 469973] [client 192.168.8.115:37941] DEBUG horizon.base Load condition failed for panel: identity_providers, referer: http://192.168.8.200/horizon/auth/login/; A0 y: t7 y; j% q
[Fri Mar 28 23:50:04.226420 2025] [wsgi:error] [pid 469954:tid 469973] [client 192.168.8.115:37941] DEBUG horizon.base Load condition failed for panel: mappings, referer: http://192.168.8.200/horizon/auth/login/6 J- q. m! Z$ K& }( R9 W2 D
[Fri Mar 28 23:50:09.967001 2025] [wsgi:error] [pid 469955:tid 469971] /usr/lib/python3/dist-packages/debreach/__init__.py:6: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.9 }3 L8 e3 t. Q4 o
[Fri Mar 28 23:50:09.967087 2025] [wsgi:error] [pid 469955:tid 469971]   version_info = version.StrictVersion(__version__).version
$ S; h6 q  Z& \( V[Fri Mar 28 23:50:13.325800 2025] [wsgi:error] [pid 469955:tid 469971] [client 192.168.8.115:17341] DEBUG horizon.base Load condition failed for panel: backups, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/5 ]) a7 Y( J9 s  }3 U- @" M
[Fri Mar 28 23:50:13.338632 2025] [wsgi:error] [pid 469955:tid 469971] [client 192.168.8.115:17341] DEBUG horizon.base Load condition failed for panel: backups, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/$ l& @$ g4 p3 {( P
[Fri Mar 28 23:50:13.351360 2025] [wsgi:error] [pid 469955:tid 469971] [client 192.168.8.115:17341] DEBUG horizon.base Load condition failed for panel: identity_providers, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/4 C9 b# r7 J& {3 R" Y  z9 T
[Fri Mar 28 23:50:13.352149 2025] [wsgi:error] [pid 469955:tid 469971] [client 192.168.8.115:17341] DEBUG horizon.base Load condition failed for panel: mappings, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
6 g( i/ ]/ {9 R, @) O[Fri Mar 28 23:51:34.995780 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] DEBUG openstack_auth.backend Beginning user authentication, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
8 s2 _8 Q6 J% t* Q, ~0 k[Fri Mar 28 23:51:34.996392 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] DEBUG openstack_auth.plugin.password Attempting to authenticate for admin, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
8 a5 g; E* |5 j; z; A6 y[Fri Mar 28 23:51:34.997179 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] DEBUG keystoneauth.identity.v3.base Making authentication request to http://controller:5000/v3/auth/tokens, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
4 n: t7 ^/ i+ r* y) Z- Y[Fri Mar 28 23:51:35.028764 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] DEBUG keystoneauth.session Request returned failure status: 401, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/5 I" x$ f  \  D# d
[Fri Mar 28 23:51:35.029013 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] DEBUG openstack_auth.plugin.base The request you have made requires authentication. (HTTP 401) (Request-ID: req-8af1b051-8707-460a-b62d-f4bff037db56), referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/) J0 K; W. L6 z! A" b; Y% o( Z( r
[Fri Mar 28 23:51:35.029410 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] INFO openstack_auth.forms Login failed for user "admin" using domain "defalut", remote address 192.168.8.115., referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/# ]' j: h% p* p9 {. V  ?" h
[Fri Mar 28 23:51:37.488727 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] ERROR django.request Internal Server Error: /horizon/auth/login/, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
" E. w3 ^1 B: s& m4 U9 s- W[Fri Mar 28 23:51:37.488808 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] Traceback (most recent call last):, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
; V' ]( g1 v2 R2 X; r3 b: o8 f[Fri Mar 28 23:51:37.488825 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]   File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 47, in inner, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
2 Q0 g5 [; ?) N9 c[Fri Mar 28 23:51:37.488834 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]     response = get_response(request), referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
. F7 \7 l6 h+ w3 ~; b0 w/ l* ]9 }[Fri Mar 28 23:51:37.488844 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]                ^^^^^^^^^^^^^^^^^^^^^, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
, G9 t( r8 W/ y  J0 ~! [4 C2 ?[Fri Mar 28 23:51:37.488853 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]   File "/usr/lib/python3/dist-packages/django/utils/deprecation.py", line 119, in __call__, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/& d6 w5 T, k7 l8 f9 P
[Fri Mar 28 23:51:37.488871 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]     response = self.process_response(request, response), referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
( U6 c2 s2 }8 b[Fri Mar 28 23:51:37.488880 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/* P! X: d4 l( I. g( V
[Fri Mar 28 23:51:37.488889 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]   File "/usr/lib/python3/dist-packages/django/contrib/sessions/middleware.py", line 61, in process_response, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
7 l) V: l' u4 n! i* n; `7 d[Fri Mar 28 23:51:37.488914 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]     request.session.save(), referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/4 ]! c2 S: y/ n3 V3 S1 p  }
[Fri Mar 28 23:51:37.488923 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]   File "/usr/lib/python3/dist-packages/django/contrib/sessions/backends/cache.py", line 56, in save, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
' d0 `9 u: U2 x[Fri Mar 28 23:51:37.488932 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]     return self.create(), referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
0 Q* v" k5 u* q[Fri Mar 28 23:51:37.488941 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]            ^^^^^^^^^^^^^, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
. G# P- P! F" k3 N; c1 J[Fri Mar 28 23:51:37.488950 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]   File "/usr/lib/python3/dist-packages/django/contrib/sessions/backends/cache.py", line 50, in create, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
; K5 Y- `. c8 G7 i3 u3 y0 S  s; t[Fri Mar 28 23:51:37.488959 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967]     raise RuntimeError(, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/% B4 ^* c7 w: X# ^7 ?6 ^
[Fri Mar 28 23:51:37.488968 2025] [wsgi:error] [pid 469955:tid 469983] [client 192.168.8.115:9967] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable., referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/$ x+ ?7 e* g4 t) k, e; @  @
) Y( ]$ ]/ O& M8 _  W

( \+ W9 X8 E/ B" Y8 w# ?. t- _# M7 f' i" F& {3 _, [$ L( S
: w% R1 E0 b( H8 T
因为它周期性连接到非本地缓存有问题。官网写的有bug。
* {( z7 G( I8 ]0 g" t1 R修改/etc/openstack-dashboard/local_settings.py6 t& A9 M- D3 G6 h" I# D- ]# \
1 Z! _" w7 e3 I& _4 A9 u5 X
               把/etc/openstack-dashboard/local_settings.py  中 SESSION_ENGINE = 'django.contrib.sessions.backends.cache' 应改为" [5 i6 |8 P* ^! n
               SESSION_ENGINE = 'django.contrib.sessions.backends.file'2 ]& o' g' W& }) E8 L. E+ t) v" a
2 @; y" f4 b5 t9 l+ v5 S6 H1 [
留意一下这个:
7 }7 }. ^. i! `" c* T& h
7 Q9 {2 e+ M# q6 d' Z0 j' V' ]OPENSTACK_KEYSTONE_URL = "http://%s:5000/identity/v3" % OPENSTACK_HOST
" Z2 {; e) F9 Z3 e1 v7 D" E/ V" V0 l* \# d3 q1 C; P7 u
) U9 a+ o( `/ c) [( `" Q
保存退出后$ T3 }* U' [: r+ r

& X  P' ?: O: F, L' j重启apache2服务或者httpd服务,以及 memcached.service$ H7 |* C' V! b$ C# L. b

& H9 ^9 Q) [. c9 O/ [重新登录即可:+ J- }9 @, ~9 B% ~0 T$ V( G
; D5 E/ R3 R; I& G1 S# x
 楼主| 发表于 2025-3-31 08:00:02 | 显示全部楼层
[root@openstack1 ~]# tail -f /var/log/httpd/error_log5 ^/ E; Z, H6 l2 S) ?8 R& Z
[Wed Mar 15 22:56:34.221102 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)/ w9 C0 _- E( Q1 W& B
[Wed Mar 15 22:56:34.221109 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/auth/views.py”, line 51, in login
! k6 l$ P: i' T& e  H* [% A[Wed Mar 15 22:56:34.221179 2017] [:error] [pid 2733] auth_login(request, form.get_user())
" @" A% C4 c7 Y, g1 V* d4 r0 D5 y[Wed Mar 15 22:56:34.221206 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/auth/init.py”, line 110, in login
/ f) _5 g/ b# Y. o, E[Wed Mar 15 22:56:34.221214 2017] [:error] [pid 2733] request.session.cycle_key()* m% W; `- ?9 M0 ]
[Wed Mar 15 22:56:34.221221 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/base.py”, line 285, in cycle_key! ?8 r* E0 g$ n8 j, X$ d, m
[Wed Mar 15 22:56:34.221228 2017] [:error] [pid 2733] self.create()/ B/ K$ {: M. ]9 ]
[Wed Mar 15 22:56:34.221269 2017] [:error] [pid 2733] File “/usr/lib/python2.7/site-packages/django/contrib/sessions/backends/cache.py”, line 48, in create
" F- [# M( z/ K# Y" C: A[Wed Mar 15 22:56:34.221281 2017] [:error] [pid 2733] "Unable to create a new session key. "! N' T. L2 v- f( N
[Wed Mar 15 22:56:34.221288 2017] [:error] [pid 2733] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.
3 N9 Z. G/ D; s, c9 j2 s  ?2 G) v  u. y, Q8 R/ `
解决:更改dashboard的local_settings配置文件并重启httpd和memcached,刷新后可正常登陆,这是在国外的论坛上找到得解决方法。6 g2 f# ~% T$ d5 X
& N. B" q) R2 F, V
# vim /etc/openstack-dashboard/local_settings
2 _" H1 [, G5 s#SESSION_ENGINE = ‘django.contrib.sessions.backends.cache’  v9 ~1 k& @  \8 X. E$ J6 ^; w
SESSION_ENGINE = ‘django.contrib.sessions.backends.file’
9 I# N3 e5 B; V+ R7 E) l" x- D# systemctl restart httpd memcached
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 20:17 , Processed in 0.053402 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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