Skip to content

Benign exception messages are logged at level INFO #5872

@nicktrav

Description

@nicktrav

What version of gRPC are you using?

1.21.0

What did you expect to see?

Benign errors (for example, due to connection resets) are not printed at INFO level.

Description

There are some exceptions that are not useful, spam the logs, and are downgraded to FINE level logs lines. This filtering is done via a static list of strings (QUIET_ERRORS) in NettyServerTransport.java.

An example exception message is Connection reset by peer.

Version 1.21.0 included a change to run with epoll on Linux systems, when available (#5581). This seems to have altered certain exception messages to be prefixed with more transport-level information, and the same exceptions are now making their way into the logs at level INFO.

For example, we now see the following, which was previously logged at TRACE:

Jun 12, 2019 9:19:11 PM io.grpc.netty.shaded.io.grpc.netty.NettyServerTransport notifyTerminated
INFO: Transport failed
io.grpc.netty.shaded.io.netty.channel.unix.Errors$NativeIoException: syscall:read(..) failed: Connection reset by peer
        at io.grpc.netty.shaded.io.netty.channel.unix.FileDescriptor.readAddress(..)(Unknown Source)

This is presumably due to the syscall:read(..) failed: prefix causing the exceptions to not be excluded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions