I got the answer. I am sharing the answer here so that anyone having this problem can use this. Thank you.
First solution is change the rpc call from
rpc Hello(HelloRequest) returns (HelloResponse){} to rpc Hello(HelloRequest) returns (ServerInfo){}. This will work.
Second solution is when we have an obligation to not to change the rpc call then in server we can use the below code to call the ServerInfo fields and assign them to HelloResponse.
ServerInfo* serverinfo=new ServerInfo();
serverinfo->set_name("");
serverinfo->set_os("");
serverinfo->set_arch("");
serverinfo->set_nproc("");
HelloResponse* res;
res->set_allocated_server(serverinfo);