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

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2025-3-26 17:00:00 | 显示全部楼层 |阅读模式
AttributeError: 'NoneType' object has no attribute 'getcurr
9 o8 D( N. j9 n. v8 u
) f8 z. n5 [# u6 @/ D! B. @6 M/ \6 X3 }3 g( r
Exception ignored in: <function _removeHandlerRef at 0x7f17% R4 T  N3 G' \( i4 x* k! O
Traceback (most recent call last):
6 v6 Q7 k' R' I& @  File "/usr/lib/python3.11/logging/__init__.py", line 855,$ z  K- v# V) l" }: r2 _$ n
  File "/usr/lib/python3.11/logging/__init__.py", line 235,
* N8 C5 H: s% X/ S0 O" a3 n  File "/usr/lib/python3.11/threading.py", line 164, in acq; y  Z+ l4 E7 x" L
  File "/usr/lib/python3/dist-packages/eventlet/green/threa- @% V8 _: z8 E! Z6 s; A( j% D
AttributeError: 'NoneType' object has no attribute 'getcurr
$ ~( y2 D+ m6 u( i8 i. _
" A4 {, i" n  h9 ]" D7 a5 W# ~& I: s1 S# U( |9 J$ r

% p2 ?# R% G( A) L& }root@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
: S6 n& z4 t4 y! I4 k; w0 P! @Exception ignored in: <function _removeHandlerRef at 0x7f1718ed9580>
- x" A7 a# \1 J$ }6 [5 ]Traceback (most recent call last):( A% ]1 W( C" p% l! V% A" }' _
  File "/usr/lib/python3.11/logging/__init__.py", line 855, in _removeHandlerRef% h4 y& c' A3 b
  File "/usr/lib/python3.11/logging/__init__.py", line 235, in _acquireLock
+ [0 C7 a% t  q* E  File "/usr/lib/python3.11/threading.py", line 164, in acquire
# |1 |" `! _4 x  q+ r  File "/usr/lib/python3/dist-packages/eventlet/green/thread.py", line 34, in get_ident
# r1 s9 l* `% q4 I  N3 eAttributeError: 'NoneType' object has no attribute 'getcurrent': [; A+ R3 ~+ S2 X; u0 S! m' D

, _) ]5 L, `- h9 S; W4 M, b3 z
2 {; q! `/ s! C2 i5 C) _* U5 j9 ^+ O4 `1 H* [% g9 f
; M* X0 u) e) g
找到文件:修改5 C7 C5 R0 r& Q$ Z$ I! u( |8 Y5 x! i
vim /usr/lib/python3/dist-packages/eventlet/green/thread.py
8 l7 m& ]8 ?! x, e3 }% N* {( n- K$ E1 s
def get_ident(gr=None):
. q4 H5 t: e4 B      if gr is None:
( c1 R1 i( o' G! d          return id(greenlet.getcurrent())9 s( F- x; f% @% ?8 d+ q( s$ F
       else:
! A6 J6 A, H4 A          return id(gr)
* D) X! x0 n7 p  w. [: }- ]8 |* ]* p5 h. T3 E9 b
修改成:- D2 ?' }, B- U$ m7 w% D& f6 L! t0 w
vim /usr/lib/python3/dist-packages/eventlet/green/thread.py
4 R* N- X5 R: |* I) @: P% j" c- X3 q0 c2 z& z

7 {7 F/ a: D% `1 ?, J
) k5 }* f+ r$ g4 z; P7 M$ \def get_ident(gr=None):
8 O" Y6 L" ?# t; O9 X0 }% Q$ y    try:
) G. Y: |! ~( K: O) F  Q) W         if gr is None:. I# x% F$ S( w0 ?$ M- i! V
             return id(greenlet.getcurrent())* d9 `' M5 U$ m0 M7 I9 r
         else:- |" i6 ]! A$ _; i" i" j
             return id(gr)# ^# P  M0 v# y% W
    except:2 ~2 O" m& k& M7 K  e; I
       return id(gr)
% p$ A. ?! L& f2 S1 V% ?
7 ~: q1 J7 X" v0 n9 ^) f
, F9 y9 d" e$ J1 R3 W5 J一定要注意缩减,不然会报错哦。9 \* h& g6 I: N( L. Q6 v
, x' s: t& B3 ]2 M8 ^

: U; G& P# N- X' [; I4 D' a5 Vroot@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone. w: z. B6 }8 G4 W& w( A
  @/ j+ W( v7 p: V# \$ d
3 _+ w4 G2 \/ V* p+ w) r+ t
问题解决。, Y* Z; [* o" C/ S# ^8 T0 b

6 ?' ~/ N. G' |1 Y- O! s+ h
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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