Cannot deploy Shadow manager on a GG device with GG v1 installed

0

I have only 3 components in my deployment at the moment, log manager, Legacy Subscriptions, and shadow manager. Any time I start the deployment it fails and rolls back to the previous deployment with only log manager, and legacy subscriptions. My device has both Greengrass v1 installed and greengrass v2.

I've tried deleting the component folder within v2/work after the failed deployment, but it does not seem to change anything The following is the error within the greengrass log file after deploying:

`2023-10-17T15:23:20.033Z [INFO] (pool-2-thread-16) org.flywaydb.core.internal.license.VersionPrinter: Flyway Community Edition 6.5.5 by Redgate. {} 2023-10-17T15:23:20.105Z [ERROR] (pool-2-thread-16) com.aws.greengrass.shadowmanager.ShadowManager: service-errored. {serviceName=aws.greengrass.ShadowManager, currentState=NEW} java.lang.IllegalStateException: The file is locked: nio:/greengrass/v2/work/aws.greengrass.ShadowManager/shadow.mv.db [1.4.200/7] at com.aws.greengrass.shadowmanager.lib.org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:950) at com.aws.greengrass.shadowmanager.lib.org.h2.mvstore.FileStore.open(FileStore.java:172) at com.aws.greengrass.shadowmanager.lib.org.h2.mvstore.MVStore.<init>(MVStore.java:381) at com.aws.greengrass.shadowmanager.lib.org.h2.mvstore.MVStore$Builder.open(MVStore.java:3579) at com.aws.greengrass.shadowmanager.lib.org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:170) at com.aws.greengrass.shadowmanager.lib.org.h2.mvstore.db.MVTableEngine.init(MVTableEngine.java:103) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Database.getPageStore(Database.java:2659) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Database.open(Database.java:675) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Database.openDatabase(Database.java:307) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Database.<init>(Database.java:301) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Engine.openSession(Engine.java:74) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Engine.openSession(Engine.java:192) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Engine.createSessionAndValidate(Engine.java:171) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Engine.createSession(Engine.java:166) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.Engine.createSession(Engine.java:29) at com.aws.greengrass.shadowmanager.lib.org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:340) at com.aws.greengrass.shadowmanager.lib.org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:173) at com.aws.greengrass.shadowmanager.lib.org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:152) at com.aws.greengrass.shadowmanager.lib.org.h2.Driver.connect(Driver.java:69) at com.aws.greengrass.shadowmanager.lib.org.h2.jdbcx.JdbcDataSource.getJdbcConnection(JdbcDataSource.java:189) at com.aws.greengrass.shadowmanager.lib.org.h2.jdbcx.JdbcDataSource.getConnection(JdbcDataSource.java:160) at org.flywaydb.core.internal.jdbc.JdbcUtils.openConnection(JdbcUtils.java:56) at org.flywaydb.core.internal.jdbc.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:80) at org.flywaydb.core.Flyway.execute(Flyway.java:453) at org.flywaydb.core.Flyway.migrate(Flyway.java:158) at com.aws.greengrass.shadowmanager.ShadowManagerDatabase.migrateDB(ShadowManagerDatabase.java:104) at com.aws.greengrass.shadowmanager.ShadowManagerDatabase.migrateAndGetResult(ShadowManagerDatabase.java:110) at com.aws.greengrass.shadowmanager.ShadowManagerDatabase.install(ShadowManagerDatabase.java:86) at com.aws.greengrass.shadowmanager.ShadowManager.install(ShadowManager.java:236) at com.aws.greengrass.shadowmanager.ShadowManager.install(ShadowManager.java:225) at com.aws.greengrass.lifecyclemanager.Lifecycle.lambda$handleCurrentStateNew$5(Lifecycle.java:502) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)

2023-10-17T15:23:20.106Z [INFO] (aws.greengrass.ShadowManager-lifecycle) com.aws.greengrass.shadowmanager.ShadowManager: service-set-state. {serviceName=aws.greengrass.ShadowManager, currentState=NEW, newState=ERRORED} 2023-10-17T15:23:20.109Z [INFO] (aws.greengrass.ShadowManager-lifecycle) com.aws.greengrass.status.FleetStatusService: fss-status-update-published. Status update published to FSS. {trigger=ERRORED_COMPONENT, serviceName=FleetStatusService, currentState=RUNNING} 2023-10-17T15:23:20.109Z [INFO] (aws.greengrass.ShadowManager-lifecycle) com.aws.greengrass.shadowmanager.ShadowManager: service-set-state. {serviceName=aws.greengrass.ShadowManager, currentState=ERRORED, newState=NEW}`

  • Hello,

    Please shutdown Greengrass v2 using sudo systemctl stop greengrass and then delete all files in sudo rm -rf /greengrass/v2/work/aws.greengrass.ShadowManager, then start Greengrass again sudo systemctl start greengrass.

질문됨 7달 전223회 조회
1개 답변
-1

Hello,

As a workaround suggested by the expert you could try the shutting down the GreenGrass v2 using the below command,

sudo systemctl stop greengrass 

Further, delete all the files of the shadow manager component by following the below command,

sudo rm -rf /greengrass/v2/work/aws.greengrass.ShadowManager

Lastly, restart the GreenGrass, to check if the issue was mitigated

sudo systemctl start greengrass
AWS
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠