You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

IDT 4.7.0测试Greengrass V2 cloudcomponent失败求助

关于IDT 4.7.0测试AWS Greengrass V2时cloudcomponent测试失败的排查请求

错误描述

运行IDT时,cloudcomponent模块日志报错:

the Greengrass deployment is COMPLETED on the device after 180 seconds

具体错误堆栈如下:

2023-Mar-29 10:22:22,494 [cloudComponent] [idt-c057b1fc3d6bc618a399] [ERROR] greengrass/features/cloudComponent.feature - Failed at step: 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
java.lang.IllegalStateException: Deployment idt-c057b1fc3d6bc618a399-gg-deployment did not reach COMPLETED
        at com.aws.greengrass.testing.features.DeploymentSteps.deploymentSucceeds(DeploymentSteps.java:311) ~[AWSGreengrassV2TestingIDT-1.0.jar:?]
        at ✽.the Greengrass deployment is COMPLETED on the device after 180 seconds(classpath:greengrass/features/cloudComponent.feature:26) ~[?:?]

同时日志中出现systemd相关错误,但MQTT测试虽有相同错误却能通过:

2023-03-28T05:33:39.019Z [ERROR] (Copier) com.aws.greengrass.util.orchestration.SystemdUtils: systemd-setup. {stderr=Created symlink /etc/systemd/system/multi-user.target.wants/greengrass.service → /etc/systemd/system/greengrass.service., command=systemctl enable greengrass.service}

操作步骤

  1. 按官方文档配置Greengrass V2,执行启动命令:
sudo -E java -Droot="/test/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassInstaller/lib/Greengrass.jar --aws-region us-west-2 --thing-name IM30 --thing-group-name GreengrassQuickStartGroup_test --component-default-user root:root --provision true --setup-system-service true --deploy-dev-tools true

执行后显示“Successfully set up Nucleus as a system service”,且systemctl status greengrass.service显示服务正常运行。

  1. 执行IDT测试命令:
./devicetester_linux_x86-64 run-suite --suite-id GGV2Q_2.5.0 --userdate userdata.json

测试结果仅component组的cloudcomponent测试失败,其余6项测试通过。

环境信息

  • Greengrass设备OS:Yocto Linux aarch64
  • IDT设备OS:Ubuntu 22.04.1 LTS
  • JDK版本:openjdk 1.8.0_282(也测试过amazon-corretto-17.0.6.10.1-linux-aarch64)
  • Nucleus版本:2.9.4
  • IDT版本:4.7.0

补充信息

曾注意到有类似问题案例,但自认为effectiveConfig.yaml配置正确,现附上配置内容供参考:

---
system:
  certificateFilePath: "/test/greengrass/v2/thingCert.crt"
  privateKeyPath: "/test/greengrass/v2/privKey.key"
  rootCaPath: "/test/greengrass/v2/rootCA.pem"
  rootpath: "/test/greengrass/v2"
  thingName: "IM30"
services:
  aws.greengrass.LocalHelloWorld:
    componentType: "GENERIC"
    configuration: {}
    dependencies: []
    lifecycle:
      Run: "java -DcomponentName=\"HelloWorld\" -jar /test/greengrass/v2/packages/artifacts/aws.greengrass.LocalHelloWorld/1.0.0/cloudcomponent.jar"
    version: "1.0.0"
  aws.greengrass.Nucleus:
    componentType: "NUCLEUS"
    configuration:
      awsRegion: "us-west-2"
      componentStoreMaxSizeBytes: "10000000000"
      deploymentPollingFrequencySeconds: "15"
      envStage: "prod"
      fleetStatus:
        periodicStatusPublishIntervalSeconds: 86400
      greengrassDataPlaneEndpoint: ""
      greengrassDataPlanePort: "8443"
      httpClient: {}
      interpolateComponentConfiguration: false
      iotCredEndpoint: "xxx.credentials.iot.us-west-2.amazonaws.com"
      iotDataEndpoint: "xxx-ats.iot.us-west-2.amazonaws.com"
      iotRoleAlias: "GreengrassV2TokenExchangeRoleAlias"
      jvmOptions: "-Dlog.store=FILE"
      logging: {}
      mqtt:
        spooler: {}
      networkProxy:
        proxy: {}
      platformOverride: {}
      runWithDefault:
        posixShell: "sh"
        posixUser: "root:root"
      telemetry: {}
    dependencies: []
    lifecycle:
      bootstrap:
        requiresPrivilege: "true"
        script: "\nset -eu\nKERNEL_ROOT=\"/test/greengrass/v2\"\nUNPACK_DIR=\"/test/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.9.4/aws.greengrass.nucleus\"\
          \nrm -r \"$KERNEL_ROOT\"/alts/current/*\necho \"-Dlog.store=FILE\" > \"
          $KERNEL_ROOT/alts/current/launch.params\"\nln -sf \"$UNPACK_DIR\" \"$KERNEL_ROOT/alts/current/distro\"\
          \nexit 100"
    version: "2.9.4"
  DeploymentService:
    ComponentToGroups:
      aws.greengrass.LocalHelloWorld:
        "4e69ead5-a595-4b96-a7c8-45da74475fe0": "LOCAL_DEPLOYMENT"
    dependencies: []
    GroupToLastDeployment:
      LOCAL_DEPLOYMENT:
        configArn: null
        timestamp: 1679992938275
      thing/IM30:
        configArn: "arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:111"
        timestamp: 1679993636499
      thinggroup/GreengrassQuickStartGroup_test:
        configArn: "arn:aws:greengrass:us-west-2:116407744508:configuration:thinggroup/GreengrassQuickStartGroup_test:51"
        timestamp: 1679993661994
    GroupToRootComponents:
      LOCAL_DEPLOYMENT:
        aws.greengrass.LocalHelloWorld:
          groupConfigArn: "4e69ead5-a595-4b96-a7c8-45da74475fe0"
          groupConfigName: "LOCAL_DEPLOYMENT"
          version: "1.0.0"
      thing/IM30: {}
      thinggroup/GreengrassQuickStartGroup_test: {}
    runtime:
      ProcessedDeployments:
        "1679993661353":
          ConfigurationArn: "arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:111"
          DeploymentId: "arn:aws:greengrass:us-west-2:116407744508:configuration:thing/IM30:111"
          DeploymentRootPackages: []
          DeploymentStatus: "SUCCEEDED"
          DeploymentStatusDetails:
            detailed-deployment-status: "SUCCESSFUL"
          DeploymentType: "SHADOW"
          GreengrassDeploymentId: "ef974963-4dfe-49a4-a1fc-73c8aa49a545"
    version: "0.0.0"
  FleetStatusService:
    dependencies: []
    lastPeriodicUpdateTime: 1679981624527
    sequenceNumber: 122
    version: "0.0.0"
  main:
    dependencies:
    - "FleetStatusService:HARD"
    - "DeploymentService:HARD"
    - "aws.greengrass.LocalHelloWorld"
    - "TelemetryAgent:HARD"
    - "aws.greengrass.Nucleus"
    - "UpdateSystemPolicyService:HARD"
    - "aws.greengrass.Nucleus"
    lifecycle: {}
    runtime:
      service-digest: {}
  TelemetryAgent:
    dependencies: []
    runtime:
      lastPeriodicAggregationMetricsTime: 1679981624784
      lastPeriodicPublishMetricsTime: 1679981624784
    version: "0.0.0"
  UpdateSystemPolicyService:
    dependencies: []
    version: "0.0.0"

希望能帮忙排查cloudcomponent测试失败的原因。

内容的提问来源于stack exchange,提问作者jason yu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.26 06:12:05