MAVSDK-Python icon indicating copy to clipboard operation
MAVSDK-Python copied to clipboard

grpc._channel._MultiThreadedRendezvous: <_MultiThreadedRendezvous of RPC that terminated with: status = StatusCode.UNAVAILABLE details = "Socket closed"

Open MuhammadBilal1 opened this issue 4 years ago • 9 comments

Hi, I am using MAVSDK Python and getting the below error occasionally, I don't know why but this comes mostly at "Waiting for drone to connect"

mavsdk version: 0.16.0 grpcio version: 1.38.0 celery version: 5.1.0 Ubuntu 20.04 (Latest updates installed as of today)

Note: Mostly when I try to connect the drone, it kept waiting for the connecting at "Waiting for drone to connect..." then I use the below command to kill the mavsdk process and then connect again and it works. But this GRPC error comes even when I am not killing the ports manually.

sudo kill -9 $(sudo lsof -t -i:14540 -i:50051 )

image

MuhammadBilal1 avatar Jul 02 '21 12:07 MuhammadBilal1

This happens when the connection between MAVSDK-Python and mavsdk_server is lost, I would say.

JonasVautherin avatar Jul 02 '21 13:07 JonasVautherin

Can you please tell me how we can fix this? And why this is happening?

01 02 03

MuhammadBilal1 avatar Jul 02 '21 13:07 MuhammadBilal1

Did you manage to run the MAVSDK-Python example scripts?

JonasVautherin avatar Jul 02 '21 13:07 JonasVautherin

Yes, the examples work. I am getting this issues occasionally in my flow, not all the times.

I am using the Gazebo Headless simulator.

MuhammadBilal1 avatar Jul 02 '21 14:07 MuhammadBilal1

How do you start mavsdk_server? Automatically with await drone.connect()?

JonasVautherin avatar Jul 06 '21 10:07 JonasVautherin

How do you start mavsdk_server? Automatically with await drone.connect()?

Yes. Automatically with await drone.connect()

MuhammadBilal1 avatar Jul 08 '21 04:07 MuhammadBilal1

Do you have some code you could share that would reproduce this issue?

JonasVautherin avatar Jul 08 '21 06:07 JonasVautherin

Do you have some code you could share that would reproduce this issue?

@JonasVautherin I can send you the code. Can't share it here with the public. My code has copyrights. Please share the email or something where I can share this code.

MuhammadBilal1 avatar Oct 01 '21 15:10 MuhammadBilal1

Could you isolate the bug into a small, reproducible example that you could share here?

JonasVautherin avatar Oct 01 '21 15:10 JonasVautherin