易陆发现互联网技术论坛

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

keystone 执行命令 报错AttributeError: 'NoneType' object has no attribute 'getcurr 解决办法

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

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

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

x
AttributeError: 'NoneType' object has no attribute 'getcurr0 t# p* @( x/ R  @

8 P* b, E" V0 n7 }6 ~
: k& ]( P5 n) l7 Q1 b4 wException ignored in: <function _removeHandlerRef at 0x7f174 ?; l9 j6 j, K- D& b
Traceback (most recent call last):$ t& q$ ~' s8 v- s: c/ o
  File "/usr/lib/python3.11/logging/__init__.py", line 855,0 A) }% T. h0 L$ J* N* y
  File "/usr/lib/python3.11/logging/__init__.py", line 235,. G2 \9 \+ ^: ~1 C' {# m
  File "/usr/lib/python3.11/threading.py", line 164, in acq2 T4 Q4 @' Q4 k
  File "/usr/lib/python3/dist-packages/eventlet/green/threa
% X8 E9 @! T) ~5 W7 s* ?AttributeError: 'NoneType' object has no attribute 'getcurr
4 w6 d, }# [3 Q9 D7 P
6 F/ |0 A; N% ]/ S/ b! W6 {
" H7 E: V# D/ R4 a" w5 w
, Y1 D* C3 C1 T, Yroot@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
* s. a0 {8 i$ c- u; b" }7 V! t# JException ignored in: <function _removeHandlerRef at 0x7f1718ed9580>
: B, c" X' c: X6 Q5 fTraceback (most recent call last):
" a# h2 }9 \( E% ]  ?( b9 Q* e7 C  File "/usr/lib/python3.11/logging/__init__.py", line 855, in _removeHandlerRef
7 `1 P5 w2 J% K# f% ^  File "/usr/lib/python3.11/logging/__init__.py", line 235, in _acquireLock( u! S4 O( G4 d% S* k
  File "/usr/lib/python3.11/threading.py", line 164, in acquire& c+ f: Q) y0 g  [9 k
  File "/usr/lib/python3/dist-packages/eventlet/green/thread.py", line 34, in get_ident" T" y. v/ @; ?, H  n; Y3 x
AttributeError: 'NoneType' object has no attribute 'getcurrent', o- G! p/ `4 |* j

7 E4 o$ @0 H, Q* Z
# X. a" P: D" T. W* ^0 z. f. R
6 ^9 a0 `* I- j
: O* D2 O/ y& o9 d* C找到文件:修改
  I$ w, N; ]8 n- V" Uvim /usr/lib/python3/dist-packages/eventlet/green/thread.py
: a+ X1 m# o( k: _  L' Z
+ s9 d2 C. q9 e. |- Edef get_ident(gr=None):1 O+ n$ ?/ e* _3 W- G) I
      if gr is None:6 d5 L) S! A; s
          return id(greenlet.getcurrent())( o2 A/ ^+ G0 J6 z* U
       else:/ y% S' ?( t5 ^" U  w% N! I: `
          return id(gr)
2 u! N( |' N# g6 C7 A
( A/ ?1 I/ W/ w2 W修改成:; O9 q' D, i. O* n/ z1 M# t1 O
vim /usr/lib/python3/dist-packages/eventlet/green/thread.py
# x( ]% G; d# [1 I5 {
) h4 t& g3 Q$ w  L8 ]8 Q: j6 @$ I  ~! B! A* y) F+ F
  @! w' b5 g& i9 a, B9 M
def get_ident(gr=None):
: l' ?0 W1 w* N% J; L    try:
- e1 `! {  i8 `5 k         if gr is None:
5 m1 F% I2 Z  u7 H             return id(greenlet.getcurrent())9 T% B- k, D. t# G$ j; e; T
         else:" ~. i5 g& y" T: u9 M+ R) ?
             return id(gr)1 F. r1 z7 T, r
    except:
7 m9 N% d4 J9 k       return id(gr)0 M! I1 _; F7 f' o+ e

7 K+ u( r7 h" N7 z0 L' \, j2 z: A- x  U
一定要注意缩减,不然会报错哦。
3 k% c# g) R5 q/ N1 x1 p& r: I8 R0 z* {4 S, m+ u
: A1 N! G9 k0 R2 H  E" b
root@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
! W% \0 f, X% k4 E: J% }( J% D* o$ |$ A! s

- e( f8 Y4 T  R问题解决。
0 j5 _" ~7 C; d& X  v
& M4 a( F  c  s$ ^+ h9 V, C; V8 I
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

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

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

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

GMT+8, 2026-4-8 21:08 , Processed in 0.054598 second(s), 22 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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