python3连接etcd3 grpc报错解决方法

本例环境如下:

python版本: 3.7.1

etcd3版本: 0.12.0

报错信息:
state = <grpc._channel._RPCState object at 0x7f51082a8b70>
call = <grpc._cython.cygrpc.SegregatedCall object at 0x7f51080edc08>
with_call = False, deadline = None

    def _end_unary_response_blocking(state, call, with_call, deadline):
        if state.code is grpc.StatusCode.OK:
            if with_call:
                rendezvous = _MultiThreadedRendezvous(state, call, None, deadline)
                return state.response, rendezvous
            else:
                return state.response
        else:
>           raise _InactiveRpcError(state)
E           grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
E           	status = StatusCode.UNAUTHENTICATED
E           	details = "Established channel does not have a sufficient security level to transfer call credential."
E           	debug_error_string = "{"created":"@1653981702.899194914","description":"Error received from peer 127.0.0.1:2379","file":"src/core/lib/surface/call.cc","file_line":952,"grpc_message":"Established channel does not have a sufficient security level to transfer call credential.","grpc_status":16}"
E           >

/root/.pyenv/versions/3.7.1/lib/python3.7/site-packages/grpc/_channel.py:849: _InactiveRpcError

本例连接异常是因为grpcio版本太高,grpcio==1.45.0

降级后解决

pip uninstall grpcio

pip install grpcio==1.19.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值