Remote host terminated the handshake during nucleus setup

0

I'm getting an error: Unable to execute HTTP request: Remote host terminated the handshake

This occurs during the call to DeviceProvisioningHelper.createThing(DeviceProvisioningHelper.java:204) -> software.amazon.awssdk.services.iot.DefaultIotClient.getPolicy(DefaultIotClient.java:8787)

I am running a custom greengrass-entrypoint.sh to install version 2.5.3 on a docker container with Ubuntu 18.04 base image using automatic provisioning on an armv7 device that worked before with version 2.4.0. Separately, I have successfully installed a 2.5.3 using automatic provisioning by command line on an Ubuntu VM just fine. My network admin opened up port 8883 which allowed gg to install/run.

What could be causing the above HTTP request error?

Thanks

Here is a partial log. I cannot post a question with the full log it must be too long for posting here:

root@80d214eacd4c:/greengrass/v2/logs# cat greengrass.log 
2022-02-16T21:13:17.982Z [INFO] (main) com.aws.greengrass.util.platforms.Platform: Getting platform instance com.aws.greengrass.util.platforms.unix.linux.LinuxPlatform.. {}
2022-02-16T21:13:21.005Z [INFO] (main) com.aws.greengrass.util.platforms.Platform: Getting platform instance com.aws.greengrass.util.platforms.unix.linux.LinuxPlatform.. {}
2022-02-16T21:13:21.382Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: No ongoing deployment detected. Proceed as default. {}
2022-02-16T21:13:22.864Z [INFO] (main) com.aws.greengrass.lifecyclemanager.Kernel: effective-config-dump-complete. {file=/greengrass/v2/config/effectiveConfig.yaml}
2022-02-16T21:13:23.713Z [INFO] (main) com.aws.greengrass.deployment.DeviceConfiguration: Successfully setup Nucleus launch parameters. {}
2022-02-16T21:13:26.917Z [INFO] (main) com.aws.greengrass.deployment.DeviceConfiguration: Nucleus lifecycle has been initialized successfully. {}
2022-02-16T21:13:27.917Z [INFO] (main) com.aws.greengrass.deployment.DeviceConfiguration: Copy Nucleus artifacts to component store. {destination=/greengrass/v2/packages/artifacts-unarchived/aws.greengrass.Nucleus/2.5.3/aws.greengrass.nucleus, source=/opt/greengrassv2}
2022-02-16T21:15:21.010Z [ERROR] (main) com.aws.greengrass.easysetup.GreengrassSetup: Error while trying to setup Greengrass Nucleus. {}
software.amazon.awssdk.core.exception.SdkClientException: Unable to execute HTTP request: Remote host terminated the handshake
        at software.amazon.awssdk.core.exception.SdkClientException$BuilderImpl.build(SdkClientException.java:98)
        at software.amazon.awssdk.core.exception.SdkClientException.create(SdkClientException.java:43)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.utils.RetryableStageHelper.setLastException(RetryableStageHelper.java:204)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:82)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.RetryableStage.execute(RetryableStage.java:36)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
        at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:56)
        at software.amazon.awssdk.core.internal.http.StreamManagingStage.execute(StreamManagingStage.java:36)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.executeWithTimer(ApiCallTimeoutTrackingStage.java:80)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:60)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallTimeoutTrackingStage.execute(ApiCallTimeoutTrackingStage.java:42)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:48)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ApiCallMetricCollectionStage.execute(ApiCallMetricCollectionStage.java:31)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
        at software.amazon.awssdk.core.internal.http.pipeline.RequestPipelineBuilder$ComposingRequestPipelineStage.execute(RequestPipelineBuilder.java:206)
        at software.amazon.awssdk.core.internal.http.pipeline.stages.ExecutionFailureExceptionReportingStage.execute(ExecutionFailureExceptionReportingStage.java:37)
        ...
Caused by: java.io.EOFException: SSL peer shut down incorrectly
        at sun.security.ssl.SSLSocketInputRecord.decode(SSLSocketInputRecord.java:167)
        at sun.security.ssl.SSLTransport.decode(SSLTransport.java:109)
        at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1392)
        ... 65 more

  • Hi Darren, did you retry? Does it consistently fail with that error? If you could install 2.4.0 with the same setup then it's quite strange because greengrass provision logic has not changed since then.

  • I have tried it many times. Also, it looks like my old image from 2.4.0 also suffers from the same or very similar issue, it was attempted on a home network, 2.5.3 was on a corporate network. It throws exception in the same method. I'm wondering if it has something to do with a docker network setting, because the direct install (2.5.3) to a VM by command line worked.

  • I have tested again my old docker image that installs 2.4.0 and I get the very same error. I've ran it successfully many times in the past.

  • Hi Darren You were running on Armv7 device, right? I am very curious how did you build this alpine image, Could you share you Dockerfile?

  • My Dockerfile has nothing special in it. It uses ubuntu:18.04 and I do a lot of front loading of python libraries, because they have to build from source which takes about 2.5 hours or more rather than letting a greengrass component handle it on initial startup. The trick is to use buildx feature of docker.

    https://docs.master.dockerproject.org/engine/reference/commandline/buildx_build/

    Here is my build command, you need a few commands run prior for buildx setup: sudo docker buildx build --platform linux/armhf -t darrenbraynard/ggv2-x-0_armv7:1.5 . --load

asked 2 years ago77 views
No Answers

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.

Guidelines for Answering Questions