找回密码
 注册
查看: 3715|回复: 2

[wsgi:error]WARNING:root:Use of this 'djano.wsgi' file has been deprecated since

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-7-26 17:13:00 | 显示全部楼层 |阅读模式
[Mon Jul 26 17:07:39.149109 2021] [wsgi:error] [pid 115360:tid 139772269872896] WARNING:root:Use of this 'djano.wsgi' file has been deprecated since the Rocky release in favor of 'wsgi.py' in the 'openstack_dashboard' module. This file is a legacy naming from before Django 1.4 and an importable 'wsgi.py' is now the default. This file will be removed in the T release cycle.3 z8 o( Q: {6 d9 U5 n' H1 K2 N
[Mon Jul 26 17:07:40.541489 2021] [wsgi:error] [pid 115360:tid 139772269872896] /usr/lib64/python3.6/site-packages/scss/namespace.py:172: DeprecationWarning: inspect.getargspec() is deprecated since Python 3.0, use inspect.signature() or inspect.getfullargspec()4 s& H1 R: d7 V' M
" i! L/ Z7 u& v3 ^
[Mon Jul 26 17:07:40.541536 2021] [wsgi:error] [pid 115360:tid 139772269872896]   argspec = inspect.getargspec(function)+ k4 {! s: L  d

5 b- T+ u6 z  h/ P. ]& J8 v  g
5 G2 a# R' i) ]" U

- ^4 E' b3 Z* y& c, ]) Topenstack Train 版按照官方文档安装后
0 ]+ d  V# X$ {/ U1.访问/dashboard后跳转到/auth/login报404(操作下面2步可以解决dashboard访问404问题,请跳过此步骤)
# _8 h- V2 w, d& e% J解决方法如下:+ @4 [0 ]; n1 E8 U
cd /usr/share/openstack-dashboard& Z; T! l$ R+ \
python manage.py make_web_conf --apache > /etc/httpd/conf.d/openstack-dashboard.conf: D& m6 X' p, ?% Y

( l" k: x# Z: K' ]0 n5 a; }- @+ S# R4 Q2.建立策略文件(policy.json)的软链接,否则登录到dashboard将出现权限错误% r) M9 K8 x. C4 g( p) }9 `8 b$ O
解决方法如下:
. k  H/ V. E( N3 `- Q+ n
) ]6 \3 c5 k5 Cln -s/etc/openstack-dashboard /usr/share/openstack-dashboard/openstack_dashboard/conf5 C5 v/ s7 c8 [( N7 N4 w, D

; f  w5 i2 v  [$ J3.身份管理里面的项目、用户、组和角色都无法打开,日志提示:) z' C3 J. |. S/ z- ^- B
Daemon process called 'keystone-public' cannot be accessed by this WSGI application: /usr/bin/keystone-wsgi-public$ Y4 m1 b. X7 W1 z
解决方法如下:# _6 m. S4 a+ p0 {

. O0 Y; d7 g5 d5 Y编辑以下文件,找到WEBROOT ='/' 修改为WEBROOT ='/dashboard' (官方未提及坑点之一)7 ~2 Q7 D' ]; l0 c# d' _; L
vim/usr/share/openstack-dashboard/openstack_dashboard/defaults.py
% W% r* f2 U* B# o7 ^$ Kvim/usr/share/openstack-dashboard/openstack_dashboard/test/settings.py
& G5 U; }2 o9 e7 r8 w6 [9 evim/usr/share/openstack-dashboard/static/dashboard/js/9937cc9f2cae.js" ~9 u6 ?  t' x' m$ a
! ]5 t4 L0 @+ a  D; V, h& j3 V7 q

. E5 D' w# ~( [3 h/ c% e=====================================================================================================================# E5 x9 D. m5 I0 x+ k
20210708更新
# r6 d+ r7 Z% t安装victoria版本dashboard项目$ ?; R' ^/ R9 i4 F+ `" @8 f& f+ x
1.$ _% t( J5 Q5 J% O
登陆Openstack dashboard ,页面出错,信息如下:
) V8 ]2 N8 N: i: i0 m6 [Something went wrong!
# K# h& A" Z8 nAn unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.$ |+ I9 a. m3 l7 Q! c! W- G
- O+ Y4 h0 h5 W2 T" J/ l
查看httpd日志报如下错误信息:
5 ^$ E4 ]  r) z* ptail /var/log/httpd/error_log -f
" A' U+ e0 m/ U6 }[Thu Jul 08 10:34:43.602238 2021] [wsgi:error] [pid 43360:tid 140630500005632] [remote 10.199.102.125:52676] "Unable to create a new session key. "
7 f: V- B, Y, k4 H  ^% X[Thu Jul 08 10:34:43.602242 2021] [wsgi:error] [pid 43360:tid 140630500005632] [remote 10.199.102.125:52676] RuntimeError: Unable to create a new session key. It is likely that the cache is unavailable.9 k, x( F( `0 ^3 T) M4 M/ n. @
解决方法:
) p" t) I; i2 m  E3 k% m+ f! o- k" V复制代码
! y5 s- W/ Z8 h/ `将 /etc/openstack-dashboard/local_settings 里的; r! k3 c' p/ O$ Y8 q1 o
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
& M% `  q6 g3 s$ ?8 U1 r( U# h改成
5 F7 B! o7 i1 z$ [5 u* XSESSION_ENGINE = 'django.contrib.sessions.backends.file'
+ C  G7 ?1 ]2 B) w或者
* v4 y9 E  t- y$ L* a) K+ pSESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'
4 m5 j) }! C! R: D8 I, t#SESSION_ENGINE = 'django.contrib.sessions.backends.file'6 r  B: C' }; _& h- J1 L
" ~4 I" j' I. E
重启httpd和memcached; k3 e( \' p/ ]' {# q
成功进入Dashboard' f% t3 K; `5 ^+ q
复制代码1 P6 N" S$ w- A6 ]3 W& C' G4 U8 Q
' y1 j4 f% j( T% e* E6 c
2.
6 T; @! J- {5 Y3 `0 w查看httpd日志报如下错误信息:
, L5 \" O! a! f7 Z7 d- O' Stail /var/log/httpd/error_log -f
. K+ e! g8 l1 `2 T, h[Thu Jul 08 10:44:55.289974 2021] [authz_core:error] [pid 44700:tid 140425917486848] [client 10.199.102.126:44924] AH01630: client denied by server configuration: /usr/bin/keystone-wsgi-public
: I) q6 g( U# w2 Q[Thu Jul 08 10:44:55.290668 2021] [wsgi:error] [pid 44693:tid 140426236409600] [remote 10.199.102.125:59035] INFO openstack_auth.forms Login failed for user "admin" using domain "default", remote address 10.199.102.125.  _5 B) ]# j& `) b: x
解决方法:
6 `' R5 F. A0 ]/ ]5 p6 K  z复制代码& S! O5 G# ?8 i6 s9 F
UPDATE with SOLUTION from neal_utas:
6 m3 H( ]0 n& CThe docs for horizon at docs.openstack.org (at least for ubuntu) are incorrect. When editing /etc/openstack-dashboard/local_settings.py, the online docs are missing port 5000. The correct entry for OPENSTACK_KEYSTONE_URL is:
' ^4 b( D7 W4 B/ X, ~; J/ W5 ~  @OPENSTACK_KEYSTONE_URL = "http://%s:5000/identity/v3" % OPENSTACK_HOST
7 l1 t' u* }+ c5 u7 pAfter making that change and then restarting (systemctl reload apache2.service) it works.8 l- Y# X4 d, b+ H$ |- V2 {
" x& B* |: D3 q3 m0 Q& w

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-7-26 17:33:28 | 显示全部楼层
原因( G8 E3 Y# R4 m1 p. i6 D4 a
#dashboard 路径指向问题
* n2 K& {# i, P/ g解决方案
+ d4 L% l9 \9 A0 z# J2 `+ Q6 z1 N#重建dashboard配置,官网没有指明部署时配置过就不需要再配置; ^' F3 A9 W- c$ Y6 T
cd /usr/share/openstack-dashboard
5 x9 Y) F) I! G, n) F4 Dpython manage.py make_web_conf --apache > /etc/httpd/conf.d/openstack-dashboard.conf
# Y. T  n' A* H0 |6 Q
/ r8 Z6 k0 e) n) c! ?#登录到dashboard将出现权限错误和显示混乱,需要建立策略的软链接部署时配置过就不需要再配置
: L8 b+ ?, O' J4 `ln -s /etc/openstack-dashboard /usr/share/openstack-dashboard/openstack_dashboard/conf! B" }5 y5 l- V
8 S2 j) B$ @6 L8 w7 g. b% ^
#在local_settings底下新增根目录指向
6 Y: X7 o3 H( x, K6 e6 h#vim /etc/openstack-dashboard/local_settings
- J/ E* n6 S# E% h% d! dWEBROOT = '/dashboard/'
/ X7 U- m. q# I, p! n; n) u' A. I
2 ^- p* o  c' `0 `#vim /etc/httpd/conf.d/openstack-dashboard.conf; ~7 j, z; u2 d" _
#将原有的配置注释掉,添加以下配置* H. Q% {, P, d6 X  L$ X
#WSGIScriptAlias / /usr/share/openstack-dashboard/openstack_dashboard/wsgi.py
! v  R" d0 ~$ j3 j/ u4 e* H3 e: l  c#Alias /static /usr/share/openstack-dashboard/static
- r1 k5 G  C4 Q2 q6 ?1 gWSGIScriptAlias /dashboard /usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi
' a  j  K8 v0 i, {* Y* U4 E& YAlias /dashboard/static /usr/share/openstack-dashboard/static
! [! z4 n, R  b, h# \" w8 O. T" Z& m1 W4 \
#重启httpd及memcached
7 M% G$ C9 a+ n( q: [systemctl restart httpd.service; D  G) J+ p8 D( Q9 g, X3 ]9 P
systemctl restart memcached.service
$ ?  U0 b7 F: L% M* H
, g: T5 y4 t0 Y6 _
7 [/ c4 B7 X7 P; k- v  [4 e6 u' v

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-7-26 17:34:04 | 显示全部楼层
#在这里快速回复#修改horizon的配置文件/etc/openstack-dashboard/local_settings.py
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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