Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(shadow-manager): Stops syncing to cloud after restore from connectivity outtage #164

Closed
crispinboylan-int opened this issue Jan 23, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@crispinboylan-int
Copy link

crispinboylan-int commented Jan 23, 2023

Describe the bug
We get reports that sensors are not being update in the cloud, although greengrass is connected. When we investigate around the time of last update we see some kind of connectivity outtage in the logs, including Following the reconnection the shadow manager service never updates the cloud shadows again.

To Reproduce
Seems intermittent.

Expected behavior
Shadow manager reconnects.

Actual behavior
Shadow manager never tries to sync again.

Environment

  • OS: Ubuntu 22.04
  • JDK version: 17
  • Nucleus version: 2.7.0
  • Shadow Manager version: 2.2.4

Additional context
Logs from shadow manager around connectivity outtage:

2023-01-22T01:33:57.558Z [INFO] (Thread-3) com.aws.greengrass.shadowmanager.sync.strategy.BaseSyncStrategy: sync. Stop syncing. {}
2023-01-22T01:33:57.558Z [INFO] (Thread-3) com.aws.greengrass.shadowmanager.sync.strategy.BaseSyncStrategy: sync. Cancel 1 sync thread(s). {}
2023-01-22T01:33:57.558Z [INFO] (Thread-3) com.aws.greengrass.shadowmanager.sync.strategy.BaseSyncStrategy: sync. Waiting for in-flight sync requests to finish. {}
2023-01-22T01:34:02.499Z [INFO] (Thread-3) com.aws.greengrass.shadowmanager.sync.strategy.BaseSyncStrategy: sync. Finished waiting for sync requests to finish. {}

on restoration of connection we then see:

2023-01-22T01:38:17.817Z [INFO] (Thread-3) com.aws.greengrass.mqttclient.AwsIotMqttClient: Connection resumed. {clientId=home-XXXX#2, sessionPresent=true}
2023-01-22T01:38:17.823Z [INFO] (Thread-3) com.aws.greengrass.status.FleetStatusService: fss-status-update-published. Status update published to FSS. {trigger=RECONNECT, serviceName=FleetStatusService, currentState=RUNNING}
2023-01-22T01:38:43.084Z [INFO] (Thread-3) com.aws.greengrass.mqttclient.AwsIotMqttClient: Connection resumed. {clientId=home-XXXX, sessionPresent=true}
2023-01-22T01:38:43.106Z [INFO] (Thread-3) com.aws.greengrass.deployment.IotJobsHelper: No deployment job found. {ThingName=home-XXXX}

but from that point on we only ever see:

2023-01-22T01:38:59.940Z [INFO] (Thread-6) com.aws.greengrass.shadowmanager.ipc.UpdateThingShadowRequestHandler: Successfully updated shadow. {service-name=co.mgh.ShadowPortal, thing name=home-XXX, shadow name=AirQuality, local-version=854642}
2023-01-22T01:39:12.905Z [INFO] (Thread-6) com.aws.greengrass.shadowmanager.ipc.UpdateThingShadowRequestHandler: Successfully updated shadow. {service-name=co.mgh.ShadowPortal, thing name=home-XXX, shadow name=AirQuality, local-version=854643}

from shadow manager, we never see another sync in the logs with the cloud shadows.

log-events-viewer-result(2).csv

@crispinboylan-int crispinboylan-int added the bug Something isn't working label Jan 23, 2023
@crispinboylan-int
Copy link
Author

can anyone comment on this? Just wondering if it could be something resolved in a later nucleus? I cant see anything relevant in the notes though.

@nikkhilmuthye
Copy link
Contributor

Can you retry using Nucleus 2.9.3? Also, has this happened more than once?

@crispinboylan-int
Copy link
Author

yes this has happened a couple of times before and has now just occurred on a system running 2.9.3

@jcosentino11
Copy link
Member

jcosentino11 commented Feb 27, 2023

Looking at the logs, I'm not seeing evidence that syncing starts back up. We're going to reproduce the issue and investigate on our side, we'll update this thread as we know more.

Please do try the very latest versions of Nucleus and Shadow manager as we've continue to make some improvements which may address you issue.

@MikeDombo
Copy link
Member

I will close this issue soon if we don't hear anything. Is this still a problem when using the very latest versions of Nucleus and Shadow Manager?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants