找回密码
 注册
查看: 746|回复: 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
/ J# ^7 C5 ?# |' S9 d! I* ?
4 Z  ]  y) Z+ `5 R0 f8 U+ H* \5 q) h5 ^" }! }8 M
Exception ignored in: <function _removeHandlerRef at 0x7f17
5 a* Z: @9 M/ e7 l; E& M# o" ?Traceback (most recent call last):
4 H9 g% ~' p* E  File "/usr/lib/python3.11/logging/__init__.py", line 855,3 B- `% M# i6 j8 F" G) h, [
  File "/usr/lib/python3.11/logging/__init__.py", line 235,
: B% \+ y7 e0 O  File "/usr/lib/python3.11/threading.py", line 164, in acq
: k8 {; J1 d/ m7 p' Q9 _  M  File "/usr/lib/python3/dist-packages/eventlet/green/threa
! E# G! C; s) {8 _) m; n2 `) W2 hAttributeError: 'NoneType' object has no attribute 'getcurr" e' i" K. H6 V) K3 S* T
% K3 z; p- h6 q

) ?" h- H% H4 @3 F
/ |/ E( \0 S: n2 Wroot@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
& H* {* p" i; u% M- z& g- M  h3 gException ignored in: <function _removeHandlerRef at 0x7f1718ed9580>
9 S; W+ w& S( D" G, ?Traceback (most recent call last):7 q; d' _6 a) `$ x& E
  File "/usr/lib/python3.11/logging/__init__.py", line 855, in _removeHandlerRef
, C. z. z" e0 A, w5 \  File "/usr/lib/python3.11/logging/__init__.py", line 235, in _acquireLock$ U: ~0 X' _3 z. ?! ~/ J
  File "/usr/lib/python3.11/threading.py", line 164, in acquire6 e$ _$ s0 F6 H6 r
  File "/usr/lib/python3/dist-packages/eventlet/green/thread.py", line 34, in get_ident* u3 L7 V0 U2 c) m: a& M/ {
AttributeError: 'NoneType' object has no attribute 'getcurrent'
$ h7 x! a9 |- J0 \0 _$ l8 p" M! f$ e! y
1 r" Z, U3 X- X2 w$ E7 J3 t

* r. {6 j: l3 |! B! O, ^  u1 N4 i+ n5 X9 a' R! |8 r# N* [
找到文件:修改
8 S' z9 X, t' ^# }7 dvim /usr/lib/python3/dist-packages/eventlet/green/thread.py
$ ~" q9 V. M% B" z4 n
2 |% P, ?6 ~* _% v' jdef get_ident(gr=None):: X% C: y( j! n9 x$ K/ r" @
      if gr is None:
) p! v4 t0 @8 F3 e% G9 `# q2 f+ z          return id(greenlet.getcurrent())
8 w/ F+ `8 D2 [2 G       else:
3 \0 r+ r$ @) K          return id(gr)5 e5 t. f, \/ h. }+ W

( W3 Q# n) t1 j9 K; ]7 f修改成:
4 D9 B+ R# ~* Q. avim /usr/lib/python3/dist-packages/eventlet/green/thread.py
1 B' ~+ r1 a, B, G7 _9 `- i
4 p! k- C  ^8 u  q& V% E4 q" T4 [: m  n2 @
5 V  H: u8 a& S& ~
def get_ident(gr=None):
$ K4 `6 Y8 H6 F. ?0 U) q    try:7 `2 n  }$ b. H
         if gr is None:, v; h; K3 n: c1 v
             return id(greenlet.getcurrent())
- e9 G5 K! V+ z         else:$ ?9 a) x: K' m5 L) N" W% L" Q
             return id(gr)
( z9 c) C2 Y) a6 }4 P) P+ d    except:& ~3 Z+ l% P' }7 b9 a- c
       return id(gr)3 Q8 g' B* [( I5 o$ h5 D# X

7 r. H* P( n* l( r% c) y( e- {: S) m6 {9 m6 L6 J" |
一定要注意缩减,不然会报错哦。
& R$ _5 Z2 s& l4 B3 X" a4 s  W1 C& M2 u$ }
" u, P, {( t5 J" e! g, A' u; q: k# e! j6 h% L# b9 m' T* E$ Y
root@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone4 f! D9 T& h3 Y" L3 u# O* ~. O
& x+ Q8 s% C# [' \

- i' a  v6 G% J; o/ L3 _% L: @3 f问题解决。; u1 B" }: d: F; h
& z* W. a8 I: k6 M* X
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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