Why I got UNKNOW status when using grpc and pika(python client of rabbitmq)?

I combined grpc and pika in a Class but I got problem both in client and server of my system when a grpc function in client get start.
The client got grpc Exception calling application, the server got rabbitmq pop from an empty deque.
And I found rabbitmq-server log, client tcp was unexpectedly closed.

Here is traceback of my client:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Traceback (most recent call last):
File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
return self.func(*args)
File "/home/jason/codes/TalkyWalky/login_rpc.py", line 24, in Login
result = self.clientrpc.login()
File "/home/jason/codes/TalkyWalky/client.py", line 28, in login
res = self.stub.myLogin(helloworld_pb2.LoginRequest(username=self.username, password=self.password, queuename=self.queue_name)).res
File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/site-packages/grpc/_channel.py", line 1181, in __call__
return _end_unary_response_blocking(state, call, False, None)
File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
raise _InactiveRpcError(state) # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Exception calling application: Stream connection lost: IndexError('pop from an empty deque')"
debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Exception calling application: Stream connection lost: IndexError('pop from an empty deque')", grpc_status:2, created_time:"2024-06-18T20:12:40.624492156+08:00"}"
</code>
<code>Traceback (most recent call last): File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "/home/jason/codes/TalkyWalky/login_rpc.py", line 24, in Login result = self.clientrpc.login() File "/home/jason/codes/TalkyWalky/client.py", line 28, in login res = self.stub.myLogin(helloworld_pb2.LoginRequest(username=self.username, password=self.password, queuename=self.queue_name)).res File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/site-packages/grpc/_channel.py", line 1181, in __call__ return _end_unary_response_blocking(state, call, False, None) File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking raise _InactiveRpcError(state) # pytype: disable=not-instantiable grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNKNOWN details = "Exception calling application: Stream connection lost: IndexError('pop from an empty deque')" debug_error_string = "UNKNOWN:Error received from peer {grpc_message:"Exception calling application: Stream connection lost: IndexError('pop from an empty deque')", grpc_status:2, created_time:"2024-06-18T20:12:40.624492156+08:00"}" </code>
Traceback (most recent call last):
  File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/tkinter/__init__.py", line 1892, in __call__
    return self.func(*args)
  File "/home/jason/codes/TalkyWalky/login_rpc.py", line 24, in Login
    result = self.clientrpc.login()
  File "/home/jason/codes/TalkyWalky/client.py", line 28, in login
    res = self.stub.myLogin(helloworld_pb2.LoginRequest(username=self.username, password=self.password, queuename=self.queue_name)).res
  File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/site-packages/grpc/_channel.py", line 1181, in __call__
    return _end_unary_response_blocking(state, call, False, None)
  File "/home/jason/anaconda3/envs/chatroom/lib/python3.9/site-packages/grpc/_channel.py", line 1006, in _end_unary_response_blocking
    raise _InactiveRpcError(state)  # pytype: disable=not-instantiable
grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with:
        status = StatusCode.UNKNOWN
        details = "Exception calling application: Stream connection lost: IndexError('pop from an empty deque')"
        debug_error_string = "UNKNOWN:Error received from peer  {grpc_message:"Exception calling application: Stream connection lost: IndexError('pop from an empty deque')", grpc_status:2, created_time:"2024-06-18T20:12:40.624492156+08:00"}"

And here is the traceback of my server:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>Exception has occurred: StreamLostError
Stream connection lost: IndexError('pop from an empty deque')
File "/home/jason/codes/TalkyWalky/server_rpc.py", line 135, in receive
self.channel.start_consuming()
File "/home/jason/codes/TalkyWalky/server_rpc.py", line 119, in connect
self.receive()
pika.exceptions.StreamLostError: Stream connection lost: IndexError('pop from an empty deque')
</code>
<code>Exception has occurred: StreamLostError Stream connection lost: IndexError('pop from an empty deque') File "/home/jason/codes/TalkyWalky/server_rpc.py", line 135, in receive self.channel.start_consuming() File "/home/jason/codes/TalkyWalky/server_rpc.py", line 119, in connect self.receive() pika.exceptions.StreamLostError: Stream connection lost: IndexError('pop from an empty deque') </code>
Exception has occurred: StreamLostError
Stream connection lost: IndexError('pop from an empty deque')
  File "/home/jason/codes/TalkyWalky/server_rpc.py", line 135, in receive
    self.channel.start_consuming()
  File "/home/jason/codes/TalkyWalky/server_rpc.py", line 119, in connect
    self.receive()
pika.exceptions.StreamLostError: Stream connection lost: IndexError('pop from an empty deque')

And here is rabbitmq Server log:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>2024-06-18 20:34:12.135411+08:00 [info] <0.28361.0> accepting AMQP connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672)
2024-06-18 20:34:12.136909+08:00 [info] <0.28361.0> connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/'
2024-06-18 20:34:20.090332+08:00 [info] <0.28372.0> accepting AMQP connection <0.28372.0> (127.0.0.1:58042 -> 127.0.0.1:5672)
2024-06-18 20:34:20.091169+08:00 [info] <0.28372.0> connection <0.28372.0> (127.0.0.1:58042 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/'
2024-06-18 20:34:20.096125+08:00 [warning] <0.28361.0> closing AMQP connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672, vhost: '/', user: 'guest'):
2024-06-18 20:34:20.096125+08:00 [warning] <0.28361.0> client unexpectedly closed TCP connection
</code>
<code>2024-06-18 20:34:12.135411+08:00 [info] <0.28361.0> accepting AMQP connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672) 2024-06-18 20:34:12.136909+08:00 [info] <0.28361.0> connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/' 2024-06-18 20:34:20.090332+08:00 [info] <0.28372.0> accepting AMQP connection <0.28372.0> (127.0.0.1:58042 -> 127.0.0.1:5672) 2024-06-18 20:34:20.091169+08:00 [info] <0.28372.0> connection <0.28372.0> (127.0.0.1:58042 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/' 2024-06-18 20:34:20.096125+08:00 [warning] <0.28361.0> closing AMQP connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672, vhost: '/', user: 'guest'): 2024-06-18 20:34:20.096125+08:00 [warning] <0.28361.0> client unexpectedly closed TCP connection </code>
2024-06-18 20:34:12.135411+08:00 [info] <0.28361.0> accepting AMQP connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672)
2024-06-18 20:34:12.136909+08:00 [info] <0.28361.0> connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/'
2024-06-18 20:34:20.090332+08:00 [info] <0.28372.0> accepting AMQP connection <0.28372.0> (127.0.0.1:58042 -> 127.0.0.1:5672)
2024-06-18 20:34:20.091169+08:00 [info] <0.28372.0> connection <0.28372.0> (127.0.0.1:58042 -> 127.0.0.1:5672): user 'guest' authenticated and granted access to vhost '/'
2024-06-18 20:34:20.096125+08:00 [warning] <0.28361.0> closing AMQP connection <0.28361.0> (127.0.0.1:44138 -> 127.0.0.1:5672, vhost: '/', user: 'guest'):
2024-06-18 20:34:20.096125+08:00 [warning] <0.28361.0> client unexpectedly closed TCP connection

I do confirm, rabbitmq and grpc use different ports

I have no idea what i could try.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật