Duplicate ClientId locating and removal

0

Hi All

IOT core is showing that i have a duplicate clientId and so disconnects form my device

the issue is i dont know how to locate the duplicate device
is there a way to find what the other device is ... as i only know one at this point and as the clinetid is the imei number of the modem... it cannot be changed

there are too many devices to delete and start again... so thats not an option

질문됨 2년 전746회 조회
2개 답변
0

Hi. The Connect and Disconnect events in CloudWatch contain both the sourceIp detailing the IP address of the device and the principalId detailing the ID of the device certificate. Assuming you have a unique certificate for each Thing, you can use the two certificate IDs to find the Thing names. You can do that on the console or on the command line:

aws iot list-principal-things --principal arn:aws:iot:<region>:<accountID>:cert/<principalId>

You can use Logs Insights in CloudWatch to search for all Connect and Disconnect events using the particular <clientId>. You can use a filter statement like this:

filter clientId = '<clientId>' and (eventType = 'Connect' or eventType = 'Disconnect')
profile pictureAWS
전문가
Greg_B
답변함 2년 전
  • You may also want to consider Thing policy variables to ensure that a device can only connect using a client ID that matches the Thing name.

0

To find dedicated disconnects caused by a duplicate clientId you can use the following filter in CloudWatch Insights:

filter disconnectReason = "DUPLICATE_CLIENTID"

KR,

Philipp

AWS
전문가
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠