scwhittle opened a new pull request, #34096:
URL: https://github.com/apache/beam/pull/34096

   Otherwise the harness can fail with stacks like:
   
   ```
   
   java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: 
UNAVAILABLE: io exception
        at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
        at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2073)
        at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:416)
        at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:236)
        at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:198)
        at org.apache.beam.fn.harness.FnHarness.main(FnHarness.java:141)
        Suppressed: java.lang.RuntimeException: 
java.lang.IllegalStateException: Logging stream terminated unexpectedly before 
it was closed by the client with error: io.grpc.StatusRuntimeException: 
UNAVAILABLE: io exception
                at 
org.apache.beam.fn.harness.logging.BeamFnLoggingClient$StreamWriter.drainQueueToStream(BeamFnLoggingClient.java:270)
                at 
org.apache.beam.fn.harness.logging.BeamFnLoggingClient.lambda$new$0(BeamFnLoggingClient.java:160)
                at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
                at 
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
                at 
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
                at 
org.apache.beam.sdk.util.UnboundedScheduledExecutorService$ScheduledFutureTask.run(UnboundedScheduledExecutorService.java:163)
                at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
                at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
                at java.base/java.lang.Thread.run(Thread.java:1656)
        Caused by: java.lang.IllegalStateException: Logging stream terminated 
unexpectedly before it was closed by the client with error: 
io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
                at 
org.apache.beam.fn.harness.logging.BeamFnLoggingClient$StreamWriter.drainQueueToStream(BeamFnLoggingClient.java:261)
                ... 8 more
   Caused by: io.grpc.StatusRuntimeException: UNAVAILABLE: io exception
        at io.grpc.Status.asRuntimeException(Status.java:532)
        at 
io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:564)
        at 
io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
        at 
io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
        at 
io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
        at 
io.grpc.census.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:814)
        at 
io.grpc.PartialForwardingClientCallListener.onClose(PartialForwardingClientCallListener.java:39)
        at 
io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:23)
        at 
io.grpc.ForwardingClientCallListener$SimpleForwardingClientCallListener.onClose(ForwardingClientCallListener.java:40)
        at 
io.grpc.census.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:494)
        at 
io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489)
        at 
io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453)
        at 
io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486)
        at 
io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:565)
        at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:733)
        at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:714)
        at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
        at 
io.grpc.internal.SerializeReentrantCallsDirectExecutor.execute(SerializeReentrantCallsDirectExecutor.java:49)
        at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.closedInternal(ClientCallImpl.java:740)
        at 
io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.closed(ClientCallImpl.java:684)
        at 
io.grpc.internal.DelayedStream$DelayedStreamListener$4.run(DelayedStream.java:509)
        at 
io.grpc.internal.DelayedStream$DelayedStreamListener.drainPendingCallbacks(DelayedStream.java:534)
        at 
io.grpc.internal.DelayedStream.drainPendingCalls(DelayedStream.java:187)
        at io.grpc.internal.DelayedStream$4.run(DelayedStream.java:148)
        at 
com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:30)
        at 
io.grpc.internal.DelayedClientTransport.reprocess(DelayedClientTransport.java:315)
        at 
io.grpc.internal.ManagedChannelImpl.updateSubchannelPicker(ManagedChannelImpl.java:803)
        at 
io.grpc.internal.ManagedChannelImpl$LbHelperImpl$1UpdateBalancingState.run(ManagedChannelImpl.java:1397)
        at io.grpc.SynchronizationContext.drain(SynchronizationContext.java:96)
        at 
io.grpc.SynchronizationContext.execute(SynchronizationContext.java:128)
        at 
io.grpc.internal.InternalSubchannel$TransportListener.transportShutdown(InternalSubchannel.java:611)
        at 
io.grpc.netty.ClientTransportLifecycleManager.notifyGracefulShutdown(ClientTransportLifecycleManager.java:64)
        at 
io.grpc.netty.ClientTransportLifecycleManager.notifyShutdown(ClientTransportLifecycleManager.java:70)
        at 
io.grpc.netty.ClientTransportLifecycleManager.notifyTerminated(ClientTransportLifecycleManager.java:92)
        at 
io.grpc.netty.NettyClientTransport$5.operationComplete(NettyClientTransport.java:325)
        at 
io.grpc.netty.NettyClientTransport$5.operationComplete(NettyClientTransport.java:319)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:557)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
        at 
io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
        at 
io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
        at 
io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:110)
        at 
io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:89)
        at 
io.grpc.netty.WriteBufferingAndExceptionHandler.failWrites(WriteBufferingAndExceptionHandler.java:243)
        at 
io.grpc.netty.WriteBufferingAndExceptionHandler$1ConnectListener.operationComplete(WriteBufferingAndExceptionHandler.java:152)
        at 
io.grpc.netty.WriteBufferingAndExceptionHandler$1ConnectListener.operationComplete(WriteBufferingAndExceptionHandler.java:148)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:583)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:559)
        at 
io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
        at 
io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
        at 
io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
        at 
io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:326)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:342)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1656)
   Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: 
Connection refused: localhost/127.0.0.1:10043
   Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Net.java:682)
        at 
java.base/sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:973)
        at 
io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:336)
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:339)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:994)
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.base/java.lang.Thread.run(Thread.java:1656)
   ```
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable. This will automatically add a link to the 
pull request in the issue. If you would like the issue to automatically close 
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more 
tips on [how to make review process 
smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit 
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   [![Build python source distribution and 
wheels](https://github.com/apache/beam/actions/workflows/build_wheels.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python 
tests](https://github.com/apache/beam/actions/workflows/python_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java 
tests](https://github.com/apache/beam/actions/workflows/java_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go 
tests](https://github.com/apache/beam/actions/workflows/go_tests.yml/badge.svg?event=schedule&&?branch=master)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more 
information about GitHub Actions CI or the [workflows 
README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) 
to see a list of phrases to trigger workflows.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to