找回密码
 注册
查看: 748|回复: 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% W9 F: w) `. {3 P, U2 E
4 {& o' C( U/ h' o& x/ s
7 Z; F( I1 n, q+ y# Y
Exception ignored in: <function _removeHandlerRef at 0x7f17
" l$ _& }+ {' ~& oTraceback (most recent call last):
% o& S/ A& h2 U  File "/usr/lib/python3.11/logging/__init__.py", line 855,
( i$ D0 L6 t# F* i/ C1 Y3 ]& [  File "/usr/lib/python3.11/logging/__init__.py", line 235,3 |9 s- z: ~- J
  File "/usr/lib/python3.11/threading.py", line 164, in acq5 L. b" c. u* S* \. I# R: H$ W3 x
  File "/usr/lib/python3/dist-packages/eventlet/green/threa
# g! v3 X* z' n8 V8 TAttributeError: 'NoneType' object has no attribute 'getcurr! y$ _4 W4 m* v4 a6 c6 A; {
/ w5 v; k( o! k* P9 f9 x
# P$ J. y' F; j2 Q4 Z+ R/ Q
; V1 \6 u) i' d% H6 c1 Y9 s6 h
root@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone/ u# Q, g6 h1 K" ~2 S: \4 Q8 S* V, T
Exception ignored in: <function _removeHandlerRef at 0x7f1718ed9580>: i4 V- @- D9 a% n" T- v4 d
Traceback (most recent call last):7 M/ s* G( o9 f$ N- m- v. [9 [
  File "/usr/lib/python3.11/logging/__init__.py", line 855, in _removeHandlerRef
+ Q) J+ k2 b6 J$ y$ b: \8 W  File "/usr/lib/python3.11/logging/__init__.py", line 235, in _acquireLock
8 t5 @* l2 l  k$ ~1 }  u, m  File "/usr/lib/python3.11/threading.py", line 164, in acquire
2 L$ z' h2 h" k, w+ x; E) r; a  File "/usr/lib/python3/dist-packages/eventlet/green/thread.py", line 34, in get_ident3 @( g  F3 W' _9 N9 ~1 _
AttributeError: 'NoneType' object has no attribute 'getcurrent'* B: o0 S1 |5 Z8 p

+ d. d3 j  V' x- y* B2 e  D% h$ g1 r. [$ J

7 _" j- D6 q5 ]6 j, a
- t, _& Y  i6 ?3 T+ R找到文件:修改$ e3 q1 c' T, X$ N" ]/ ?7 C
vim /usr/lib/python3/dist-packages/eventlet/green/thread.py
% S& J' a, u3 }) H, Z/ Q5 j! S" t/ K& U' K: l+ P
def get_ident(gr=None):
, M; z3 [1 e5 L1 }; {+ X      if gr is None:: n4 {; W& U5 j7 H* S) W0 p) Q
          return id(greenlet.getcurrent())
" A; y% h% g# z& g5 J       else:
6 N% l9 s' E$ y/ N( y1 [          return id(gr)+ p2 [! e9 n- I9 B5 x9 `
& R6 K" D* ~$ I2 ]- Z1 b8 z' u
修改成:
: |) y1 @3 V/ k: G- R5 z$ hvim /usr/lib/python3/dist-packages/eventlet/green/thread.py 8 M8 J& Y1 S" c# g" W  Q. H
1 R5 y& f' Q5 G: L9 m

. H8 j* N) Q+ D& }; `7 G- [
3 v) B6 ~( P0 m: V( d7 D* gdef get_ident(gr=None):
9 \! O( M8 @( F7 l- p+ {' Q    try:
- k3 p& }" j  c, {" n* d         if gr is None:
& Y8 {8 B! i3 a# B* n- q9 J             return id(greenlet.getcurrent())
' `5 v1 q% d2 ]! Y         else:
# l- m: L/ {) {( B0 H. Q             return id(gr)2 F! P* G. h3 F
    except:
# `  E) q! b- e/ B7 L       return id(gr)
7 _9 O' B# |$ _4 b
) I0 Y$ D, a) {, S
+ Y% {+ Q* z- a9 o1 u4 J+ t8 H一定要注意缩减,不然会报错哦。; p% D# @' [% x2 ?
+ M" f2 d3 N0 K
5 |! ?7 D; L+ [/ i5 _, Y
root@controller:~# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone5 K" C6 V' E6 P$ c

) r) W6 |0 f9 H' ]* X6 E8 f9 ]$ t2 C9 s2 ]: j; J5 P; Z7 S
问题解决。
( U4 X* ?  l1 S9 }# w* u0 W( N& u5 Y$ V- e' A7 l
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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