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

Unanswered Questions tagged with AWS IoT Core

Sort by most recent
  • 1
  • 2
  • 12 / page

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? **EDIT** What shadow are you updating in the cloud, and what specifically are you updating? I am editing the shadow called `test`. I have tried others as well. How are you checking the shadow on the device? Are you sending multiple requests to getThingShadow, or are you subscribed to shadow changes? I am retrieving the shadow when a switch is triggered on the RaspberryPi. The code is: ``` def sample_get_thing_shadow_request(thingName, shadowName): try: # set up IPC client to connect to the IPC server shadow_ipc_client = awsiot.greengrasscoreipc.connect() # create the GetThingShadow request get_thing_shadow_request = GetThingShadowRequest() get_thing_shadow_request.thing_name = thingName get_thing_shadow_request.shadow_name = shadowName # retrieve the GetThingShadow response after sending the request to the IPC server op = shadow_ipc_client.new_get_thing_shadow() op.activate(get_thing_shadow_request) fut = op.get_response() result = fut.result(5) ret = json.loads(result.payload) print(ret) return result.payload except BaseException as err: print(f"Shadow retrieval exception: {err=}, {type(err)=}") return result.payload ``` Before I try this I edit the shadow and put a different value in for ["state"]["desired"]["topic"]. The edit is accepted in the web console. I always get a value from about two days ago when my code runs though. I do not see any log entries from shadowManager unless I ask for a shadow other then `test`. I did try creating a new shadow and adding the permission using Local Debug Console. When I request that new shadow I get: > 2022-09-29T21:58:51.884Z [INFO] (Copier) com.xxxxxxxx.productivity.cycle_count: stdout. Shadow retrieval exception: err=ResourceNotFoundError(message='No shadow found', resource_type='shadow'), type(err)=<class 'awsiot.greengrasscoreipc.model.ResourceNotFoundError'>. {scriptName=services.com.xxxxxxxx.productivity.cycle_count.lifecycle.Run, serviceName=com.xxxxxxxx.productivity.cycle_count, currentState=RUNNING} It seems from my noobie end that the shadows are getting updated but the updates are not making it to the core thing.
0
answers
0
votes
14
views
asked 2 days 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
45
views
asked 4 days ago

Greengrass v2: Operating in a Ubuntu Snap

I feel like I'm so close to this working, but I have one hurdle I can't quite overcome. I'm developing a Ubuntu Snap which contains all the runtime components we require for our greengrass deployments (node, python, java, etc.). After install, the entrypoint of my main snap daemon checks to see if a greengrass install exists at $SNAP_COMMON and if not, tries to initialize greengrass as follows: ```bash java \ -Droot="${GG_ROOT}" \ -Dlog.store=FILE \ -Djava.io.tmpdir=$GG_TMP \ -Djava.class.path=$SNAP/usr/lib/jvm/java-11-amazon-corretto/lib:/usr/lib \ -Duser.home=$HOME \ -jar $GG_ROOT/Greengrass.jar \ --component-default-user ggc_user:ggc_group \ --root $GG_ROOT \ --start false \ --setup-system-service false \ --provision true \ --aws-region ${AWS_REGION:=us-east-1} \ --thing-name $THING_NAME \ --thing-group-name ${THING_GROUP:=Default} \ --thing-policy-name $THING_POLICY_NAME \ ``` * `$GG_ROOT` is set to `$SNAP_COMMON/greengrass/v2` (comes out to something like `/var/snap/my-snap/greengrass/v2`). * `$GG_ROOT/Greengrass.jar` is copied from my snap (which I include during the snap build process) * `$THING_NAME`, `$THING_GROUP`, etc. are set by sourcing an identity file installed on each server. This seems to almost work. `Greengrass.jar` extracts everything to `$GG_ROOT` except for `alts/init/distro`... For some reason that get's unpacked to `$SNAP` (so `$SNAP/bin` has `greengrass.exe`, `loader`, etc.). If I set `start` to true, it launches correctly and I even get logs at `$GG_ROOT/logs`, it's just the initial deployment goes off to lala land. I haven't tried issuing a new deployment in this configuration, but can't imagine it'd work (since there are no symlinks). Would anyone happen to have a little insight into why the initial nucleus deployment is unpacking at `$SNAP` here instead of `$GG_ROOT/packages/...` and symlinked to `$GG_ROOT/alts/init`. I feel like if I can figure out this init deployment, it should work... :crossed_fingers: **Code tracing**: I _think_ my issue can start tracing at [KernelAlternatives](https://github.com/aws-greengrass/aws-greengrass-nucleus/blob/42ae03784014a44bc3baf90054a48d7a99fb1e77/src/main/java/com/aws/greengrass/lifecyclemanager/KernelAlternatives.java#L69): ```java private Path getAltsDir() { return nucleusPaths.kernelAltsPath().toAbsolutePath(); } ``` which I think ultimately ends up somewhere around [KernelCommandLine:146](https://github.com/aws-greengrass/aws-greengrass-nucleus/blob/42ae03784014a44bc3baf90054a48d7a99fb1e77/src/main/java/com/aws/greengrass/lifecyclemanager/KernelCommandLine.java#L146) ```java kernel.getConfig().lookup("system", "rootpath").dflt(rootAbsolutePath) .subscribe((whatHappened, topic) -> initPaths(Coerce.toString(topic))); } ``` which leads to [KernelCommandLine:166](https://github.com/aws-greengrass/aws-greengrass-nucleus/blob/42ae03784014a44bc3baf90054a48d7a99fb1e77/src/main/java/com/aws/greengrass/lifecyclemanager/KernelCommandLine.java#L166). ```java private void initPaths(String rootAbsolutePath) { ... } ``` Unfortunately this doesn't really explain why the install gets split up... since `kernelAltPaths` is relative to `rootPath`, which should be getting set to `$GG_ROOT` :(
0
answers
0
votes
41
views
asked 3 months ago
0
answers
0
votes
73
views
SUPPORT ENGINEER
asked 5 months ago
  • 1
  • 2
  • 12 / page