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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ