gRPC mac comand connection warning 'read: connection reset by peer'

time="2021-12-13T09:03:40.641780416Z" level=info msg="mac-command queue item created" cid=LinkADRReq ctx_id=343a0b7d-1726-4790-b651-20c8df39b024 dev_eui=3bc1efb6e719cc2c
time="2021-12-13T09:03:40.641850415Z" level=info msg="finished unary call with code OK" ctx_id=343a0b7d-1726-4790-b651-20c8df39b024 grpc.code=OK grpc.method=CreateMACCommandQueueItem grpc.service=ns.NetworkServerService grpc.start_time="2021-12-13T09:03:40Z" grpc.time_ms=1.583 peer.address="114.221.231.104:17817" span.kind=server system=grpc
time="2021-12-13T09:03:40.654510203Z" level=warning msg="[transport] transport: http2Server.HandleStreams failed to read frame: read tcp 172.18.0.5:8000->114.221.231.104:17817: read: connection reset by peer"

What is ‘read: connection reset by peer’? I think there may be some problem with firewall.

It means it hit a closed port.

But I indeed opened the port 8000.
When I open the port ‘17817’, it report another warning:

time="2021-12-14T02:04:38.003729151Z" level=warning msg="[transport] transport: http2Server.HandleStreams failed to read frame: read tcp 172.18.0.5:8000->114.221.231.104:19868: read: connection reset by peer"

I think the latter port is random.

Hi,
I am facing a similar issue while trying to run FUOTA-server.
Here is what I see when I run main.go example provided in the repo.

INFO[0396] storage: deployment updated                   id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2
INFO[0396] fuota: starting multicast class-c session setup for devices  deployment_id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2
INFO[0397] storage: deployment created                   id=32636270-ead5-4c35-8f02-050afd10b42f
INFO[0397] storage: deployment device created            deployment_id=32636270-ead5-4c35-8f02-050afd10b42f dev_eui=647fda000000cc4d
WARN[0397] [transport] transport: http2Server.HandleStreams failed to read frame: read tcp [::1]:8070->[::1]:57786: read: connection reset by peer 
INFO[0397] finished client unary call                    grpc.code=OK grpc.method=Create grpc.service=api.MulticastGroupService grpc.time_ms=175.251 span.kind=client system=grpc
INFO[0397] fuota: multicast-group created                deployment_id=32636270-ead5-4c35-8f02-050afd10b42f multicast_group_id=d45e8f64-46c4-4fe1-a172-83ee21562173
INFO[0397] fuota: add devices to multicast-group         deployment_id=32636270-ead5-4c35-8f02-050afd10b42f
INFO[0397] fuota: add device to multicast-group          deployment_id=32636270-ead5-4c35-8f02-050afd10b42f dev_eui=647fda000000cc4d multicast_group_id=d45e8f64-46c4-4fe1-a172-83ee21562173
INFO[0397] finished client unary call                    grpc.code=OK grpc.method=AddDevice grpc.service=api.MulticastGroupService grpc.time_ms=175.415 span.kind=client system=grpc
INFO[0397] fuota: starting multicast-setup for devices   deployment_id=32636270-ead5-4c35-8f02-050afd10b42f
INFO[0397] fuota: initiate multicast-setup for device    attempt=1 deployment_id=32636270-ead5-4c35-8f02-050afd10b42f dev_eui=647fda000000cc4d
INFO[0397] finished client unary call                    grpc.code=OK grpc.method=Enqueue grpc.service=api.DeviceQueueService grpc.time_ms=172.953 span.kind=client system=grpc
INFO[0397] storage: deployment log created               command=McGroupSetupReq deployment_id=32636270-ead5-4c35-8f02-050afd10b42f dev_eui=647fda000000cc4d
WARN[0456] fuota: multicast class-c session setup reached max. number of attempts, some devices did not complete  deployment_id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2
INFO[0456] storage: deployment updated                   id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2
INFO[0456] fuota: starting multicast enqueue             deployment_id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2
INFO[0457] finished client unary call                    grpc.code=OK grpc.method=Enqueue grpc.service=api.MulticastGroupService grpc.time_ms=178.958 span.kind=client system=grpc
INFO[0457] finished client unary call                    grpc.code=OK grpc.method=Enqueue grpc.service=api.MulticastGroupService grpc.time_ms=183.58 span.kind=client system=grpc
INFO[0457] finished client unary call                    grpc.code=OK grpc.method=Enqueue grpc.service=api.MulticastGroupService grpc.time_ms=178.044 span.kind=client system=grpc
INFO[0457] storage: deployment updated                   id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2
INFO[0457] fuota: waiting for multicast-session to end for devices before sending fragmentation-session status request  deployment_id=2b24b768-9fa8-4d77-ac0a-8fa78c01bbd2 sleep_time=1m3.448646743s
WARN[0457] fuota: multicast-setup reached max. number of attepts, some devices did not complete  deployment_id=32636270-ead5-4c35-8f02-050afd10b42f
INFO[0457] storage: deployment updated                   id=32636270-ead5-4c35-8f02-050afd10b42f
INFO[0457] fuota: starting fragmentation-session setup for devices  deployment_id=32636270-ead5-4c35-8f02-050afd10b42f

Here is a snippet from chirpstack-fuota-server.toml for event handler binding:

Application Server (integration) settings.

[application_server]

Event handler integration settings.

[application_server.event_handler]

# Payload marshaler.
#
# This defines how the HTTP payloads are encoded. Valid options are:
# * protobuf:  Protobuf encoding
# * json:      JSON encoding (easier for debugging, but less compact than 'protobuf')
marshaler="protobuf"

# HTTP handler settings.
[application_server.event_handler.http]

  # IP:Port to bind the event handler server to.
  bind="0.0.0.0:8090"

My chirpstack instance is running on 65.21.189.50, hence this configuration in the same file:

API integration settings.

[application_server.api]

# ChirpStack Application Server API server endpoint.
server="65.21.189.50:8080"

Under HTTP integration, I am using same IP as my ethernet interface IP and port 8090.

My device receives the downlink from FUOTA-server and the device sends an uplink in response to multicast setup request. However, fuota server is unable to receive uplinks from device. I have done HTTP integration. I guess the issue is related to this warning:

WARN[0397] [transport] transport: http2Server.HandleStreams failed to read frame: read tcp [::1]:8070->[::1]:57786: read: connection reset by peer

I am not sure where I am going wrong. Any suggestions to resolve this issue are much appreciated.

Update: My issue was due to http integration and has been resolved by using http://localhost:8080 instead of localhost:8080

I still see this http2server warning but it doesn’t have any impact on FUOTA operation