Skip to content

Greengrass test fail

0

Hi AWS team,

I am currently running the Greengrass qualification test but have been consistently unable to pass it. My host environment is Linux, and the DUT is running on Windows. The test cases related to component and MQTT repeatedly fail.

========== Test Summary ==========
Execution Time:         12m34s
Tests Completed:        5
Tests Passed:           3
Tests Failed:           2
Tests Skipped:          0
----------------------------------
Test Groups:
    component:                  FAILED
    mqtt:                       FAILED
    pretestvalidation:          PASSED
    coredependencies:           PASSED
    version:                    PASSED
----------------------------------
Failed Tests:
    Group Name: component
        Test Name: cloudcomponent
            Reason: Failed at 'the Greengrass deployment is COMPLETED on the device after 180 seconds'
    Group Name: mqtt
        Test Name: mqttpubsub
            Reason: Failed at 'the Greengrass deployment is COMPLETED on the device after 300 seconds'
----------------------------------
Path to AWS IoT Device Tester Report: /home/jan/devicetester_greengrass_v2_linux/results/20241112T164912/awsiotdevicetester_report.xml
Path to Test Execution Logs: /home/jan/devicetester_greengrass_v2_linux/results/20241112T164912/logs
Path to Aggregated JUnit Report: /home/jan/devicetester_greengrass_v2_linux/results/20241112T164912/GGV2Q_Report.xml
==================================

It always show "Cannot run program "cmd" (in directory "C:\greengrass\v2\work\aws.greengrass.IotMqttSubscriber"): [LogonUser] The user name or password is incorrect." in aws.greengrass.IotMqttSubscriber.log

2024-11-12T08:06:01.733Z [INFO] (pool-2-thread-22) aws.greengrass.IotMqttSubscriber: shell-runner-start. {scriptName=services.aws.greengrass.IotMqttSubscriber.lifecycle.Run, serviceName=aws.greengrass.IotMqttSubscriber, currentState=STARTING, command=["java -Dipc.operation=\u0022mqttPubsub\u0022 -DcomponentName=\u0022IotMqttSubscriber\u0022 -jar  C:..."]}
2024-11-12T08:06:01.764Z [ERROR] (pool-2-thread-22) aws.greengrass.IotMqttSubscriber: shell-runner-error. Error while running process. {scriptName=services.aws.greengrass.IotMqttSubscriber.lifecycle.Run, serviceName=aws.greengrass.IotMqttSubscriber, currentState=STARTING, command=["java -Dipc.operation=\u0022mqttPubsub\u0022 -DcomponentName=\u0022IotMqttSubscriber\u0022 -jar  C:..."]}
java.io.IOException: Cannot run program "cmd" (in directory "C:\greengrass\v2\work\aws.greengrass.IotMqttSubscriber"): [LogonUser] The user name or password is incorrect.

Also the same error in com.aws.HelloWorld.log.

2024-11-12T08:08:59.919Z [INFO] (pool-2-thread-30) com.aws.HelloWorld: shell-runner-start. {scriptName=services.com.aws.HelloWorld.lifecycle.Run, serviceName=com.aws.HelloWorld, currentState=STARTING, command=["java -DcomponentName=\u0022HelloWorld\u0022 -jar C:\greengrass\v2\packages\artifacts-una..."]}
2024-11-12T08:08:59.919Z [ERROR] (pool-2-thread-30) com.aws.HelloWorld: shell-runner-error. Error while running process. {scriptName=services.com.aws.HelloWorld.lifecycle.Run, serviceName=com.aws.HelloWorld, currentState=STARTING, command=["java -DcomponentName=\u0022HelloWorld\u0022 -jar C:\greengrass\v2\packages\artifacts-una..."]}
java.io.IOException: Cannot run program "cmd" (in directory "C:\greengrass\v2\work\com.aws.HelloWorld"): [LogonUser] The user name or password is incorrect.

I run greengrass the --component-default-user ggc_user

java "-Droot=C:\greengrass\v2" "-Dlog.store=FILE" -jar .\GreengrassInstaller\lib\Greengrass.jar --aws-region ap-northeast-1 --thing-name GreengrassQuickStartCore-192fb3e6d8b --thing-group-name GreengrassQuickStartGroup --component-default-user ggc_user --provision true --setup-system-service true --deploy-dev-tools true

It seems that the ggc_user already has the necessary permissions, but you're still facing issues with the test.

C:\Windows\system32>net user ggc_user
User name                    ggc_user
Full Name
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

Password last set            2024/11/12 下午 04:44:26
Password expires             Never
Password changeable          2024/11/12 下午 04:44:26
Password required            Yes
User may change password     Yes

Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   2024/11/12 下午 04:46:07

Logon hours allowed          All

Local Group Memberships      *Administrators       *Users
Global Group memberships     *None
The command completed successfully.
  • Which version of IDT or the test suite is this?

asked 2 years ago242 views

2 Answers
1

Based on the information provided, it appears you're encountering issues with the AWS IoT Greengrass qualification tests, specifically with the component and MQTT test groups. The errors suggest there might be problems with user permissions or authentication on your Windows device under test (DUT).

Here are some steps you can try to resolve the issue:

  1. Verify file permissions: Ensure that the ggc_user has full access to the Greengrass installation directory and all its subdirectories. You may need to explicitly grant read, write, and execute permissions to the ggc_user for the C:\greengrass directory and its contents.

  2. Check user account settings: Although the ggc_user is part of the Administrators group, there might be some Group Policy or security settings preventing it from running certain commands. Try temporarily adding the user to the "Power Users" group to see if it resolves the issue.

  3. Run Greengrass as a specific user: Instead of using --component-default-user, try running the Greengrass process as the ggc_user explicitly. You can do this by using the "runas" command or by configuring the Greengrass service to run as ggc_user.

  4. Verify Java installation: Ensure that Java is correctly installed and accessible to the ggc_user. Check if the JAVA_HOME environment variable is set correctly for the ggc_user.

  5. Check for antivirus interference: Temporarily disable any antivirus software to see if it's interfering with the Greengrass processes.

  6. Review Greengrass logs: Check the Greengrass system logs (usually located in C:\greengrass\v2\logs) for any additional error messages that might provide more context.

  7. Ensure correct configuration: Double-check your device configuration in the userdata.json file used by the Device Tester. Make sure all paths and settings are correct for your Windows environment.

  8. Run dependency checks: Before running the full test suite, try running the dependency checker test group (coredependencies) to ensure all necessary dependencies are correctly installed and configured.

If these steps don't resolve the issue, you may need to review the full Device Tester logs to identify any other potential problems. Consider also checking for any known issues or updates for the version of AWS IoT Device Tester and AWS IoT Greengrass you're using.
Sources
Troubleshooting IDT for AWS IoT Greengrass V2 - AWS IoT Greengrass
Use IDT to run the AWS IoT Greengrass qualification suite - AWS IoT Greengrass
Run the AWS IoT Greengrass qualification suite - AWS IoT Greengrass

answered 2 years ago

EXPERT

reviewed 2 years ago

1

Did you set up the user on the device, including setting the user and password in windows credential manager first? The setup instructions before running tests are at https://docs.aws.amazon.com/greengrass/v2/developerguide/device-config-setup.html#configure-windows-user-for-idt

e.g. Replace password below with the user's password that you set, and run

psexec -s cmd /c cmdkey /generic:ggc_user /user:ggc_user /pass:password

See also https://docs.aws.amazon.com/greengrass/v2/developerguide/troubleshooting.html#windows-account-password-expired

AWS

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.