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!

已提問 1 年前檢視次數 336 次
1 個回答
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
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南