易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 137|回复: 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/" G. b+ x# O; f& t; Q+ N9 B& N. c& x

( D9 Z) L% n9 C0 b$ X6 b4 D
4 k! t; o, E) h" l7 W* x0 D登录horizon 失败报错ERROR django.request Internal Server Error: /horizon/auth/login/, referer: http://192.168.8.200/horizon/auth/login/?next=/horizon/
- M( P  L* W6 b# D! @, n
! W" A) ~  Z: D- Q- [[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.$ H; e. p$ `+ s. \  d$ J1 O, D  ?
[Fri Mar 28 23:50:00.835802 2025] [wsgi:error] [pid 469954:tid 469973]   version_info = version.StrictVersion(__version__).version
. K8 {8 A8 N) t# L. ~- t! S[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// d& ?/ S+ o0 e3 F0 v% i
[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/
4 I, C; b  i0 t' N9 K[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/) |; b4 G) `( X* p( ?
[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/7 u& _& k8 q9 S  s/ ]6 M2 U+ z( u
[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.( w$ `0 w5 K% j) s( P4 K
[Fri Mar 28 23:50:09.967087 2025] [wsgi:error] [pid 469955:tid 469971]   version_info = version.StrictVersion(__version__).version  ]  A$ z2 x4 I+ T( N
[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/
& [' t% f4 i3 g* ^& P2 O( ]. y% [[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/
* H0 x, t2 V# }4 C. s) o[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 M0 f/ T4 J[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/
7 ?( u2 E; Y# A[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/0 M2 F  N" X8 Z4 {$ b3 R7 V% v( h
[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/1 t0 B6 J, `) m% y- b$ C( F9 F5 H
[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/
; f. i2 _- E' h# j1 j. v  A% h[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/  n5 f7 `4 T; r# I
[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/6 F( B2 A6 [, ~7 K7 R$ z2 f
[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/
4 L+ y" X3 A3 \1 j. z# d4 S[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/
) ]' O# x$ W8 j5 j9 ][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/  `6 M- \  @9 g; f/ F$ Z
[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/
. J( `8 u- T. ~9 U  u[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/+ U  z' \5 M# T; F' j2 |
[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/
% l: h. [5 U- W1 N& K[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/
, ~" A3 t$ _- K) G; U[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/
' u; ?+ S" a- A[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/
8 f" F' N& O' `1 Z- {5 q[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/$ F! T. x0 T# n7 L3 E% R
[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/
: |+ _# Z$ a2 [' o[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/, S3 k! \2 w0 {1 s- y
[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/
, y1 |& |# G( ^" H9 z7 ?[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/
3 F  j0 `3 D( l7 s( K3 _[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/
- S: i* i! ?2 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/, M1 p/ ?- ?0 n8 t- m
[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/7 p/ K5 f3 P6 o- C* k& t* I
( l' [/ \/ u# a5 p7 {3 _5 {7 A  ^! R
+ u$ t9 X5 i$ W2 p2 t

- r0 S" t. ~4 ]9 G$ E) A5 G6 y$ F% W( x" S- e. }* V4 L3 i6 a5 C1 j/ ^3 M
因为它周期性连接到非本地缓存有问题。官网写的有bug。; G7 b+ g6 W7 R; ^
修改/etc/openstack-dashboard/local_settings.py
! Q3 U4 i& B! s- G0 P6 w5 z; L) }, j5 F0 ~2 y
               把/etc/openstack-dashboard/local_settings.py  中 SESSION_ENGINE = 'django.contrib.sessions.backends.cache' 应改为
( N9 I. b; h( W8 r" C* N               SESSION_ENGINE = 'django.contrib.sessions.backends.file'5 v: g% w# }( M* [! P
+ A2 P& R& @4 W0 F+ B2 I+ q
留意一下这个:- I5 i- |0 i+ |+ f  x. A' }
0 S+ m1 t! d  y
OPENSTACK_KEYSTONE_URL = "http://%s:5000/identity/v3" % OPENSTACK_HOST
- r9 ~* ]  l+ j% T3 p* l1 n5 R' a, t" q, u8 ?/ p: `* [

  |' g! w7 W& J: ]8 V" h保存退出后6 r  R8 |7 }1 I- K7 |0 P4 h
, W% g* K7 W* h/ J
重启apache2服务或者httpd服务,以及 memcached.service
7 t2 N- C$ \1 {# B. e/ w/ D1 M7 A, k- N4 e+ m- l4 S- a4 r
重新登录即可:
& F, Y" `0 C5 \% P! `  z& Z! A/ {* ~
 楼主| 发表于 2025-3-31 08:00:02 | 显示全部楼层
[root@openstack1 ~]# tail -f /var/log/httpd/error_log
- f+ O: _; j/ `. B) Q[Wed Mar 15 22:56:34.221102 2017] [:error] [pid 2733] response = view_func(request, *args, **kwargs)
9 T' t. u( w1 Q3 R; x[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! d& F, p9 }- g+ h; L
[Wed Mar 15 22:56:34.221179 2017] [:error] [pid 2733] auth_login(request, form.get_user())
, n0 T- \+ c% i$ 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
; b4 V! S. X/ y3 ?4 R0 p2 |[Wed Mar 15 22:56:34.221214 2017] [:error] [pid 2733] request.session.cycle_key()
' b. y. c& i& |' Z' u4 x& a1 _[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
# c' n! n3 Y% T2 m- K[Wed Mar 15 22:56:34.221228 2017] [:error] [pid 2733] self.create()
: a. i' n  L* N4 p" ?& `; B6 B[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; \/ v6 T5 i+ O3 v( n
[Wed Mar 15 22:56:34.221281 2017] [:error] [pid 2733] "Unable to create a new session key. "
) J- u: X* d$ }9 u[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.
6 L) ], e9 o/ t8 M. `5 a- f! Q  i) q- J# U# n5 }8 u
解决:更改dashboard的local_settings配置文件并重启httpd和memcached,刷新后可正常登陆,这是在国外的论坛上找到得解决方法。* I1 t( D$ f/ w4 [0 V6 s4 ]) k1 Q

! w0 a3 p1 |. B5 u! g# vim /etc/openstack-dashboard/local_settings) d7 t3 f6 Z+ N3 f( }' A
#SESSION_ENGINE = ‘django.contrib.sessions.backends.cache’* {# K! E, y0 m
SESSION_ENGINE = ‘django.contrib.sessions.backends.file’, K2 t  Z( V* A& d
# systemctl restart httpd memcached
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 点击这里给我发消息

GMT+8, 2026-3-9 00:33 , Processed in 0.055049 second(s), 21 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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