By using AWS re:Post, you agree to the Terms of Use

Questions tagged with AWS IoT Core

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Seems my core device is not receiving shadow update

On my core I have ShadowManager and a custom component. I am trying to get the latest shadow `test` in my custom component. My python code **does ** retrieve a shadow, it's just outdated. I have admittedly been struggling with learning Greengrass and permissions. Hopefully one of you experts can help as I've been looking at this a day and a half now. These configurations are all copied from Local Debug Console so I am assuming that they are what is actually being used. My shadowManager configuration ``` --- componentType: "PLUGIN" configuration: rateLimits: {} shadowDocumentSizeLimitBytes: 8192 strategy: type: "realTime" synchronize: coreThing: classic: true direction: "betweenDeviceAndCloud" namedShadows: - "test" dependencies: - "aws.greengrass.Nucleus:SOFT" lifecycle: {} version: "2.2.1" ``` My component configuration: ``` --- componentType: "GENERIC" configuration: accessControl: aws.greengrass.ipc.mqttproxy: com.xxxxxxxx.productivity.cycle_count:mqttproxy:1: operations: - "aws.greengrass#PublishToIoTCore" policyDescription: "" resources: - "*" aws.greengrass.ipc.pubsub: com.xxxxxxxx.productivity.cycle_count:pubsub:1: operations: - "aws.greengrass#SubscribeToTopic" - "aws.greengrass#PublishToTopic" policyDescription: "" resources: - "*" aws.greengrass.ShadowManager: com.xxxxxxxx.productivity.cycle_count:shadow:1: operations: - "aws.greengrass#GetThingShadow" - "aws.greengrass#UpdateThingShadow" - "aws.greengrass#DeleteThingShadow" - "aws.greengrass#ListNamedShadowsForThing" policyDescription: "" resources: - "$aws/things/*" - "*" dependencies: [] lifecycle: Run: "python3 -u /greengrass/v2/packages/artifacts/com.xxxxxxxx.productivity.cycle_count/1.0.138/cycle_count.py" previousVersion: "1.0.137" version: "1.0.138" ``` The policy attached to the cert looks like this: ``` Policy effect Policy action Policy resource Allow * * Allow iot:DeleteThingShadow * Allow iot:GetThingShadow * Allow iot:UpdateThingShadow * Allow iot:Connect * Allow iot:Publish * Allow iot:Receive * Allow iot:Subscribe * Allow iot:ListNamedShadowsForThing * ``` If I change my python code to get a named shadow that doesn't exist I do get a shadow doesn't exist error message. Any thoughts as to why updating a shadow does not sync with my thing?
0
answers
0
votes
7
views
asked 14 hours ago

Debug AWS_IO_FILE_VALIDATION_FAILURE while trying to connect to aws IoT whith custom client certificate

I failed to run the sample code for [basic_connect](https://github.com/aws/aws-iot-device-sdk-cpp-v2/tree/main/samples/mqtt/basic_connect). While running it with the following argument: `basic_connect.exe --client_id "ME" --endpoint "*-ats.iot.eu-west-1.amazonaws.com" --cert "<>/MyCertificate.crt" --key "<>/MyPrivate.key" --verbosity "Debug"` i receive the following output: ``` [DEBUG] [2022-09-29T13:02:54Z] [00001648] [mqtt-client] - client=*: Initalizing MQTT client [DEBUG] [2022-09-29T13:02:56Z] [00001648] [tls-handler] - static: This library was built with Windows 8.1 or later, probing OS to see what we're actually running on. [DEBUG] [2022-09-29T13:02:56Z] [00001648] [tls-handler] - static: We're running on Windows 8.1 or later. ALPN is available. [DEBUG] [2022-09-29T13:02:56Z] [00001648] [tls-handler] - static: This library was built with Windows 8.1 or later, probing OS to see what we're actually running on. [DEBUG] [2022-09-29T13:02:56Z] [00001648] [tls-handler] - static: We're running on Windows 8.1 or later. ALPN is available. [DEBUG] [2022-09-29T13:02:56Z] [00001648] [tls-handler] - static: certificate and key have been set, setting them up now. [INFO] [2022-09-29T13:02:56Z] [00001648] [pki-utils] - static: loading certificate chain with 1 certificates. [ERROR] [2022-09-29T13:03:04Z] [00001648] [pki-utils] - static: no acceptable private key found, error AWS_IO_FILE_VALIDATION_FAILURE [ERROR] [2022-09-29T13:03:04Z] [00001648] [tls-handler] - static: failed to import certificate and private key with error 1038. Client Configuration initialization failed with error aws-c-io: AWS_IO_FILE_VALIDATION_FAILURE, A file was read and the input did not match the expected value ``` I have been trying to follow this AWS_IO_FILE_VALIDATION_FAILURE, and i endup with the following callstack: ``` basic-connect.exe!aws_import_key_pair_to_cert_context(aws_allocator * alloc, const aws_byte_cursor * public_cert_chain, const aws_byte_cursor * private_key, bool is_client_mode, void * * store, const _CERT_CONTEXT * * certs, unsigned __int64 * crypto_provider, unsigned __int64 * private_key_handle) Line 691 C basic-connect.exe!s_ctx_new(aws_allocator * alloc, const aws_tls_ctx_options * options, bool is_client_mode) Line 2010 C basic-connect.exe!aws_tls_client_ctx_new(aws_allocator * alloc, const aws_tls_ctx_options * options) Line 2044 C basic-connect.exe!Aws::Crt::Io::TlsContext::TlsContext(Aws::Crt::Io::TlsContextOptions & options, Aws::Crt::Io::TlsMode mode, aws_allocator * allocator) Line 423 C++ basic-connect.exe!Aws::Iot::MqttClientConnectionConfigBuilder::Build() Line 493 C++ basic-connect.exe!Utils::CommandLineUtils::GetClientConnectionForMQTTConnection(Aws::Iot::MqttClient * client, Aws::Iot::MqttClientConnectionConfigBuilder * clientConfigBuilder) Line 542 C++ basic-connect.exe!Utils::CommandLineUtils::BuildDirectMQTTConnection(Aws::Iot::MqttClient * client) Line 459 C++ basic-connect.exe!main(int argc, char * * argv) Line 41 C++ [External Code] ``` None of the call to `CryptDecodeObjectEx` will succeed in the function `aws_import_key_pair_to_cert_context`. It sounds like there is a problem with my private key which i generated as follow: `openssl req -newkey rsa:4096 -sha256 -nodes -keyout MyPrivate.key -out MyRequest.csr -config MyConfig.cnf` I am not sure to understand what this function is meant to do and what is wrong with my key. I am using win10 with msbuild (tryied in python as well).
2
answers
0
votes
19
views
asked 20 hours ago

[Greengrass][IDT][Raspi] Deployment did not reach COMPLETED

Hello, I'm trying to run the IDT test suite on my Raspi 4B with the Raspi OS and a Greengass Core Software v2.7.0 running on it. I launch the tests from a Windows PC with a IDT v4.5.8, connected with Putty through SSH. My Greengrass Core Software is PREINSTALLED. I also run the test HSM with PKCS11 provider, as I generated key and certificate with the TPM connected to my Raspi. I do not manage to pass the tests that involve deployments: I always get Deployment did not reach COMPLETED even for the Empty Deployment used for cleaning up. Here is an example for a part of the suite that tests a local deployment. [Logs from test_manager.log] ``` time="2022-09-27T12:57:37+02:00" level=info msg=12:57:37.231 [localdeployment] [idt-bf5893219b34898de77c] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created GreengrassDeployment in GreengrassV2Lifecycle time="2022-09-27T12:57:37+02:00" level=info msg=12:57:37.233 [localdeployment] [idt-bf5893219b34898de77c] [INFO] com.aws.greengrass.testing.features.DeploymentSteps - Created Greengrass deployment: 3c3703c6-feb1-404a-86fe-317282a02b15 time="2022-09-27T12:57:37+02:00" level=info msg=12:57:37.233 [localdeployment] [idt-bf5893219b34898de77c] [INFO] greengrass/features/localdeployment.feature - line 12: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' time="2022-09-27T13:00:37+02:00" level=info msg=13:00:37.455 [localdeployment] [idt-bf5893219b34898de77c] [ERROR] greengrass/features/localdeployment.feature - Failed at step: 'the Greengrass deployment is COMPLETED on the device after 180 seconds' time="2022-09-27T13:00:37+02:00" level=info msg=java.lang.IllegalStateException: Deployment idt-bf5893219b34898de77c-gg-deployment did not reach COMPLETED time="2022-09-27T13:00:37+02:00" level=info msg= at com.aws.greengrass.testing.features.DeploymentSteps.deploymentSucceeds(DeploymentSteps.java:272) time="2022-09-27T13:00:37+02:00" level=info msg= at ?.the Greengrass deployment is COMPLETED on the device after 180 seconds(classpath:greengrass/features/localdeployment.feature:12)13:00:37.463 [localdeployment] [idt-bf5893219b34898de77c] [INFO] greengrass/features/localdeployment.feature - line 13: 'I verify greengrass-cli is available in greengrass root' time="2022-09-27T13:00:37+02:00" level=info msg=13:00:37.463 [localdeployment] [idt-bf5893219b34898de77c] [INFO] greengrass/features/localdeployment.feature - line 14: 'I create a local deployment with components' time="2022-09-27T13:00:37+02:00" level=info msg=13:00:37.463 [localdeployment] [idt-bf5893219b34898de77c] [INFO] greengrass/features/localdeployment.feature - line 16: 'the local Greengrass deployment is SUCCEEDED on the device after 120 seconds' time="2022-09-27T13:00:37+02:00" level=info msg=13:00:37.464 [localdeployment] [idt-bf5893219b34898de77c] [INFO] greengrass/features/localdeployment.feature - line 17: 'the aws.greengrass.LocalHelloWorld log on the device contains the line "Hello World!!" within 20 seconds' time="2022-09-27T13:00:37+02:00" level=info msg=13:00:37.959 [localdeployment] [idt-bf5893219b34898de77c] [INFO] com.aws.greengrass.testing.features.DeploymentSteps - Cleaning up component through an empty deployment time="2022-09-27T13:00:38+02:00" level=info msg=13:00:38.394 [localdeployment] [idt-bf5893219b34898de77c] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created GreengrassDeployment in GreengrassV2Lifecycle time="2022-09-27T13:01:12+02:00" level=info msg=13:01:12.903 [localdeployment] [idt-bf5893219b34898de77c] [INFO] com.aws.greengrass.testing.features.DeploymentSteps - Cleaning up component through an empty deployment time="2022-09-27T13:01:13+02:00" level=info msg=13:01:13.269 [localdeployment] [idt-bf5893219b34898de77c] [INFO] com.aws.greengrass.testing.resources.AbstractAWSResourceLifecycle - Created GreengrassDeployment in GreengrassV2Lifecycle time="2022-09-27T13:02:13+02:00" level=info msg=13:02:13.456 [localdeployment] [idt-bf5893219b34898de77c] [WARN] com.aws.greengrass.testing.features.DeploymentSteps - Empty deployment did not reach COMPLETED ``` [Logs from greengrass.log (file from the core device tested)] ``` 2022-09-27T10:57:44.221Z [INFO] (Thread-3) com.aws.greengrass.deployment.ShadowDeploymentListener: Added shadow deployment job. {ID=arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:17} 2022-09-27T10:57:56.652Z [INFO] (pool-2-thread-12) com.aws.greengrass.deployment.DeploymentService: Received deployment in the queue. {deploymentId=arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:17, DeploymentType=SHADOW, serviceName=DeploymentService, currentState=RUNNING} 2022-09-27T10:57:56.653Z [INFO] (pool-2-thread-12) com.aws.greengrass.deployment.DeploymentService: Received deployment document in queue. {document={"deploymentId":"3c3703c6-feb1-404a-86fe-317282a02b15","schemaDate":"2021-05-17","deploymentName":"idt-bf5893219b34898de77c-gg-deployment","configurationArn":"arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:17","creationTimestamp":1664276257193,"components":{"aws.greengrass.Cli":{"version":"2.7.0"},"aws.greengrass.Nucleus":{"version":"2.7.0"}},"failureHandlingPolicy":"ROLLBACK","requiredCapabilities":[],"componentUpdatePolicy":{"timeout":60,"action":"NOTIFY_COMPONENTS"},"configurationValidationPolicy":{"timeout":60}}, serviceName=DeploymentService, currentState=RUNNING} ``` [...] ``` 2022-09-27T10:58:07.731Z [INFO] (pool-2-thread-5) com.aws.greengrass.componentmanager.ComponentManager: prepare-package-start. {packageIdentifier=aws.greengrass.Cli-v2.7.0} 2022-09-27T10:58:07.732Z [DEBUG] (pool-2-thread-5) com.aws.greengrass.componentmanager.ComponentStore: finding-package-recipe. {packageRecipePath=/greengrass/v2/packages/recipes/rQVjcR-rX_XGFHg0WYKAnptIez3HKwtctL_2BKKZegM@2.7.0.recipe.yaml} 2022-09-27T10:58:07.778Z [DEBUG] (pool-2-thread-5) com.aws.greengrass.componentmanager.ComponentManager: downloading-package-artifacts. {packageIdentifier=aws.greengrass.Cli-v2.7.0} 2022-09-27T10:58:07.817Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain: Creating an interceptor chain that will apply interceptors in the following order: [software.amazon.awssdk.core.internal.interceptor.HttpChecksumRequiredInterceptor@14e72a8, software.amazon.awssdk.awscore.interceptor.HelpfulUnknownHostExceptionInterceptor@5198ce, software.amazon.awssdk.awscore.eventstream.EventStreamInitialRequestInterceptor@1f24246]. {} 2022-09-27T10:58:07.819Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.request: Sending Request: DefaultSdkHttpFullRequest(httpMethod=GET, protocol=https, host=greengrass-ats.iot.eu-west-2.amazonaws.com, port=8443, encodedPath=/greengrass/v2/components/arn%3Aaws%3Agreengrass%3Aeu-west-2%3Aaws%3Acomponents%3Aaws.greengrass.Cli%3Aversions%3A2.7.0/artifacts/JdZfpOZVO9z8GzOhHm01lU3WQaCWO2RkfzJ_k2LT51I%3D/aws.greengrass.cli.client.zip, headers=[amz-sdk-invocation-id, User-Agent], queryParameters=[]). {} 2022-09-27T10:58:07.823Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: Connecting to greengrass-ats.iot.eu-west-2.amazonaws.com/18.133.211.72:8443. {} 2022-09-27T10:58:07.873Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: socket.getSupportedProtocols(): [TLSv1.3, TLSv1.2, TLSv1.1, TLSv1, SSLv3, SSLv2Hello], socket.getEnabledProtocols(): [TLSv1.3, TLSv1.2]. {} 2022-09-27T10:58:07.873Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: TLS protocol enabled for SSL handshake: [TLSv1.2, TLSv1.1, TLSv1, TLSv1.3]. {} 2022-09-27T10:58:09.355Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.net.SdkSslSocket: created: greengrass-ats.iot.eu-west-2.amazonaws.com/18.133.211.72:8443. {} 2022-09-27T10:58:09.573Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.request: Received successful response: 200. {} 2022-09-27T10:58:09.574Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.requestId: x-amzn-RequestId : 622cc548-944a-e387-164c-e6c9889efe42. {} 2022-09-27T10:58:09.575Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.requestId: x-amz-id-2 : not available. {} 2022-09-27T10:58:10.033Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: Connecting to evergreencomponentmanageme-artifactbucket7410c9ef-1t7hs9n3e7a5l.s3.eu-west-2.amazonaws.com/52.95.148.90:443. {} 2022-09-27T10:58:10.156Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: socket.getSupportedProtocols(): [TLSv1.3, TLSv1.2, TLSv1.1, TLSv1, SSLv3, SSLv2Hello], socket.getEnabledProtocols(): [TLSv1.3, TLSv1.2]. {} 2022-09-27T10:58:10.156Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: TLS protocol enabled for SSL handshake: [TLSv1.2, TLSv1.1, TLSv1, TLSv1.3]. {} 2022-09-27T10:58:10.685Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.net.SdkSslSocket: created: evergreencomponentmanageme-artifactbucket7410c9ef-1t7hs9n3e7a5l.s3.eu-west-2.amazonaws.com/52.95.148.90:443. {} 2022-09-27T10:58:10.903Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.net.SdkSslSocket: closing evergreencomponentmanageme-artifactbucket7410c9ef-1t7hs9n3e7a5l.s3.eu-west-2.amazonaws.com/52.95.148.90:443. {} 2022-09-27T10:58:10.932Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.core.interceptor.ExecutionInterceptorChain: Creating an interceptor chain that will apply interceptors in the following order: [software.amazon.awssdk.core.internal.interceptor.HttpChecksumRequiredInterceptor@14e72a8, software.amazon.awssdk.awscore.interceptor.HelpfulUnknownHostExceptionInterceptor@5198ce, software.amazon.awssdk.awscore.eventstream.EventStreamInitialRequestInterceptor@1f24246]. {} 2022-09-27T10:58:10.934Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.request: Sending Request: DefaultSdkHttpFullRequest(httpMethod=GET, protocol=https, host=greengrass-ats.iot.eu-west-2.amazonaws.com, port=8443, encodedPath=/greengrass/v2/components/arn%3Aaws%3Agreengrass%3Aeu-west-2%3Aaws%3Acomponents%3Aaws.greengrass.Cli%3Aversions%3A2.7.0/artifacts/JdZfpOZVO9z8GzOhHm01lU3WQaCWO2RkfzJ_k2LT51I%3D/aws.greengrass.cli.client.zip, headers=[amz-sdk-invocation-id, User-Agent], queryParameters=[]). {} 2022-09-27T10:58:10.937Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: Connecting to greengrass-ats.iot.eu-west-2.amazonaws.com/18.133.211.72:8443. {} 2022-09-27T10:58:11.880Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: socket.getSupportedProtocols(): [TLSv1.3, TLSv1.2, TLSv1.1, TLSv1, SSLv3, SSLv2Hello], socket.getEnabledProtocols(): [TLSv1.3, TLSv1.2]. {} 2022-09-27T10:58:11.881Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: TLS protocol enabled for SSL handshake: [TLSv1.2, TLSv1.1, TLSv1, TLSv1.3]. {} 2022-09-27T10:58:13.389Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.net.SdkSslSocket: created: greengrass-ats.iot.eu-west-2.amazonaws.com/18.133.211.72:8443. {} 2022-09-27T10:58:13.626Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.request: Received successful response: 200. {} 2022-09-27T10:58:13.627Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.requestId: x-amzn-RequestId : 49c34118-9025-6ef7-4def-489354e1c4e3. {} 2022-09-27T10:58:13.628Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.requestId: x-amz-id-2 : not available. {} 2022-09-27T10:58:13.706Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: Connecting to evergreencomponentmanageme-artifactbucket7410c9ef-1t7hs9n3e7a5l.s3.eu-west-2.amazonaws.com/52.95.148.90:443. {} 2022-09-27T10:58:13.785Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: socket.getSupportedProtocols(): [TLSv1.3, TLSv1.2, TLSv1.1, TLSv1, SSLv3, SSLv2Hello], socket.getEnabledProtocols(): [TLSv1.3, TLSv1.2]. {} 2022-09-27T10:58:13.786Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.conn.SdkTlsSocketFactory: TLS protocol enabled for SSL handshake: [TLSv1.2, TLSv1.1, TLSv1, TLSv1.3]. {} 2022-09-27T10:58:14.292Z [DEBUG] (pool-2-thread-5) software.amazon.awssdk.http.apache.internal.net.SdkSslSocket: created: evergreencomponentmanageme-artifactbucket7410c9ef-1t7hs9n3e7a5l.s3.eu-west-2.amazonaws.com/52.95.148.90:443. {} 2022-09-27T10:59:57.647Z [DEBUG] (idle-connection-reaper) software.amazon.awssdk.http.apache.internal.net.SdkSslSocket: shutting down output of greengrass-ats.iot.eu-west-2.amazonaws.com/18.133.211.72:8443. {} ``` [...] ``` 2022-09-27T11:00:38.493Z [INFO] (Thread-3) com.aws.greengrass.deployment.ShadowDeploymentListener: Added shadow deployment job. {ID=arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:18} 2022-09-27T11:00:42.020Z [INFO] (pool-2-thread-12) com.aws.greengrass.deployment.DeploymentService: Canceling current device deployment. {DeploymentId=arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:17, serviceName=DeploymentService, currentState=RUNNING} 2022-09-27T11:00:42.022Z [DEBUG] (pool-2-thread-12) com.aws.greengrass.deployment.DeploymentStatusKeeper: Storing deployment status. {DeploymentId=arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:17, DeploymentStatus=CANCELED} 2022-09-27T11:00:42.023Z [INFO] (pool-2-thread-4) com.aws.greengrass.deployment.DeploymentService: deployment-task-execution. Cancelled package download due to received interrupt. {deploymentId=3c3703c6-feb1-404a-86fe-317282a02b15, serviceName=DeploymentService, currentState=RUNNING} 2022-09-27T11:00:42.138Z [INFO] (pool-2-thread-12) com.aws.greengrass.deployment.DeploymentStatusKeeper: Stored deployment status. {DeploymentId=arn:aws:greengrass:eu-west-2:548876126010:configuration:thing/MyGreengrassCoreV2:17, DeploymentStatus=CANCELED} ``` I'm not sure which part of the logs is relevant, don't hesitate to ask for more logs. The thing is that **I see no error from the tested device point of view**, the deployment is launched, but after some time the device exits from whatever was going on (see end of part 2/3 of greengrass.log above) and almost a minute later a cancel command is given by the tester that considers that the deployment is not completed in time. I'm completely new to AWS so I may have missed something obvious, I'll take any insight on my issues. PS : the time in the logs from the tested device is 2h late (an explanation of the errors?) even though the time of my Raspi (given by the "date" command) is the right one...
0
answers
0
votes
40
views
asked 3 days ago

How to avoid truncating log lines in greengrass component logs

I'm having a problem with starting SystemManagerAgent after a full system OTA upgrade. I can see in the logs that it attempts to run a command when the component starts up - and that it fails, but I can't see the full command that it attempted to run as it appears that the log line is truncated (Ending in SystemsManage...") How can I view the complete log line to debug this issue ? for example: *2022-09-20T08:24:19.663Z [INFO] (Copier) aws.greengrass.SystemsManagerAgent: stdout. INFO Starting agent installation. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Script, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW} 2022-09-20T08:24:20.345Z [INFO] (Copier) aws.greengrass.SystemsManagerAgent: stdout. ERROR Failed to install agent: snap install: Failed to install snap with output '' and error: exit status 10. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Sc ript, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW} 2022-09-20T08:24:20.349Z [WARN] (pool-2-thread-20) aws.greengrass.SystemsManagerAgent: shell-runner-error. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Script, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW, command=["/data/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.SystemsManage..."]} 2022-09-20T08:24:20.358Z [INFO] (pool-2-thread-20) aws.greengrass.SystemsManagerAgent: shell-runner-start. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Script, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW, command=["/data/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.SystemsManage..."]}*
2
answers
0
votes
22
views
asked 3 days ago