Hey all,

I'm having a hard time to set the service_config on my server side and have 
it received by a client. I'm testing it in a small playground project and 
am currently out of ideas in how to get this working. Rough project setup 
and findings:

OS: linux, gRPC: v.160, v.1.58

*Server:*
~~~
const auto serviceConfig = readFile("service_config.json");
builder.AddChannelArgument(GRPC_ARG_SERVICE_CONFIG, *serviceConfig);

*Client:*

*~~~*
const auto channel = grpc::CreateChannel(Address.data(), 
grpc::InsecureChannelCredentials());
std::cout << std::format("Server config: \n{}\n", 
channel->GetServiceConfigJSON());
Client client(channel);
client.sstream(10);

*Client c-ares logs:*
[polling resolver 0x55eb2c40a410] request complete                         
                          
[polling resolver 0x55eb2c40a410] returning result: addresses=<2 
addresses>, service_config=<null>   
chand=0x55eb2c406d80: got resolver result                                   
                         
chand=0x55eb2c406d80: resolver returned no service config. Using default 
service config for channel. 
chand=0x55eb2c406d80: using service config: "{}"

As to my understanding setting it via *GRPC_ARG_SERVICE_CONFIG *should be 
all it
takes. Logs from c-ares look fine in general but it still can't find the 
service_config. I've been
playing around with various settings but no luck :(

Didn't want to pollute the chat here:
client logs: https://pastebin.com/sFq8FyWa
server logs: https://pastebin.com/HA54iAAw            
relevant code: https://pastebin.com/u6bigcAj

Any help or pointer to an example/test would be greatly appreciated. Maybe 
i've just not understood something

best,

Dennis                                        

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to grpc-io+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/ba296c8d-292e-411d-b24a-e7d90231e7c4n%40googlegroups.com.

Reply via email to