Errno -2: Name or service not known (AWS IoT Sitewise)

0

I followed step by step the tutotrial https://docs.aws.amazon.com/iot-sitewise/latest/userguide/ingest-data-from-iot-things.html but when I tried to do the step 8 of section "Running the device client scrip" I received the error "Errno -2: Name or service not known". Apparently the problem is in mqttClient.connect(), but I haven't been able to fix it in a long time. Any help is welcome! Thanks!

asked a year ago322 views
1 Answer
1

Hi,

it looks like the AWS IoT endpoint which you pass with -e command line parameter is not resolvable. The iot endpoint looks similar to abcdefgh012345-ats.iot.AWS_REGION.amazonaws.com.

You can retrieve your endpoint for example with the AWS CLI:

aws iot describe-endpoint --endpoint-type iot:Data-ATS --query 'endpointAddress' --output text

You can also validate if you can resolve your endpoint in DNS.

Cheers,
Philipp

AWS
EXPERT
answered a year 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.

Guidelines for Answering Questions