在提供了GreenGrass舰队之后,该设备被注册在AWS IoT中,而不是注册为GreenGrass核心设备。我在EC2 (启用了TCP连接)和RPi上都设置了相同的问题,在这两种情况下,我都会在与MQTT相关的/greengrass/v2/logs/greang.log中获得这些错误:
EC2 Instance:
2022-06-24T05:22:27.557Z [WARN] (pool-2-thread-9) com.aws.greengrass.deployment.IotJobsHelper: No connection available during subscribing to Iot Jobs descriptions topic. Will retry in sometime. {ThingName=ec2_gg_thing_test}
2022-06-24T05:22:35.268Z [ERROR] (pool-2-thread-1) com.aws.greengrass.mqttclient.MqttClient: Error subscribing. {topic=$aws/things/ec2_gg_thing_test/shadow/name/AWSManagedGreengrassV2Deployment/update/accepted}
2022-06-24T05:22:35.269Z [WARN] (pool-2-thread-1) com.aws.greengrass.deployment.ShadowDeploymentListener: Caught exception while subscribing to shadow topics, will retry shortly. {}
RPi Zero:
2022-06-24T05:25:20.883Z [WARN] (pool-2-thread-11) com.aws.greengrass.deployment.IotJobsHelper: No connection available during subscribing to Iot Jobs descriptions topic. Will retry in sometime. {ThingName=rpiZero}
2022-06-24T05:26:10.037Z [ERROR] (pool-2-thread-10) com.aws.greengrass.mqttclient.MqttClient: Error subscribing. {topic=$aws/things/rpiZero/shadow/name/AWSManagedGreengrassV2Deployment/update/accepted}
2022-06-24T05:26:10.043Z [WARN] (pool-2-thread-10) com.aws.greengrass.deployment.ShadowDeploymentListener: Caught exception while subscribing to shadow topics, will retry shortly. {}有什么可能出错的建议吗?
-编辑
使用的命令:
sudo -E java -Droot=/greengrass/v2 -Dlog.store=FILE \
-jar /GreengrassInstaller/lib/Greengrass.jar \
--trusted-plugin /GreengrassInstaller/FleetProvisioningByClaim.jar \
--init-config /GreengrassInstaller/config.yaml \
--component-default-user ggc_user:ggc_group \
--setup-system-service true/GreengrassInstaller/config.yaml
---
services:
aws.greengrass.Nucleus:
version: "2.5.6"
aws.greengrass.FleetProvisioningByClaim:
configuration:
rootPath: "greengrass/v2"
awsRegion: "us-west-2"
iotDataEndpoint: "<data-endpoint>-ats.iot.us-west-2.amazonaws.com"
iotCredentialEndpoint: "<credentials-endpoint>.credentials.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GGProvisionTest_TokenExchange_RoleAlias"
provisioningTemplate: "GGProvisionTest_Template"
claimCertificatePath: "greengrass/v2/claim-certs/claim.pem.crt"
claimCertificatePrivateKeyPath: "greengrass/v2/claim-certs/claim.private.pem.key"
rootCaPath: "greengrass/v2/AmazonRootCA1.pem"
templateParameters:
ThingName: "<thingName>"
ThingGroupName: "<thingGroup>"发布于 2022-06-30 14:12:09
请尝试使用此(修改后的GGv2使用443端口)。此外,确保正确设置了您的角色和策略:
---
services:
aws.greengrass.Nucleus:
version: "2.5.6"
configuration:
mqtt:
port: 443
greengrassDataPlanePort: 443
aws.greengrass.FleetProvisioningByClaim:
configuration:
rootPath: "greengrass/v2"
awsRegion: "us-west-2"
iotDataEndpoint: "<data-endpoint>-ats.iot.us-west-2.amazonaws.com"
iotCredentialEndpoint: "<credentials-endpoint>.credentials.iot.us-west-2.amazonaws.com"
iotRoleAlias: "GGProvisionTest_TokenExchange_RoleAlias"
provisioningTemplate: "GGProvisionTest_Template"
claimCertificatePath: "greengrass/v2/claim-certs/claim.pem.crt"
claimCertificatePrivateKeyPath: "greengrass/v2/claim-certs/claim.private.pem.key"
rootCaPath: "greengrass/v2/AmazonRootCA1.pem"
templateParameters:
ThingName: "<thingName>"
ThingGroupName: "<thingGroup>"https://stackoverflow.com/questions/72739406
复制相似问题