Python - Stop error message print on port bind error

60 views
Skip to first unread message

Akhilesh Raju

unread,
Jan 26, 2024, 9:16:13 PMJan 26
to grpc.io
As expected, when I provide the keyword arg options=[("grpc.so_reuseport", 0)] to grpc.aio.Server and try to create a channel, it fails if another instance of that server is already running.

However, there is this long message that gets printed out

```
E0126 15:09:11.781314798  724891 chttp2_server.cc:1063]                UNKNOWN:No address added out of total 1 resolved for '[::]:6163' {created_time:"2024-01-26T15:09:11.780990901-08:00", children:[UNKNOWN:Failed to add any wildcard listeners {created_time:"2024-01-26T15:09:11.780979771-08:00", children:[UNKNOWN:Address family not supported by protocol {target_address:"[::]:6163", syscall:"socket", os_error:"Address family not supported by protocol", errno:97, created_time:"2024-01-26T15:09:11.780907766-08:00"}, UNKNOWN:Unable to configure socket {created_time:"2024-01-26T15:09:11.78095302-08:00", fd:12, children:[UNKNOWN:Address already in use {syscall:"bind", os_error:"Address already in use", errno:98, created_time:"2024-01-26T15:09:11.780945967-08:00"}]}]}]}

Is there a way to stop this error from printing?

apo...@google.com

unread,
Feb 5, 2024, 12:43:22 PMFeb 5
to grpc.io
gRPC c-core based libraries has some internal logging with different verbosity levels. It can be controlled with the GRPC_VERBOSITY environment variable which is documented in https://github.com/grpc/grpc/blob/master/doc/environment_variables.md. E.g. setting that to "NONE" should disable this here.
Reply all
Reply to author
Forward
0 new messages