openziti / edge

Application-embedded connectivity and zero-trust components
Apache License 2.0
75 stars 19 forks source link

Disconnecting a hosted service produces "send on closed channel" #67

Closed dovholuknf closed 4 years ago

dovholuknf commented 4 years ago

Today using the sample-host i ran a host and a client:

ziti edge controller create service sdk-hosted-svc localhost 10000 --hosted
ziti edge controller create service-policy bind-all Bind --service-roles '@all' --identity-roles '@all'
sample-host.exe server identity.json sdk-hosted-svc
sample-host.exe client identity.json sdk-hosted-svc

stop the server observe:

[ 120.557]    INFO github.com/netfoundry/ziti-edge/gateway/xgress_edge.(*localMessageSink).close [ch{edge}->u{classic}->i{Ab4X}]: {connId=[0]} closing message sink, reason: underlying channel closing
[ 120.557] WARNING github.com/netfoundry/ziti-edge/gateway/xgress_edge.(*localMessageSink).close [ch{edge}->u{classic}->i{Ab4X}]: {connId=[0] error=[channel closed]} unable to send close msg to edge client

start the server again and then disconnect the client.

observe this in the logs over and over:


[ 165.371]   ERROR github.com/netfoundry/ziti-fabric/xgress.(*PayloadBuffer).ReceiveAcknowledgement.func1 [s/AbjA]: send on closed channel
[ 170.373]   ERROR github.com/netfoundry/ziti-fabric/xgress.(*PayloadBuffer).ReceiveAcknowledgement.func1 [s/AbjA]: send on closed channel
[ 175.373]   ERROR github.com/netfoundry/ziti-fabric/xgress.(*PayloadBuffer).ReceiveAcknowledgement.func1 [s/AbjA]: send on closed channel
...```
plorenz commented 4 years ago

I followed the steps and it looks like it now behaves appropriately. When the server is closed, the client is notified and closes as well. I don't see any repeating errors in the logs.