Troubleshooting client devices - AWS IoT Greengrass

Troubleshooting client devices

Use the troubleshooting information and solutions in this section to help resolve issues with Greengrass client devices and client device components.

Greengrass discovery issues

Use the following information to troubleshoot issues with Greengrass discovery. These issues can occur when client devices use the Greengrass discovery API to identify a Greengrass core device to which they can connect.

Greengrass discovery issues (HTTP API)

Use the following information to troubleshoot issues with Greengrass discovery. You might see these errors if you test the discovery API with cURL.

curl: (52) Empty reply from server

You might see this error if you specify an inactive AWS IoT certificate in the request.

Check that the client device has an attached certificate, and that the certificate is active. For more information, see Attach a thing or policy to a client certificate and Activate or deactivate a client certificate in the AWS IoT Core Developer Guide.

HTTP 403: {"message":null,"traceId":"a1b2c3d4-5678-90ab-cdef-11111EXAMPLE"}

You might see this error if the client device doesn't have permission to call greengrass:Discover for itself.

Check that the client device's certificate has a policy that allows greengrass:Discover. You can't use thing policy variables (iot:Connection.Thing.*) in the Resource section for this permission. For more information, see Discovery authentication and authorization.

HTTP 404: {"errorMessage":"The thing provided for discovery was not found"}

You might see this error if the client device isn't associated to any Greengrass core devices or AWS IoT Greengrass V1 groups.

Check that the client device is associated to the core device to which you want it to connect. For more information, see Associate client devices.

Greengrass discovery issues (AWS IoT Device SDK v2 for Python)

Use the following information to troubleshoot issues with Greengrass discovery in the AWS IoT Device SDK v2 for Python.

awscrt.exceptions.AwsCrtError: AWS_ERROR_HTTP_CONNECTION_CLOSED: The connection has closed or is closing.

You might see this error if you specify an inactive AWS IoT certificate in the request.

Check that the client device has an attached certificate, and that the certificate is active. For more information, see Attach a thing or policy to a client certificate and Activate or deactivate a client certificate in the AWS IoT Core Developer Guide.

awsiot.greengrass_discovery.DiscoveryException: ('Error during discover call: response_code=403', 403)

You might see this error if the client device doesn't have permission to call greengrass:Discover for itself.

Check that the client device's certificate has a policy that allows greengrass:Discover. You can't use thing policy variables (iot:Connection.Thing.*) in the Resource section for this permission. For more information, see Discovery authentication and authorization.

awsiot.greengrass_discovery.DiscoveryException: ('Error during discover call: response_code=404', 404)

You might see this error if the client device isn't associated to any Greengrass core devices or AWS IoT Greengrass V1 groups.

Check that the client device is associated to the core device to which you want it to connect. For more information, see Associate client devices.

Greengrass discovery issues (AWS IoT Device SDK v2 for C++)

Use the following information to troubleshoot issues with Greengrass discovery in the AWS IoT Device SDK v2 for C++.

aws-c-http: AWS_ERROR_HTTP_CONNECTION_CLOSED, The connection has closed or is closing.

You might see this error if you specify an inactive AWS IoT certificate in the request.

Check that the client device has an attached certificate, and that the certificate is active. For more information, see Attach a thing or policy to a client certificate and Activate or deactivate a client certificate in the AWS IoT Core Developer Guide.

aws-c-common: AWS_ERROR_UNKNOWN, Unknown error. (HTTP 403)

You might see this error if the client device doesn't have permission to call greengrass:Discover for itself.

Check that the client device's certificate has a policy that allows greengrass:Discover. You can't use thing policy variables (iot:Connection.Thing.*) in the Resource section for this permission. For more information, see Discovery authentication and authorization.

aws-c-common: AWS_ERROR_UNKNOWN, Unknown error. (HTTP 404)

You might see this error if the client device isn't associated to any Greengrass core devices or AWS IoT Greengrass V1 groups.

Check that the client device is associated to the core device to which you want it to connect. For more information, see Associate client devices.

Greengrass discovery issues (AWS IoT Device SDK v2 for JavaScript)

Use the following information to troubleshoot issues with Greengrass discovery in the AWS IoT Device SDK v2 for JavaScript.

Error: aws-c-http: AWS_ERROR_HTTP_CONNECTION_CLOSED, The connection has closed or is closing.

You might see this error if you specify an inactive AWS IoT certificate in the request.

Check that the client device has an attached certificate, and that the certificate is active. For more information, see Attach a thing or policy to a client certificate and Activate or deactivate a client certificate in the AWS IoT Core Developer Guide.

Error: Discovery failed (headers: [object Object]) { response_code: 403 }

You might see this error if the client device doesn't have permission to call greengrass:Discover for itself.

Check that the client device's certificate has a policy that allows greengrass:Discover. You can't use thing policy variables (iot:Connection.Thing.*) in the Resource section for this permission. For more information, see Discovery authentication and authorization.

Error: Discovery failed (headers: [object Object]) { response_code: 404 }

You might see this error if the client device isn't associated to any Greengrass core devices or AWS IoT Greengrass V1 groups.

Check that the client device is associated to the core device to which you want it to connect. For more information, see Associate client devices.

Error: Discovery failed (headers: [object Object])

You might see this error (without an HTTP response code) when you run the Greengrass discovery sample. This error can occur for multiple reasons.

  • You might see this error if the client device doesn't have permission to call greengrass:Discover for itself.

    Check that the client device's certificate has a policy that allows greengrass:Discover. You can't use thing policy variables (iot:Connection.Thing.*) in the Resource section for this permission. For more information, see Discovery authentication and authorization.

  • You might see this error if the client device isn't associated to any Greengrass core devices or AWS IoT Greengrass V1 groups.

    Check that the client device is associated to the core device to which you want it to connect. For more information, see Associate client devices.

Greengrass discovery issues (AWS IoT Device SDK v2 for Java)

Use the following information to troubleshoot issues with Greengrass discovery in the AWS IoT Device SDK v2 for Java.

software.amazon.awssdk.crt.CrtRuntimeException: Error Getting Response Status Code from HttpStream. (aws_last_error: AWS_ERROR_HTTP_DATA_NOT_AVAILABLE(2062), This data is not yet available.)

You might see this error if you specify an inactive AWS IoT certificate in the request.

Check that the client device has an attached certificate, and that the certificate is active. For more information, see Attach a thing or policy to a client certificate and Activate or deactivate a client certificate in the AWS IoT Core Developer Guide.

java.lang.RuntimeException: Error x-amzn-ErrorType(403)

You might see this error if the client device doesn't have permission to call greengrass:Discover for itself.

Check that the client device's certificate has a policy that allows greengrass:Discover. You can't use thing policy variables (iot:Connection.Thing.*) in the Resource section for this permission. For more information, see Discovery authentication and authorization.

java.lang.RuntimeException: Error x-amzn-ErrorType(404)

You might see this error if the client device isn't associated to any Greengrass core devices or AWS IoT Greengrass V1 groups.

Check that the client device is associated to the core device to which you want it to connect. For more information, see Associate client devices.