- Mais recentes
- Mais votos
- Mais comentários
Hi iriot,
You can check which IP your GGAD uses to connect to Greengrass Core by checking the discovery logs. IP change of Greengrass Core might impact the connection, because GGAD does not have the information that GGC runs on the same host.
I suggest you remove the discovery logic in your GGAD, and instead hardcode the GGC IP to be localhost during connection here https://github.com/aws/aws-iot-device-sdk-python/blob/master/samples/greengrass/basicDiscovery.py#L152
Let me know if this works for you.
Thanks,
Hui
Hi Hui,
Thank you very much for your answer.
I removed the discovery logic and hardcoded 127.0.0.1 to be the GGC IP in my Python Script.
However it seems that I keep getting disconnected from Greengrass everytime my public IP is changing, which makes me think that there is another issue between the GGC and the Cloud... but I did not find it yet.
Alternatively, I implemented a simple script that monitors my public IP and restarts the GG daemon when it changes. That prevents permanent disconnections, but I lose as expected the cached messages.
Cheers,
RI
Hi iriot,
The problem you're running into is the certificates used between the GGAD and the GGC will rotate whenever the IP changes. Even if you only connect locally. You can verify that by looking at the logs to see the certificates rotate.
I've added your comments to our feature request list.
Thanks,
KR-AWS
Hi,
Is there any specific reason you are using a GGAD to communicate with Greengrass on the same machine?
If you are running the script on the same machine as Greengrass, you could implement the functionality in a Lambda function instead of using GGAD. This would be a much simpler solution.
MA
Hi,
Thanks a lot for both these answers.
If I understand correctly, with my current architecture (GGAD + GGC), it is impossible to solve the issue with the current Greengrass version because of this certificate rotation.
We used a GGAD to communicate with the GGC on the same machine mainly for historical reasons : we updated our system from working directly with AWS IoT Core to AWS Greengrass so we modified our pre-existing "data-producer" Python script to connect to Greengrass (using the basicDiscovery example routines) instead of directly connecting to AWS IoT. The idea of using directly a Lambda on the core seems interesting. I'll investigate if that modification is possible with our current architecture and system components / sensors and I'll keep that in mind for future architectures.
RI
Conteúdo relevante
- AWS OFICIALAtualizada há 3 anos
- AWS OFICIALAtualizada há 2 anos